android_kernel_motorola_sm6375/sound
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Haein Lee 23aea9c74a ALSA: usb-audio: Fix NULL pointer dereference in snd_usb_mixer_controls_badd
[ Upstream commit 632108ec072ad64c8c83db6e16a7efee29ebfb74 ]

In snd_usb_create_streams(), for UAC version 3 devices, the Interface
Association Descriptor (IAD) is retrieved via usb_ifnum_to_if(). If this
call fails, a fallback routine attempts to obtain the IAD from the next
interface and sets a BADD profile. However, snd_usb_mixer_controls_badd()
assumes that the IAD retrieved from usb_ifnum_to_if() is always valid,
without performing a NULL check. This can lead to a NULL pointer
dereference when usb_ifnum_to_if() fails to find the interface descriptor.

This patch adds a NULL pointer check after calling usb_ifnum_to_if() in
snd_usb_mixer_controls_badd() to prevent the dereference.

This issue was discovered by syzkaller, which triggered the bug by sending
a crafted USB device descriptor.

Fixes: 17156f23e9 ("ALSA: usb: add UAC3 BADD profiles support")
Signed-off-by: Haein Lee <lhi0729@kaist.ac.kr>
Link: https://patch.msgid.link/vwhzmoba9j2f.vwhzmob9u9e2.g6@dooray.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-12-03 12:45:18 +01:00
..
ac97
aoa
arm
atmel
core ALSA: pcm: Fix race of buffer access at PCM OSS layer 2025-06-04 14:32:35 +02:00
drivers
firewire ALSA: firewire: amdtp-stream: fix enum kernel-doc warnings 2025-10-29 13:59:57 +01:00
hda ALSA: hda: Add input value sanity checks to HDMI channel map controls 2024-09-12 11:03:51 +02:00
i2c
isa ALSA: sb: Force to disable DMAs once when DMA mode is changed 2025-07-17 18:24:57 +02:00
mips
oss
parisc
pci ALSA: lx_core: use int type to store negative error codes 2025-10-29 13:59:47 +01:00
pcmcia
ppc
sh ALSA: sh: SND_AICA should depend on SH_DMA_API 2025-06-04 14:32:28 +02:00
soc ASoC: cs4271: Fix regulator leak on probe failure 2025-12-03 12:45:18 +01:00
sparc
spi
synth ALSA: emux: improve patch ioctl data validation 2024-07-05 09:08:28 +02:00
usb ALSA: usb-audio: Fix NULL pointer dereference in snd_usb_mixer_controls_badd 2025-12-03 12:45:18 +01:00
x86
xen
ac97_bus.c
Kconfig sound: Make CONFIG_SND depend on INDIRECT_IOMEM instead of UML 2024-11-17 14:58:53 +01:00
last.c
Makefile
sound_core.c