diff options
| author | Takashi Iwai <tiwai@suse.de> | 2020-12-23 18:45:57 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-12 19:47:56 +0100 |
| commit | 34cf6eedfa7ec0f2f6d4d1bcc9bcdcdb31ab7c9b (patch) | |
| tree | 0ddb1379c4c34e074f34342855ed4f8ea875c572 /include/linux/fpga/fpga-mgr.h | |
| parent | dbe90bed2d5476c1979218003f2c473d673736d7 (diff) | |
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>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
0 files changed, 0 insertions, 0 deletions
