mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
4e545f2462
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> |
||
---|---|---|
.. | ||
6fire | ||
caiaq | ||
misc | ||
usx2y | ||
card.c | ||
card.h | ||
clock.c | ||
clock.h | ||
debug.h | ||
endpoint.c | ||
endpoint.h | ||
format.c | ||
format.h | ||
helper.c | ||
helper.h | ||
Kconfig | ||
Makefile | ||
midi.c | ||
midi.h | ||
mixer.c | ||
mixer.h | ||
mixer_maps.c | ||
mixer_quirks.c | ||
mixer_quirks.h | ||
pcm.c | ||
pcm.h | ||
power.h | ||
proc.c | ||
proc.h | ||
quirks-table.h | ||
quirks.c | ||
quirks.h | ||
stream.c | ||
stream.h | ||
usbaudio.h |