linux-yocto/sound/usb
Youngjun Lee 6eb211788e ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3()
[ Upstream commit fb4e2a6e8f ]

In snd_usb_get_audioformat_uac3(), the length value returned from
snd_usb_ctl_msg() is used directly for memory allocation without
validation. This length is controlled by the USB device.

The allocated buffer is cast to a uac3_cluster_header_descriptor
and its fields are accessed without verifying that the buffer
is large enough. If the device returns a smaller than expected
length, this leads to an out-of-bounds read.

Add a length check to ensure the buffer is large enough for
uac3_cluster_header_descriptor.

Signed-off-by: Youngjun Lee <yjjuny.lee@samsung.com>
Fixes: 9a2fe9b801 ("ALSA: usb: initial USB Audio Device Class 3.0 support")
Link: https://patch.msgid.link/20250623-uac3-oob-fix-v1-1-527303eaf40a@samsung.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-06 10:58:00 +02:00
..
6fire ALSA: 6fire: Release resources at card release 2024-12-14 19:53:34 +01:00
bcd2000
caiaq ALSA: caiaq: Use snd_card_free_when_closed() at disconnection 2024-12-14 19:53:34 +01:00
hiface
line6 ALSA: line6: add hw monitor volume control to POD HD500X 2024-10-17 15:21:52 +02:00
misc
usx2y ALSA: usx2y: validate nrpacks module parameter on probe 2025-03-13 12:53:17 +01:00
card.c ALSA: usb-audio: Add logitech Audio profile quirk 2024-10-17 15:21:40 +02:00
card.h
clock.c ALSA: usb-audio: Fix out of bounds reads when finding clock sources 2024-12-14 19:53:54 +01:00
clock.h
endpoint.c ALSA: usb-audio: Notify xrun for low-latency mode 2024-12-14 19:54:30 +01:00
endpoint.h
format.c ALSA: usb-audio: Add second USB ID for Jabra Evolve 65 headset 2025-05-09 09:41:33 +02:00
format.h
helper.c
helper.h
implicit.c ALSA: usb-audio: Add implicit feedback quirk for RODE AI-1 2025-06-27 11:07:24 +01:00
implicit.h
Kconfig
Makefile ALSA: scarlett2: Rename scarlett_gen2 to scarlett2 2024-04-27 17:07:11 +02:00
media.c
media.h
midi.c ALSA: usb-audio: Fix CME quirk for UF series keyboards 2025-04-25 10:43:29 +02:00
midi.h
mixer_maps.c ALSA: usb-audio: Rename ALSA kcontrol PCM and PCM1 for the KTMicro sound card 2025-06-27 11:07:37 +01:00
mixer_quirks.c ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names 2025-04-07 10:05:44 +02:00
mixer_quirks.h
mixer_s1810c.c
mixer_s1810c.h
mixer_scarlett.c
mixer_scarlett.h
mixer_scarlett2.c ALSA: scarlett2: Rename scarlett_gen2 to scarlett2 2024-04-27 17:07:11 +02:00
mixer_scarlett2.h ALSA: scarlett2: Rename scarlett_gen2 to scarlett2 2024-04-27 17:07:11 +02:00
mixer_us16x08.c ALSA: usb-audio: US16x08: Initialize array before use 2025-01-09 13:30:01 +01:00
mixer_us16x08.h
mixer.c ALSA: usb-audio: Make mic volume workarounds globally applicable 2024-12-14 19:54:44 +01:00
mixer.h ALSA: usb-audio: Add input value sanity checks for standard types 2024-10-17 15:21:40 +02:00
pcm.c
pcm.h
power.c
power.h
proc.c
proc.h
quirks-table.h ALSA: usb-audio: Fix Yamaha P-125 Quirk Entry 2024-12-14 19:53:11 +01:00
quirks.c ALSA: usb-audio: Add a quirk for Lenovo Thinkpad Thunderbolt 3 dock 2025-07-06 10:57:56 +02:00
quirks.h
stream.c ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3() 2025-07-06 10:58:00 +02:00
stream.h
usbaudio.h ALSA: usb-audio: Make mic volume workarounds globally applicable 2024-12-14 19:54:44 +01:00
validate.c