syzbot


general protection fault in usb_find_alt_setting (2)

Status: fixed on 2018/10/11 14:33
Reported-by: syzbot+19c3aaef85a89d451eac@syzkaller.appspotmail.com
Fix commit: c9a4cb204e9e USB: handle NULL config in usb_find_alt_setting()
First crash: 1400d, last: 1374d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in usb_find_alt_setting 779 1686d 1691d 0/22 closed as invalid on 2018/05/11 17:39

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
usb usb1: usbfs: interface 0 claimed by hub while 'syz-executor251' sets config #0
usb usb1: usbfs: process 4663 (syz-executor251) did not claim interface 0 before use
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
CPU: 1 PID: 4664 Comm: syz-executor251 Not tainted 4.19.0-rc1+ #215
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:usb_find_alt_setting+0x38/0x310 drivers/usb/core/usb.c:231
Code: 89 fb 48 83 ec 10 48 89 7d c8 89 55 d4 89 75 d0 e8 bd 0e 0b fd 48 8d 7b 04 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 86 02 00 00
RSP: 0018:ffff8801c7ec74a8 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8476da79
RDX: 0000000000000000 RSI: ffffffff8471b1c3 RDI: 0000000000000004
RBP: ffff8801c7ec74e0 R08: ffff8801b7774480 R09: ffffed0038fd8eb2
R10: ffffed0038fd8eb4 R11: ffff8801c7ec75a7 R12: 0000000000000000
R13: ffff8801ce45c3c0 R14: ffff8801b8573300 R15: 0000000000000000
FS:  0000000000b12880(0000) GS:ffff8801db100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000006cf090 CR3: 00000001b8372000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 check_ctrlrecip+0x1e6/0x320 drivers/usb/core/devio.c:828
 proc_control+0x151/0xef0 drivers/usb/core/devio.c:1074
 usbdev_do_ioctl+0x1eb4/0x3b30 drivers/usb/core/devio.c:2394
 usbdev_ioctl+0x25/0x30 drivers/usb/core/devio.c:2551
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0x1de/0x1720 fs/ioctl.c:685
 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:702
 __do_sys_ioctl fs/ioctl.c:709 [inline]
 __se_sys_ioctl fs/ioctl.c:707 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:707
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x444b19
Code: e8 0c ad 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 0f 83 db ce fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffdd23618a8 EFLAGS: 00000217 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444b19
RDX: 0000000020000280 RSI: 00000000c0185500 RDI: 0000000000000005
RBP: 0000000000000000 R08: 00000000004002e0 R09: 00000000004002e0
R10: 000000000000000f R11: 0000000000000217 R12: 00000000000088bb
R13: 0000000000401f10 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
Dumping ftrace buffer:
   (ftrace buffer empty)
