mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jeffin Philip <jeffinphilip14@gmail.com>
Cc: tiwai@suse.de, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org
Subject: Re: [PATCH] ALSA: control: Don't add invalid kcontrols to LED layer
Date: Thu, 27 Aug 2026 15:24:40 +0200	[thread overview]
Message-ID: <8733vzg0h3.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260827131211.11946-1-jeffinphilip14@gmail.com>

On Thu, 27 Aug 2026 15:12:11 +0200,
Jeffin Philip wrote:
> 
> On 8/27/26 13:39, Takashi Iwai wrote:
> 
> >The kcontrol LED state layer tries to track the all associated
> >kcontrol elements with naive assumptions that they are readable.
> >But one can create a write-only element that has no get callback (even
> >a user element can do it), and this may lead to a NULL dereference at
> >the call chain of snd_ctl_led_notify(), as found by syzkaller.
> >
> >For avoiding the Oops, add a sanity check of the kcontrol's info and
> >get callbacks, and just skip the invalid kcontrols before assigning
> >the kctl to the LED layer.
> 
> I don't think a user can attach a device via sysfs without root permissions,
> (correct me if I am wrong).

The kcontrol can be added without root privilege.  But the
reassignment of LED-control via sysfs is only for root, so the
specific trigger pattern by syzbot is only for root.

However, in theory, it could be without root if a driver has some
built-in patterns to bind LED controls and if one would add user
elements manually later to match with it.


thanks,

Takashi

      reply	other threads:[~2026-08-27 13:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 11:39 Takashi Iwai
2026-08-27 13:04 ` Jaroslav Kysela
2026-08-27 13:12 ` Jeffin Philip
2026-08-27 13:24   ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8733vzg0h3.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=jeffinphilip14@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®