dummy_hcd dummy_hcd.0: remove, state 1 usb usb5: USB disconnect, device number 1 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: 5329 Comm: syz.0.0 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/0x1000 drivers/usb/gadget/udc/dummy_hcd.c:455 Code: 90 90 90 55 41 57 41 56 41 55 41 54 53 48 83 ec 38 49 89 fe 48 bb 00 00 00 00 00 fc ff df e8 30 3b 0e fa 4c 89 f0 48 c1 e8 03 <80> 3c 18 00 74 08 4c 89 f7 e8 bb 6d 7d fa 49 8b 16 4d 8d a6 a3 00 RSP: 0018:ffffc9000e237780 EFLAGS: 00010046 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff88803f122540 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52001c46eec R12: 0000000000000246 R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88808c53f000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2e874c10c0 CR3: 00000000508e8000 CR4: 0000000000352ef0 Call Trace: dummy_pullup+0xc4/0x120 drivers/usb/gadget/udc/dummy_hcd.c:933 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:0x7f1bf979e019 Code: Unable to access opcode bytes at 0x7f1bf979dfef. RSP: 002b:00007f1bfa645fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: 000000000000000b RBX: 00007f1bf9a25fa0 RCX: 00007f1bf979e019 RDX: 000000000000000b RSI: 0000200000000200 RDI: 0000000000000005 RBP: 00007f1bf983500c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1bf9a26038 R14: 00007f1bf9a25fa0 R15: 00007ffcb6a24c78 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:set_link_state+0x27/0x1000 drivers/usb/gadget/udc/dummy_hcd.c:455 Code: 90 90 90 55 41 57 41 56 41 55 41 54 53 48 83 ec 38 49 89 fe 48 bb 00 00 00 00 00 fc ff df e8 30 3b 0e fa 4c 89 f0 48 c1 e8 03 <80> 3c 18 00 74 08 4c 89 f7 e8 bb 6d 7d fa 49 8b 16 4d 8d a6 a3 00 RSP: 0018:ffffc9000e237780 EFLAGS: 00010046 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff88803f122540 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52001c46eec R12: 0000000000000246 R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88808c53f000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2e874c10c0 CR3: 00000000508e8000 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 38 sub $0x38,%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 30 3b 0e fa call 0xfa0e3b53 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 bb 6d 7d fa call 0xfa7d6df3 38: 49 8b 16 mov (%r14),%rdx 3b: 4d rex.WRB 3c: 8d .byte 0x8d 3d: a6 cmpsb %es:(%rdi),%ds:(%rsi) 3e: a3 .byte 0xa3