---[ end trace 0e42f9dce4a55e7c ]---
RIP: 0010:usb_find_alt_setting+0x38/0x310 drivers/usb/core/usb.c:231
Code: 89 fb 48 83 ec 10 48 89 7d c8 89 55 d4 89 75 d0 e8 bd 0e 0b fd 48 8d 7b 04 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 48 89 fa 83 e2 07 38 d0 7f 08 84 c0 0f 85 86 02 00 00
RSP: 0018:ffff8801c7ec74a8 EFLAGS: 00010247
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8476da79
RDX: 0000000000000000 RSI: ffffffff8471b1c3 RDI: 0000000000000004
RBP: ffff8801c7ec74e0 R08: ffff8801b7774480 R09: ffffed0038fd8eb2
R10: ffffed0038fd8eb4 R11: ffff8801c7ec75a7 R12: 0000000000000000
R13: ffff8801ce45c3c0 R14: ffff8801b8573300 R15: 0000000000000000
FS:  0000000000b12880(0000) GS:ffff8801db100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000006cf090 CR3: 00000001b8372000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (53):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2018/08/30 20:49 upstream 58c3f14f86c9 938220fd .config log report syz C
ci-upstream-kasan-gce 2018/08/30 19:05 upstream 58c3f14f86c9 938220fd .config log report syz C
ci-upstream-kasan-gce-386 2018/08/30 20:21 upstream 58c3f14f86c9 938220fd .config log report syz C
ci-upstream-linux-next-kasan-gce-root 2018/08/31 02:35 linux-next 3d18c2437944 938220fd .config log report syz C
ci-upstream-kasan-gce 2018/09/25 15:35 upstream 2dd68cc7fd8c 0e7547d7 .config log report
ci-upstream-kasan-gce-selinux-root 2018/09/24 22:42 upstream 02214bfc89c7 2f485cdf .config log report
ci-upstream-kasan-gce-root 2018/09/23 15:28 upstream 328c6333ba3d 37079712 .config log report
ci-upstream-kasan-gce 2018/09/23 10:09 upstream 328c6333ba3d 37079712 .config log report
ci-upstream-kasan-gce-root 2018/09/22 04:57 upstream 10dc890d4228 37079712 .config log report
ci-upstream-kasan-gce-smack-root 2018/09/22 00:22 upstream 10dc890d4228 37079712 .config log report
ci-upstream-kasan-gce-selinux-root 2018/09/21 15:13 upstream 234b69e3e089 37079712 .config log report
ci-upstream-kasan-gce-smack-root 2018/09/20 15:39 upstream eb9a29f9e585 565a5452 .config log report
ci-upstream-kasan-gce-smack-root 2018/09/08 09:11 upstream 3d0e7a9e00fd 6b5120a4 .config log report
ci-upstream-kasan-gce-smack-root 2018/09/07 20:51 upstream a49a9dcce802 69cfeb80 .config log report
ci-upstream-kasan-gce-root 2018/09/07 03:08 upstream ca16eb342ebe e30d3b52 .config log report
ci-upstream-kasan-gce 2018/09/06 16:29 upstream b36fdc6853a3 0bb7a7eb .config log report
ci-upstream-kasan-gce-root 2018/09/06 01:34 upstream b36fdc6853a3 873745f2 .config log report
ci-upstream-kasan-gce 2018/09/05 16:01 upstream 28619527b8a7 196410e4 .config log report
ci-upstream-kasan-gce-root 2018/09/05 15:59 upstream 28619527b8a7 196410e4 .config log report
ci-upstream-kasan-gce-root 2018/09/05 15:58 upstream 28619527b8a7 196410e4 .config log report
ci-upstream-kasan-gce 2018/09/05 03:52 upstream 28619527b8a7 a4718693 .config log report
ci-upstream-kasan-gce-root 2018/09/05 01:12 upstream 28619527b8a7 a4718693 .config log report
ci-upstream-kasan-gce-root 2018/09/04 02:24 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-kasan-gce 2018/09/04 02:21 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-kasan-gce-root 2018/09/03 21:32 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-kasan-gce 2018/09/03 21:30 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-kasan-gce-root 2018/09/03 21:26 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-kasan-gce 2018/09/03 15:24 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-kasan-gce 2018/09/03 12:43 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-kasan-gce 2018/09/03 07:46 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-kasan-gce-root 2018/09/02 17:43 upstream 360bd62dc494 a4718693 .config log report
ci-upstream-kasan-gce-root 2018/09/02 00:19 upstream 360bd62dc494 a4718693 .config log report
ci-upstream-kasan-gce 2018/08/30 16:52 upstream 58c3f14f86c9 938220fd .config log report
ci-upstream-kasan-gce-386 2018/09/19 09:52 upstream eba2d6b34a32 7f125108 .config log report
ci-upstream-kasan-gce-386 2018/09/15 18:03 upstream 3a5af36b6d0e a343a400 .config log report
ci-upstream-kasan-gce-386 2018/09/08 04:46 upstream 3d0e7a9e00fd 6b5120a4 .config log report
ci-upstream-kasan-gce-386 2018/09/07 08:24 upstream ca16eb342ebe e30d3b52 .config log report
ci-upstream-kasan-gce-386 2018/09/06 21:22 upstream b36fdc6853a3 0bb7a7eb .config log report
ci-upstream-kasan-gce-386 2018/09/06 04:18 upstream b36fdc6853a3 873745f2 .config log report
ci-upstream-kasan-gce-386 2018/09/04 08:58 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-kasan-gce-386 2018/09/03 16:13 upstream 60c1f89241d4 a4718693 .config log report
ci-upstream-linux-next-kasan-gce-root 2018/09/07 14:51 linux-next f2b6e66e9885 69cfeb80 .config log report
ci-upstream-linux-next-kasan-gce-root 2018/09/07 02:34 linux-next f2b6e66e9885 e30d3b52 .config log report
ci-upstream-linux-next-kasan-gce-root 2018/09/06 05:05 linux-next f2b6e66e9885 873745f2 .config log report
ci-upstream-linux-next-kasan-gce-root 2018/09/06 03:36 linux-next f2b6e66e9885 873745f2 .config log report
ci-upstream-linux-next-kasan-gce-root 2018/09/05 16:00 linux-next f2b6e66e9885 196410e4 .config log report
ci-upstream-linux-next-kasan-gce-root 2018/09/03 05:54 linux-next dceb9092b16b a4718693 .config log report