linux-stable/sound/usb
Dan Carpenter b61f346fa0 ALSA: usb-audio: Fix a DMA to stack memory bug
commit f7d306b47a upstream.

The usb_get_descriptor() function does DMA so we're not allowed
to use a stack buffer for that.  Doing DMA to the stack is not portable
all architectures.  Move the "new_device_descriptor" from being stored
on the stack and allocate it with kmalloc() instead.

Fixes: b909df18ce ("ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices")
Cc: stable@kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/60e3aa09-039d-46d2-934c-6f123026c2eb@stanley.mountain
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Benoît Sevens <bsevens@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-19 18:08:58 +01:00
..
6fire ALSA: 6fire: Release resources at card release 2024-12-14 19:53:34 +01:00
bcd2000 ALSA: bcd2000: Fix a UAF bug on the error path of probing 2022-07-15 08:58:36 +02:00
caiaq ALSA: caiaq: Use snd_card_free_when_closed() at disconnection 2024-12-14 19:53:34 +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-17 15:21:52 +02:00
misc ALSA: ua101: fix division by zero at probe 2021-10-27 08:23:30 +02:00
usx2y ALSA: us122l: Use snd_card_free_when_closed() at disconnection 2024-12-14 19:53:34 +01:00
card.c ALSA: usb-audio: Add logitech Audio profile quirk 2024-10-17 15:21:40 +02:00
card.h ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless 2023-01-07 11:11:43 +01:00
clock.c ALSA: usb-audio: Fix out of bounds reads when finding clock sources 2024-12-14 19:53:54 +01:00
clock.h ALSA: usb-audio: Constify audioformat pointer references 2020-11-23 15:15:36 +01:00
endpoint.c ALSA: usb-audio: Notify xrun for low-latency mode 2024-12-14 19:54:30 +01:00
endpoint.h ALSA: usb-audio: Fix recursive locking at XRUN during syncing 2023-04-06 12:10:43 +02:00
format.c ALSA: usb-audio: Check presence of valid altsetting control 2024-03-01 13:26:27 +01:00
format.h ALSA: usb: initial USB Audio Device Class 3.0 support 2018-03-21 11:46:33 +01:00
helper.c ALSA: usb-audio: Add snd_usb_get_host_interface() helper 2020-11-23 15:13:47 +01:00
helper.h ALSA: usb-audio: Add snd_usb_get_host_interface() helper 2020-11-23 15:13:47 +01:00
implicit.c ALSA: usb-audio: Always initialize fixed_rate in snd_usb_find_implicit_fb_sync_format() 2023-01-18 11:58:09 +01:00
implicit.h ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless 2023-01-07 11:11:43 +01:00
Kconfig sound: Fix Kconfig indentation 2019-10-07 03:53:03 +02:00
Makefile ALSA: scarlett2: Rename scarlett_gen2 to scarlett2 2024-04-27 17:07:11 +02:00
media.c ALSA: usb-audio: fix spelling mistakes 2021-07-05 19:33:54 +02:00
media.h media: sound/usb: Use Media Controller API to share media resources 2019-04-22 11:21:06 -04:00
midi.c ALSA: usb-audio: Drop snd_BUG_ON() from snd_usbmidi_output_open() 2022-11-12 15:13:01 +01:00
midi.h ALSA: usb-audio: generate midi streaming substream names from jack names 2021-03-01 09:21:54 +01:00
mixer_maps.c ALSA: usb-audio: add mixer mapping for Corsair HS80 2024-12-14 19:54:33 +01:00
mixer_quirks.c ALSA: usb-audio: Add quirks for Dell WD19 dock 2024-11-08 16:26:44 +01: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 ALSA: usb-audio: Add support for Presonus Studio 1810c 2020-02-15 09:46:16 +01:00
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_scarlett.c ALSA: usb-audio: fix spelling mistakes 2021-07-05 19:33:54 +02:00
mixer_scarlett.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mixer_us16x08.c ALSA: usb-audio: US16x08: Move overflow check before array access 2022-06-13 07:40:08 +02:00
mixer_us16x08.h ALSA: usb: Constify snd_kcontrol_new items 2020-01-03 09:24:34 +01:00
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 ALSA: usb-audio: Fix broken resume due to UAC3 power state 2023-06-21 16:00:55 +02:00
pcm.h ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless 2023-01-07 11:11:43 +01:00
power.c ALSA: usb-audio: More validations of descriptor units 2019-08-22 10:35:59 +02:00
power.h ALSA: usb-audio: Drop CONFIG_PM ifdefs 2021-12-06 10:19:40 +01:00
proc.c ALSA: usb-audio: Show sync endpoint information in proc outputs 2020-11-23 15:16:45 +01:00
proc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
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: Fix a DMA to stack memory bug 2024-12-19 18:08:58 +01: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: Correct surround channels in UAC1 channel map 2024-08-11 12:36:00 +02:00
stream.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
usbaudio.h ALSA: usb-audio: Make mic volume workarounds globally applicable 2024-12-14 19:54:44 +01:00
validate.c ALSA: usb-audio: Fix endianess in descriptor validation 2020-02-01 09:06:11 +01:00