linux-stable/sound/usb
Johan Hovold 0141254b0a ALSA: usb-audio: fix set_format altsetting sanity check
Make sure to check the return value of usb_altnum_to_altsetting() to
avoid dereferencing a NULL pointer when the requested alternate settings
is missing.

The format altsetting number may come from a quirk table and there does
not seem to be any other validation of it (the corresponding index is
checked however).

Fixes: b099b9693d ("ALSA: usb-audio: Avoid superfluous usb_set_interface() calls")
Cc: stable <stable@vger.kernel.org>     # 4.18
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20191220093134.1248-1-johan@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-20 11:31:46 +01:00
..
6fire ALSA: 6fire: Convert to the common vmalloc memalloc 2019-11-06 15:47:42 +01:00
bcd2000 Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
caiaq ALSA: caiaq: Convert to the common vmalloc memalloc 2019-11-06 15:47:42 +01:00
hiface ALSA: hiface: Convert to the common vmalloc memalloc 2019-11-06 15:47:42 +01:00
line6 ALSA: usb: Remove superfluous snd_dma_continuous_data() 2019-11-06 15:47:41 +01:00
misc ALSA: ua101: Convert to the common vmalloc memalloc 2019-11-06 15:47:42 +01:00
usx2y ALSA: usb: Remove superfluous snd_dma_continuous_data() 2019-11-06 15:47:41 +01:00
Kconfig sound: Fix Kconfig indentation 2019-10-07 03:53:03 +02:00
Makefile Merge branch 'topic/usb-validation' into for-next 2019-08-22 15:42:03 +02:00
card.c ALSA: usb-audio: Add skip_validation option 2019-11-14 18:02:38 +01:00
card.h ALSA: usb-audio: set the interface format after resume on Dell WD19 2019-12-18 20:04:37 +01:00
clock.c ALSA: usb-audio: sound: usb: usb true/false for bool return type 2019-10-30 08:46:33 +01:00
clock.h ALSA: usb: initial USB Audio Device Class 3.0 support 2018-03-21 11:46:33 +01:00
debug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
endpoint.c ALSA: usb-audio: not submit urb for stopped endpoint 2019-11-13 10:49:31 +01:00
endpoint.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
format.c ASoC: Updates for v5.3 2019-07-08 14:45:34 +02: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: Fix gpf in snd_usb_pipe_sanity_check 2019-07-30 12:32:21 +02:00
helper.h ALSA: usb-audio: More validations of descriptor units 2019-08-22 10:35:59 +02:00
media.c media: sound/usb: Use Media Controller API to share media resources 2019-04-22 11:21:06 -04: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: rawmidi: A lightweight function to discard pending bytes 2018-10-04 20:13:17 +02:00
midi.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mixer.c ALSA: usb-audio: Fix NULL dereference at parsing BADD 2019-11-22 14:08:31 +01:00
mixer.h ALSA: usb-audio: Scarlett Gen 2 mixer interface 2019-07-28 17:47:48 +02:00
mixer_maps.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
mixer_quirks.c Merge branch 'topic/usb-validation' into for-next 2019-08-22 15:42:03 +02:00
mixer_quirks.h ALSA: usb-audio: Initialize Dell Dock playback volumes 2018-05-02 16:02:32 +02:00
mixer_scarlett.c ALSA: usb-audio: Fix Focusrite Scarlett 6i6 gen1 - input handling 2019-11-25 16:49:35 +01: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_scarlett_gen2.c ALSA: usb-audio: Fix Scarlett 6i6 Gen 2 port data 2019-11-22 08:41:03 +01:00
mixer_scarlett_gen2.h ALSA: usb-audio: Scarlett Gen 2 mixer interface 2019-07-28 17:47:48 +02:00
mixer_us16x08.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
mixer_us16x08.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pcm.c ALSA: usb-audio: fix set_format altsetting sanity check 2019-12-20 11:31:46 +01:00
pcm.h ALSA: usb-audio: Add UAC3 Power Domains to suspend/resume 2018-07-31 15:01:36 +02:00
power.c ALSA: usb-audio: More validations of descriptor units 2019-08-22 10:35:59 +02:00
power.h ALSA: usb-audio: Initial Power Domain support 2018-07-31 15:01:22 +02:00
proc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07: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: set the interface format after resume on Dell WD19 2019-12-18 20:04:37 +01:00
quirks.c ALSA: usb-audio: set the interface format after resume on Dell WD19 2019-12-18 20:04:37 +01:00
quirks.h ALSA: usb-audio: move audioformat quirks to quirks.c 2018-03-19 17:00:12 +01:00
stream.c Merge branch 'topic/usb-validation' into for-next 2019-08-22 15:42:03 +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: set the interface format after resume on Dell WD19 2019-12-18 20:04:37 +01:00
validate.c ALSA: usb-audio: Add skip_validation option 2019-11-14 18:02:38 +01:00