kernel_samsung_a53x/sound/usb
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
..
6fire ALSA: 6fire: Release resources at card release 2024-12-17 13:24:07 +01:00
bcd2000
caiaq ALSA: caiaq: Use snd_card_free_when_closed() at disconnection 2024-12-17 13:24:07 +01:00
hiface
line6 Revert "ALSA: line6: add hw monitor volume control to POD HD500X" 2024-11-24 00:23:04 +01:00
misc
usx2y ALSA: us122l: Use snd_card_free_when_closed() at disconnection 2024-12-17 13:24:07 +01:00
card.c Revert "ALSA: usb-audio: Add logitech Audio profile quirk" 2024-11-24 00:23:07 +01:00
card.h
clock.c ALSA: usb-audio: Fix out of bounds reads when finding clock sources 2024-12-17 13:24:35 +01:00
clock.h
debug.h
endpoint.c
endpoint.h
exynos_usb_audio.c
exynos_usb_audio.h
format.c
format.h
helper.c
helper.h
Kconfig
Makefile
media.c
media.h
midi.c
midi.h
mixer.c ALSA: usb: Fix UBSAN warning in parse_audio_unit() 2025-01-15 16:29:40 +01:00
mixer.h
mixer_maps.c ALSA: usb-audio: add mixer mapping for Corsair HS80 2024-12-17 13:24:28 +01:00
mixer_quirks.c ALSA: usb-audio: Add endianness annotations 2024-11-30 02:33:27 +01:00
mixer_quirks.h
mixer_s1810c.c
mixer_s1810c.h
mixer_scarlett.c
mixer_scarlett.h
mixer_scarlett_gen2.c
mixer_scarlett_gen2.h
mixer_us16x08.c
mixer_us16x08.h
pcm.c
pcm.h
power.c
power.h
proc.c
proc.h
quirks-table.h Revert "ALSA: usb-audio: Fix Yamaha P-125 Quirk Entry" 2024-12-17 14:46:18 +01:00
quirks.c ALSA: usb-audio: Fix a DMA to stack memory bug 2025-01-02 17:01:19 +01:00
quirks.h
stream.c ALSA: usb-audio: Correct surround channels in UAC1 channel map 2024-11-23 23:20:21 +01:00
stream.h
usbaudio.h
validate.c