syzbot


WARNING in usbtmc_ioctl/usb_submit_urb

Status: upstream: reported C repro on 2022/03/03 19:29
Reported-by: syzbot+a48e3d1a875240cab5de@syzkaller.appspotmail.com
Fix commit: e9b667a82cdc usb: usbtmc: Fix bug in pipe direction for control transfers
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 121d, last: 121d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: INFO: rcu detected stall in dummy_timer (log)
Repro: C syz .config
Patch testing requests:
Created Duration User Patch Repo Result
2022/03/03 20:30 12m stern@rowland.harvard.edu patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ v5.17-rc4 OK

Sample crash report:
------------[ cut here ]------------
usb 4-1: BOGUS control dir, pipe 80000c80 doesn't match bRequestType 0
WARNING: CPU: 0 PID: 3693 at drivers/usb/core/urb.c:410 usb_submit_urb+0x149d/0x18a0 drivers/usb/core/urb.c:410
Modules linked in:
CPU: 1 PID: 3693 Comm: syz-executor856 Not tainted 5.17.0-rc5-syzkaller-00306-g2293be58d6a1 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:usb_submit_urb+0x149d/0x18a0 drivers/usb/core/urb.c:410
Code: 7c 24 40 e8 15 e1 0e fc 48 8b 7c 24 40 e8 1b fd 07 ff 45 89 e8 44 89 f1 4c 89 e2 48 89 c6 48 c7 c7 00 5f 4b 8a e8 1a 02 9e 03 <0f> 0b e9 a5 ee ff ff e8 e7 e0 0e fc 0f b6 1d 70 b8 15 08 31 ff 41
RSP: 0018:ffffc900029ffb00 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff888019958058 RCX: 0000000000000000
RDX: ffff888077ff9d00 RSI: ffffffff815fe288 RDI: fffff5200053ff52
RBP: ffff888147b48258 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff815f891e R11: 0000000000000000 R12: ffff888144784028
R13: 0000000000000000 R14: 0000000080000c80 R15: ffff888018fbd400
FS:  0000555555b7c300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffff2c561f8 CR3: 000000001aecb000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 usb_start_wait_urb+0x101/0x4c0 drivers/usb/core/message.c:58
 usb_internal_control_msg drivers/usb/core/message.c:102 [inline]
 usb_control_msg+0x31c/0x4a0 drivers/usb/core/message.c:153
 usbtmc_ioctl_request drivers/usb/class/usbtmc.c:1947 [inline]
 usbtmc_ioctl+0x1ac8/0x2580 drivers/usb/class/usbtmc.c:2090
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fada99bfed9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffff2c56218 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 00007fada99bfed9
RDX: 0000000020000140 RSI: 00000000c0105b08 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 000000000000000f R11: 0000000000000246 R12: 00000000000310f0
R13: 00007ffff2c5622c R14: 00007ffff2c56240 R15: 00007ffff2c56230
 </TASK>

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2022/02/27 22:07 upstream 2293be58d6a1 45a13a73 .config log report syz C WARNING in usbtmc_ioctl/usb_submit_urb
ci-upstream-kasan-gce-smack-root 2022/02/27 20:36 upstream 2293be58d6a1 45a13a73 .config log report syz C WARNING in usbtmc_ioctl/usb_submit_urb
ci-upstream-kasan-gce-smack-root 2022/02/27 19:21 upstream 2293be58d6a1 45a13a73 .config log report info WARNING in usbtmc_ioctl/usb_submit_urb