android_kernel_sony_sdm845/sound/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Takashi Iwai f05360bfb9 ALSA: usb-audio: Fix OOB access of mixer element list
[ Upstream commit 220345e98f1cdc768eeb6e3364a0fa7ab9647fe7 ]

The USB-audio mixer code holds a linked list of usb_mixer_elem_list,
and several operations are performed for each mixer element.  A few of
them (snd_usb_mixer_notify_id() and snd_usb_mixer_interrupt_v2())
assume each mixer element being a usb_mixer_elem_info object that is a
subclass of usb_mixer_elem_list, cast via container_of() and access it
members.  This may result in an out-of-bound access when a
non-standard list element has been added, as spotted by syzkaller
recently.

This patch adds a new field, is_std_info, in usb_mixer_elem_list to
indicate that the element is the usb_mixer_elem_info type or not, and
skip the access to such an element if needed.

Reported-by: syzbot+fb14314433463ad51625@syzkaller.appspotmail.com
Reported-by: syzbot+2405ca3401e943c538b5@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200624122340.9615-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 15:38:41 -04:00
..
6fire treewide: Fix typos in printk 2015-12-08 14:59:19 +01:00
bcd2000 ALSA: bcd2000: Make local data static 2015-05-26 13:00:01 +02:00
caiaq ALSA: caiaq: Fix stray URB at probe error path 2017-10-18 09:35:40 +02:00
hiface ALSA: hiface: Fix M2Tech hiFace driver sampling rate change 2017-01-06 10:40:12 +01:00
line6 ALSA: line6: Fix endless MIDI read loop 2020-04-02 17:20:23 +02:00
misc ALSA: ua101: replace le16_to_cpu() with usb_endpoint_maxp() 2015-11-16 09:03:06 +01:00
usx2y ALSA: usx2y: Fix potential NULL dereference 2020-05-02 17:23:11 +02:00
card.c ALSA: usb-audio: Fix inconsistent card PM state after resume 2020-06-20 10:24:09 +02:00
card.h ALSA: usb-audio: Improve frames size computation 2020-06-30 15:38:23 -04:00
clock.c ALSA: usb-audio: Add sanity checks in v2 clock parsers 2017-11-30 08:39:05 +00:00
clock.h ALSA: usb-audio: UAC2: do clock validity check earlier 2013-04-04 08:30:59 +02:00
debug.h ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not set 2011-05-18 11:44:35 +02:00
endpoint.c ALSA: usb-audio: Improve frames size computation 2020-06-30 15:38:23 -04:00
endpoint.h ALSA: usb-audio: Improve frames size computation 2020-06-30 15:38:23 -04:00
format.c ALSA: usb-audio: Filter out unsupported sample rates on Focusrite devices 2020-05-02 17:23:11 +02:00
format.h ALSA: usb-audio: store protocol version in struct audioformat 2013-06-27 21:59:47 +02:00
helper.c ALSA: usb-audio: correct speed checking 2016-05-08 11:42:04 +02:00
helper.h ALSA: usb-audio: increase control transfer timeout 2011-09-27 09:21:48 +02:00
Kconfig [media] Revert "[media] sound/usb: Use Media Controller API to share media resources" 2016-03-31 15:02:33 -03:00
Makefile [media] Revert "[media] sound/usb: Use Media Controller API to share media resources" 2016-03-31 15:02:33 -03:00
midi.c ALSA: usb-midi: correct speed checking 2016-05-08 11:42:30 +02:00
midi.h ALSA: usb-audio: Refer to chip->usb_id for quirks and MIDI creation 2016-01-29 07:36:10 +01:00
mixer.c ALSA: usb-audio: Fix OOB access of mixer element list 2020-06-30 15:38:41 -04:00
mixer.h ALSA: usb-audio: Fix OOB access of mixer element list 2020-06-30 15:38:41 -04:00
mixer_maps.c ALSA: usb-audio: Add mixer workaround for TRX40 and co 2020-04-24 07:58:51 +02:00
mixer_quirks.c ALSA: usb-audio: Fix OOB access of mixer element list 2020-06-30 15:38:41 -04:00
mixer_quirks.h ALSA: usb-audio: Add a more accurate volume quirk for AudioQuest DragonFly 2015-12-14 10:13:17 +01:00
mixer_scarlett.c ALSA: usb-audio: Clean up mixer element list traverse 2020-06-30 15:38:41 -04:00
mixer_scarlett.h ALSA: usb-audio: Scarlett mixer interface for 6i6, 18i6, 18i8 and 18i20 2014-11-13 07:32:39 +01:00
pcm.c ALSA: usb-audio: Improve frames size computation 2020-06-30 15:38:23 -04:00
pcm.h ALSA: usb: refine delay information with USB frame counter 2011-09-12 10:30:20 +02:00
power.h ALSA: usbaudio: implement USB autosuspend 2011-03-11 14:59:29 +01:00
proc.c ALSA: usb-audio: Avoid nested autoresume calls 2015-08-26 15:38:25 +02:00
proc.h
quirks-table.h ALSA: usb-audio: update quirk for B&W PX to remove microphone 2020-01-29 10:24:02 +01:00
quirks.c ALSA: usb-audio: add quirk for Denon DCD-1500RE 2020-06-30 15:38:40 -04:00
quirks.h ALSA: usb-audio: Refer to chip->usb_id for quirks and MIDI creation 2016-01-29 07:36:10 +01:00
stream.c media fixes for v4.6-rc2 2016-04-05 06:47:50 -07:00
stream.h ALSA: snd-usb: re-order code 2011-09-14 17:07:02 +02:00
usbaudio.h ALSA: usb-audio: Fix inconsistent card PM state after resume 2020-06-20 10:24:09 +02:00