aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2022-01-26 15:50:11 +0100
committerTakashi Iwai <[email protected]>2022-01-26 15:56:35 +0100
commit549f8ffc7b2f7561bea7f90930b6c5104318e87b (patch)
treeba1896a0991519146ffc5e2a94af608fbe022b45 /lib/mpi/mpi-bit.c
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07 (diff)
ALSA: hda: Fix UAF of leds class devs at unbinding
The LED class devices that are created by HD-audio codec drivers are registered via devm_led_classdev_register() and associated with the HD-audio codec device. Unfortunately, it turned out that the devres release doesn't work for this case; namely, since the codec resource release happens before the devm call chain, it triggers a NULL dereference or a UAF for a stale set_brightness_delay callback. For fixing the bug, this patch changes the LED class device register and unregister in a manual manner without devres, keeping the instances in hda_gen_spec. Reported-by: Alexander Sergeyev <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions