summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-12-23 20:45:57 +0300
committerTakashi Iwai <tiwai@suse.de>2020-12-23 20:46:54 +0300
commitc06ccf3ebb7503706ea49fd248e709287ef385a3 (patch)
tree031d0d16bba3f78694debe0289575cafd0a2abd4 /sound/core
parentc1e8952395c1f44a6304c71401519d19ed2ac56a (diff)
downloadlinux-c06ccf3ebb7503706ea49fd248e709287ef385a3.tar.xz
ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks
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>
Diffstat (limited to 'sound/core')
0 files changed, 0 insertions, 0 deletions