android_kernel_samsung_msm8976/sound
Takashi Iwai 4e545f2462 ALSA: usb-audio: Always check descriptor sizes in parser code
commit 3e96d7280f16e2f787307f695a31296b9e4a1cd7 upstream.

There are a few places where we access the data without checking the
actual object size from the USB audio descriptor.  This may result in
OOB access, as recently reported.

This patch addresses these missing checks.  Most of added codes are
simple bLength checks in the caller side.  For the input and output
terminal parsers, we put the length check in the parser functions.
For the input terminal, a new argument is added to distinguish between
UAC1 and the rest, as they treat different objects.

Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Reported-by: Hui Peng <benquike@163.com>
Tested-by: Hui Peng <benquike@163.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[bwh: Backported to 3.16:
 - Drop changes in parse_audio_input_terminal() and UAC3 handling
 - Adjust context, indentation]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 22:10:17 +02:00
..
aoa
arm
atmel
core ALSA: core: Fix card races between register and disconnect 2019-07-27 22:10:10 +02:00
drivers ALSA: aloop: Fix racy hw constraints adjustment 2019-07-27 21:46:27 +02:00
firewire
i2c
isa
mips
oss
parisc
pci This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
pcmcia
ppc
sh
soc ANDROID: ASoC: msm: qdsp6v2: Fix memset argument order. 2019-07-27 22:10:15 +02:00
sparc
spi
synth ALSA: emux: Fix potential Spectre v1 vulnerabilities 2019-07-27 22:09:03 +02:00
usb ALSA: usb-audio: Always check descriptor sizes in parser code 2019-07-27 22:10:17 +02:00
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c
sound_firmware.c