syzbot


UBSAN: shift-out-of-bounds in snd_usbmidi_get_ms_info

Status: fixed on 2021/03/10 01:48
Subsystems: alsa usb
[Documentation on labels]
Reported-by: syzbot+92e45ae45543f89e8c88@syzkaller.appspotmail.com
Fix commit: c06ccf3ebb75 ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks
First crash: 1276d, last: 1252d
Cause bisection: failed (error log, bisect log)
  
Discussions (7)
Title Replies (including bot) Last reply
[PATCH 4.19 00/77] 4.19.167-rc1 review 87 (87) 2021/01/14 01:43
[PATCH 4.4 00/38] 4.4.251-rc1 review 43 (43) 2021/01/12 09:04
[PATCH 4.9 00/45] 4.9.251-rc1 review 49 (49) 2021/01/12 08:16
[PATCH 4.14 00/57] 4.14.215-rc1 review 60 (60) 2021/01/12 07:36
[PATCH 5.4 00/92] 5.4.89-rc1 review 96 (96) 2021/01/12 06:54
[PATCH 5.10 000/145] 5.10.7-rc1 review 152 (152) 2021/01/11 19:59
UBSAN: shift-out-of-bounds in snd_usbmidi_get_ms_info 0 (1) 2020/12/22 22:38

Sample crash report:
usb 1-1: config 0 interface 0 altsetting 0 bulk endpoint 0x8A has invalid maxpacket 31
usb 1-1: New USB device found, idVendor=324b, idProduct=5963, bcdDevice= 0.d2
usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 1-1: config 0 descriptor??
usb 1-1: MIDIStreaming interface descriptor not found
================================================================================
UBSAN: shift-out-of-bounds in sound/usb/midi.c:1928:8
shift exponent 244 is too large for 32-bit type 'int'
CPU: 1 PID: 17 Comm: kworker/1:0 Not tainted 5.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: usb_hub_wq hub_event
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x107/0x163 lib/dump_stack.c:120
 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395
 snd_usbmidi_get_ms_info.cold+0x83/0xd4 sound/usb/midi.c:1928
 __snd_usbmidi_create+0x380/0x2320 sound/usb/midi.c:2404
 snd_usb_create_quirk+0xa5/0xe0 sound/usb/quirks.c:562
 usb_audio_probe+0x623/0x2ab0 sound/usb/card.c:795

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/22 22:37 upstream 8653b778e454 04201c06 .config console log report syz C ci-upstream-kasan-gce
2020/12/22 23:04 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 3644e2d2dda7 04201c06 .config console log report syz C ci2-upstream-usb
2020/12/22 22:24 upstream 8653b778e454 04201c06 .config console log report info ci-upstream-kasan-gce
2020/12/21 22:20 upstream e37b12e4bb21 04201c06 .config console log report info ci-upstream-kasan-gce
2020/12/18 15:42 upstream d64c6f96ba86 04201c06 .config console log report info ci-upstream-kasan-gce
2021/01/11 07:41 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 841081d89d5a 2c1f2513 .config console log report info ci2-upstream-usb
2021/01/10 16:09 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 841081d89d5a 2c1f2513 .config console log report info ci2-upstream-usb
2020/12/26 16:05 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 3644e2d2dda7 821e0b09 .config console log report info ci2-upstream-usb
2020/12/24 20:44 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing 3644e2d2dda7 c2c1d1dd .config console log report info ci2-upstream-usb
* Struck through repros no longer work on HEAD.