usb 5-1: USB disconnect, device number 2 dummy_hcd dummy_hcd.0: stopped dummy_hcd dummy_hcd.0: USB bus 5 deregistered Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 UID: 0 PID: 5521 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:set_link_state+0x27/0x11f0 drivers/usb/gadget/udc/dummy_hcd.c:436 Code: 90 90 90 55 41 57 41 56 41 55 41 54 53 48 83 ec 50 49 89 fe 48 bb 00 00 00 00 00 fc ff df e8 e0 76 0e fa 4c 89 f0 48 c1 e8 03 <80> 3c 18 00 74 08 4c 89 f7 e8 4b a3 7d fa 4d 8b 26 4c 89 74 24 10 RSP: 0018:ffffc90003937768 EFLAGS: 00010046 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff8880006e2540 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52000726eec R12: 0000000000000246 R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88808c546000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00003700a8b3f350 CR3: 0000000011d76000 CR4: 0000000000352ef0 Call Trace: dummy_pullup+0xc4/0x120 drivers/usb/gadget/udc/dummy_hcd.c:915 usb_gadget_disconnect_locked+0x126/0x480 drivers/usb/gadget/udc/core.c:785 gadget_unbind_driver+0xc2/0x410 drivers/usb/gadget/udc/core.c:1718 device_remove drivers/base/dd.c:616 [inline] __device_release_driver drivers/base/dd.c:1349 [inline] device_release_driver_internal+0x48b/0x880 drivers/base/dd.c:1372 driver_detach+0x1f3/0x2d0 drivers/base/dd.c:1435 bus_remove_driver+0x226/0x320 drivers/base/bus.c:832 usb_gadget_unregister_driver+0x4e/0x70 drivers/usb/gadget/udc/core.c:1784 raw_release+0xd7/0x260 drivers/usb/gadget/legacy/raw_gadget.c:463 __fput+0x418/0xa50 fs/file_table.c:512 task_work_run+0x1d9/0x270 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x73a/0x2360 kernel/exit.c:1009 do_group_exit+0x22d/0x2f0 kernel/exit.c:1152 get_signal+0x121b/0x12c0 kernel/signal.c:3046 arch_do_signal_or_restart+0xbb/0x860 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline] exit_to_user_mode_loop+0x104/0x730 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline] do_syscall_64+0x353/0x580 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc6c8d9de99 Code: Unable to access opcode bytes at 0x7fc6c8d9de6f. RSP: 002b:00007fc6c9c940e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007fc6c9025fa8 RCX: 00007fc6c8d9de99 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fc6c9025fa8 RBP: 00007fc6c9025fa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc6c9026038 R14: 00007ffe57e628d0 R15: 00007ffe57e629b8 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:set_link_state+0x27/0x11f0 drivers/usb/gadget/udc/dummy_hcd.c:436 Code: 90 90 90 55 41 57 41 56 41 55 41 54 53 48 83 ec 50 49 89 fe 48 bb 00 00 00 00 00 fc ff df e8 e0 76 0e fa 4c 89 f0 48 c1 e8 03 <80> 3c 18 00 74 08 4c 89 f7 e8 4b a3 7d fa 4d 8b 26 4c 89 74 24 10 RSP: 0018:ffffc90003937768 EFLAGS: 00010046 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff8880006e2540 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52000726eec R12: 0000000000000246 R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88808c546000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00003700a8b3f350 CR3: 0000000011d76000 CR4: 0000000000352ef0 ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 55 push %rbp 4: 41 57 push %r15 6: 41 56 push %r14 8: 41 55 push %r13 a: 41 54 push %r12 c: 53 push %rbx d: 48 83 ec 50 sub $0x50,%rsp 11: 49 89 fe mov %rdi,%r14 14: 48 bb 00 00 00 00 00 movabs $0xdffffc0000000000,%rbx 1b: fc ff df 1e: e8 e0 76 0e fa call 0xfa0e7703 23: 4c 89 f0 mov %r14,%rax 26: 48 c1 e8 03 shr $0x3,%rax * 2a: 80 3c 18 00 cmpb $0x0,(%rax,%rbx,1) <-- trapping instruction 2e: 74 08 je 0x38 30: 4c 89 f7 mov %r14,%rdi 33: e8 4b a3 7d fa call 0xfa7da383 38: 4d 8b 26 mov (%r14),%r12 3b: 4c 89 74 24 10 mov %r14,0x10(%rsp)