milos-linux/sound
Cássio Gabriel a0d9e8df2e ALSA: hda: cs35l56: Fix system name string leaks
cs35l56_hda_read_acpi() gets an allocated ACPI _SUB string from
acpi_get_subsystem_id(). On success, that string is used to create the
firmware system name.

Several error paths after the _SUB lookup can return without releasing
the allocated string. This includes speaker ID lookup errors other than
-ENOENT, and errors after a firmware system name has been allocated.

Use scoped cleanup for the temporary _SUB string and make
cs35l56->system_name device-managed. This releases the temporary _SUB
string on every error path and lets devres release the firmware system
name on probe failure and device removal.

Fixes: 6f03b446cb ("ALSA: hda: cs35l56: Add support for speaker id")
Fixes: 40b1c2f9b2 ("ALSA: hda/cs35l56: Workaround bad dev-index on Lenovo Yoga Book 9i GenX")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260522-alsa-cs35l56-system-name-leak-v4-1-a6154dd09cd9@gmail.com
2026-05-25 09:22:23 +02:00
..
ac97
aoa ALSA: aoa: onyx: Update IEC958 sample-rate status for PCM playback 2026-04-06 10:41:00 +02:00
arm ASoC: pxa2xx-ac97: fix error handling for reset GPIO descriptor 2026-04-13 18:00:34 +01:00
atmel
core ALSA: seq: Serialize UMP output teardown with event_input 2026-05-20 13:10:40 +02:00
drivers ALSA: pcmtest: Return -EFAULT on pattern read copy failure 2026-05-04 13:26:23 +02:00
firewire ALSA: firewire-motu: Protect register DSP event queue positions 2026-05-25 09:19:44 +02:00
hda ALSA: hda: cs35l56: Fix system name string leaks 2026-05-25 09:22:23 +02:00
i2c ALSA: i2c: ak4xxx-adda: seed AK5365 cache with reset defaults 2026-04-09 12:01:01 +02:00
isa ALSA: sscape: Add suspend and resume support 2026-04-12 10:00:34 +02:00
mips
oss
parisc
pci ALSA: asihpi: Fix potential OOB array access at reading cache 2026-05-16 15:41:58 +02:00
pcmcia
ppc
sh
soc ASoC: codecs: pcm512x: fix null-ptr dereference in pcm512x_overclock_xxx_put() 2026-05-21 19:28:24 +01:00
sparc ALSA: sparc/dbri: add missing fallthrough 2026-05-06 10:09:17 +02:00
spi
synth
usb ALSA: scarlett2: Allow flash writes ending at segment boundary 2026-05-20 07:51:46 +02:00
virtio ALSA: virtio: drop an extaneous kernel-doc comment 2026-04-17 09:47:54 +02:00
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c