android_kernel_samsung_msm8976/sound/usb
Hui Peng e49b967f0b ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term
`check_input_term` recursively calls itself with input from
device side (e.g., uac_input_terminal_descriptor.bCSourceID)
as argument (id). In `check_input_term`, if `check_input_term`
is called with the same `id` argument as the caller, it triggers
endless recursive call, resulting kernel space stack overflow.

This patch fixes the bug by adding a bitmap to `struct mixer_build`
to keep track of the checked ids and stop the execution if some id
has been checked (similar to how parse_audio_unit handles unitid
argument).

Change-Id: Ibc4ab23c7d7c2fc96ff85d7cf1a1205bbd632cb5
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Signed-off-by: Hui Peng <benquike@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-06-06 20:31:35 +02:00
..
6fire
caiaq
misc
usx2y
Kconfig
Makefile
card.c ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c 2019-10-19 23:31:29 +02:00
card.h ALSA: usb-audio: work around corrupted TEAC UD-H01 feedback data 2014-06-07 13:25:33 -07:00
clock.c ALSA: usb-audio: Add sanity checks in v2 clock parsers 2019-07-27 21:46:06 +02:00
clock.h
debug.h
endpoint.c Merge tag 'LA.BR.1.3.6-03510-8976.0' into HEAD 2017-04-18 12:11:50 +02:00
endpoint.h ALSA: usb-audio: Fix races at disconnection and PCM closing 2015-02-18 11:01:42 -08:00
format.c
format.h
helper.c
helper.h
midi.c This is the 3.10.94 stable release 2017-04-18 17:12:56 +02:00
midi.h
mixer.c ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term 2020-06-06 20:31:35 +02:00
mixer.h ALSA: usb-audio: Kill stray URB at exiting 2018-08-20 12:15:26 +02:00
mixer_maps.c ALSA: usb-audio: add dB range mapping for some devices 2015-08-10 12:20:30 -07:00
mixer_quirks.c ALSA: usb - Creative USB X-Fi Pro SB1095 volume knob support 2015-04-19 10:10:46 +02:00
mixer_quirks.h
pcm.c ALSA: usb-audio: clear SUBSTREAM_FLAG_SYNC_EP_STARTED on error 2019-07-27 22:10:16 +02:00
pcm.h
power.h
proc.c
proc.h
quirks-table.h ALSA: usb-audio: prevent CH345 multiport output SysEx corruption 2015-12-09 13:40:10 -05:00
quirks.c This is the 3.10.97 stable release 2017-04-18 17:17:20 +02:00
quirks.h
stream.c ALSA: usb-audio: Always check descriptor sizes in parser code 2019-07-27 22:10:17 +02:00
stream.h
usbaudio.h ALSA: usb-audio: prevent CH345 multiport output SysEx corruption 2015-12-09 13:40:10 -05:00