kernel_samsung_a53x/sound
Takashi Iwai d36a4b3cad ALSA: usb: Fix UBSAN warning in parse_audio_unit()
[ Upstream commit 2f38cf730caedaeacdefb7ff35b0a3c1168117f9 ]

A malformed USB descriptor may pass the lengthy mixer description with
a lot of channels, and this may overflow the 32bit integer shift
size, as caught by syzbot UBSAN test.  Although this won't cause any
real trouble, it's better to address.

This patch introduces a sanity check of the number of channels to bail
out the parsing when too many channels are found.

Reported-by: syzbot+78d5b129a762182225aa@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/0000000000000adac5061d3c7355@google.com
Link: https://patch.msgid.link/20240715123619.26612-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-15 16:29:40 +01:00
..
ac97
aoa
arm
atmel
core Revert "ALSA: mixer_oss: Remove some incorrect kfree_const() usages" 2024-11-24 00:23:11 +01:00
drivers
firewire ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init() 2024-11-30 02:33:23 +01:00
hda Revert "ALSA: hda: Add input value sanity checks to HDMI channel map controls" 2024-11-24 00:23:43 +01:00
i2c
isa
mips
oss/dmasound
parisc
pci ALSA: hda/realtek: Add support for Samsung Galaxy Book3 360 (NP730QFG) 2024-12-17 13:24:28 +01:00
pcmcia
ppc
sh ALSA: sh: aica: reorder cleanup operations to avoid UAF bugs 2024-11-19 09:22:42 +01:00
soc Revert "clkdev: remove CONFIG_CLKDEV_LOOKUP" 2025-01-02 17:01:18 +01:00
sparc
spi
synth ALSA: emux: improve patch ioctl data validation 2024-11-19 14:19:32 +01:00
usb ALSA: usb: Fix UBSAN warning in parse_audio_unit() 2025-01-15 16:29:40 +01:00
x86
xen
ac97_bus.c
Kconfig sound: Make CONFIG_SND depend on INDIRECT_IOMEM instead of UML 2024-11-30 02:33:27 +01:00
last.c
Makefile
sound_core.c