linux/sound/usb
Takashi Iwai 77a804dd6b ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks
commit c06ccf3ebb7503706ea49fd248e709287ef385a3 upstream.

The calculation of in_cables and out_cables bitmaps are done with the
bit shift by the value from the descriptor, which is an arbitrary
value, and can lead to UBSAN shift-out-of-bounds warnings.

Fix it by filtering the bad descriptor values with the check of the
upper bound 0x10 (the cable bitmaps are 16 bits).

Reported-by: syzbot+92e45ae45543f89e8c88@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201223174557.10249-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:16:20 +01:00
..
6fire
bcd2000
caiaq
hiface
line6 ALSA: line6: Sync the pending work cancel at disconnection 2020-07-22 09:33:08 +02:00
misc
usx2y
card.c
card.h ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109 2020-08-19 08:16:24 +02:00
clock.c ALSA: usb-audio: Disable sample read check if firmware doesn't give back 2020-12-30 11:51:34 +01:00
clock.h
debug.h
endpoint.c
endpoint.h
format.c ALSA: usb-audio: Fix potential out-of-bounds shift 2020-12-21 13:27:05 +01:00
format.h
helper.c
helper.h
Kconfig
Makefile
media.c
media.h
midi.c ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks 2021-01-12 20:16:20 +01:00
midi.h
mixer_maps.c
mixer_quirks.c ALSA: usb-audio: Creative USB X-Fi Pro SB1095 volume knob support 2020-08-19 08:16:24 +02:00
mixer_quirks.h
mixer_scarlett_gen2.c
mixer_scarlett_gen2.h
mixer_scarlett.c
mixer_scarlett.h
mixer_us16x08.c ALSA: usb-audio: US16x08: fix value count for level meters 2020-12-08 10:40:27 +01:00
mixer_us16x08.h
mixer.c ALSA: usb-audio: Don't create a mixer element with bogus volume range 2020-10-01 13:17:34 +02:00
mixer.h
pcm.c ALSA: usb-audio: Add implicit feedback quirk for MODX 2020-11-10 12:37:27 +01:00
pcm.h
power.c
power.h
proc.c
proc.h
quirks-table.h ALSA: usb-audio: Update documentation comment for MS2109 quirk 2020-09-03 11:27:11 +02:00
quirks.c ALSA: usb-audio: Add VID to support native DSD reproduction on FiiO devices 2020-12-30 11:51:34 +01:00
quirks.h
stream.c ALSA: usb-audio: Fix control 'access overflow' errors from chmap 2020-12-21 13:27:05 +01:00
stream.h
usbaudio.h
validate.c