Re: [PATCH] ALSA: control: Don't add invalid kcontrols to LED layer
From: Jeffin Philip
Date: Thu Aug 27 2026 - 09:13:58 EST
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). I attempted it on my device and got Permission
Denied. But otherwise, seems to be okay.
Thanks,
Jeffin.