syzbot
general protection fault in usb_find_alt_setting (2)
Status:
fixed on 2018/10/11 14:33
Subsystems:
usb
[Documentation on labels]
Reported-by: syzbot+19c3aaef85a89d451eac@syzkaller.appspotmail.com
Fix commit:
c9a4cb204e9e
USB: handle NULL config in usb_find_alt_setting()
First crash: 2895d, last: 2869d
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
* Struck through repros no longer work on HEAD.