linux-yocto/sound/usb
Youngjun Lee 74fcb3852a 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 11:00:11 +02:00
..
6fire ALSA: 6fire: Release resources at card release 2024-12-09 10:32:11 +01:00
bcd2000 ALSA: bcd2000: refactor deprecated strncpy 2023-07-29 13:53:56 +02:00
caiaq ALSA: caiaq: Use snd_card_free_when_closed() at disconnection 2024-12-09 10:32:11 +01:00
hiface ALSA: hiface: fix repeated words in comments 2022-07-25 08:28:37 +02:00
line6 ALSA: line6: add hw monitor volume control to POD HD500X 2024-10-10 11:57:46 +02:00
misc ALSA: ua101: fix division by zero at probe 2021-10-27 08:23:30 +02:00
usx2y ALSA: usx2y: validate nrpacks module parameter on probe 2025-03-13 12:58:30 +01:00
card.c ALSA: usb-audio: Add logitech Audio profile quirk 2024-10-10 11:57:29 +02:00
card.h ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless 2022-12-22 09:13:54 +01:00
clock.c ALSA: usb-audio: Fix out of bounds reads when finding clock sources 2024-12-09 10:32:39 +01:00
clock.h
endpoint.c ALSA: usb-audio: Add retry on -EPROTO from usb_set_interface() 2025-05-09 09:43:49 +02:00
endpoint.h ALSA: usb-audio: Remove unused function declaration 2023-08-01 16:56:57 +02:00
format.c ALSA: usb-audio: Add second USB ID for Jabra Evolve 65 headset 2025-05-09 09:43:49 +02:00
format.h
helper.c ALSA: usb-audio: remove Wireless USB dead code 2023-03-14 17:00:57 +01:00
helper.h
implicit.c ALSA: usb-audio: Add implicit feedback quirk for RODE AI-1 2025-06-19 15:28:44 +02:00
implicit.h ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless 2022-12-22 09:13:54 +01:00
Kconfig ALSA: usb-audio: USB MIDI 2.0 UMP support 2023-05-23 12:11:02 +02:00
Makefile ALSA: scarlett2: Rename scarlett_gen2 to scarlett2 2024-04-27 17:11:36 +02:00
media.c ALSA: pcm: Don't embed device 2023-08-17 09:23:45 +02:00
media.h
midi.c ALSA: usb-audio: Fix CME quirk for UF series keyboards 2025-04-25 10:45:13 +02:00
midi.h ALSA: usb-audio: Manage number of rawmidis globally 2023-05-23 12:11:00 +02:00
midi2.c ALSA: usb-audio: Update UMP group attributes for GTB blocks, too 2024-12-14 20:00:23 +01:00
midi2.h ALSA: usb-audio: USB MIDI 2.0 UMP support 2023-05-23 12:11:02 +02:00
mixer_maps.c ALSA: usb-audio: Rename ALSA kcontrol PCM and PCM1 for the KTMicro sound card 2025-06-27 11:09:00 +01:00
mixer_quirks.c ALSA: usb-audio: Add quirk for Plantronics headsets to fix control names 2025-04-07 10:06:35 +02:00
mixer_quirks.h ALSA: usb-audio: Drop CONFIG_PM ifdefs 2021-12-06 10:19:40 +01:00
mixer_s1810c.c ALSA: usb-audio: remove redundant assignment to variable c 2022-02-08 08:21:32 +01:00
mixer_s1810c.h
mixer_scarlett.c
mixer_scarlett.h
mixer_scarlett2.c ALSA: scarlett2: Rename scarlett_gen2 to scarlett2 2024-04-27 17:11:36 +02:00
mixer_scarlett2.h ALSA: scarlett2: Rename scarlett_gen2 to scarlett2 2024-04-27 17:11:36 +02:00
mixer_us16x08.c ALSA: usb-audio: US16x08: Initialize array before use 2025-01-09 13:32:01 +01:00
mixer_us16x08.h
mixer.c ALSA: usb-audio: Make mic volume workarounds globally applicable 2024-12-14 20:00:07 +01:00
mixer.h ALSA: usb-audio: Add input value sanity checks for standard types 2024-10-10 11:57:28 +02:00
pcm.c ALSA: usb-audio: Fix broken resume due to UAC3 power state 2023-06-16 09:28:08 +02:00
pcm.h ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless 2022-12-22 09:13:54 +01:00
power.c
power.h ALSA: usb-audio: Drop CONFIG_PM ifdefs 2021-12-06 10:19:40 +01:00
proc.c
proc.h
quirks-table.h ALSA: usb-audio: Fix Yamaha P-125 Quirk Entry 2024-12-09 10:31:40 +01:00
quirks.c ALSA: usb-audio: Add a quirk for Lenovo Thinkpad Thunderbolt 3 dock 2025-07-06 11:00:08 +02:00
quirks.h ALSA: usb-audio: Register card at the last interface 2022-09-06 11:04:56 +02:00
stream.c ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3() 2025-07-06 11:00:11 +02:00
stream.h
usbaudio.h ALSA: usb-audio: Make mic volume workarounds globally applicable 2024-12-14 20:00:07 +01:00
validate.c