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: 5330 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 80 54 0e fa 4c 89 f0 48 c1 e8 03 <80> 3c 18 00 74 08 4c 89 f7 e8 4b 82 7d fa 49 8b 16 4d 8d a6 a3 00 RSP: 0018:ffffc9000e67fb20 EFLAGS: 00010046 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff888037058000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52001ccff60 R12: 0000000000000246 R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 000055556813f540(0000) GS:ffff88808c543000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000559a3f9e33e0 CR3: 0000000012808000 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 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:70 [inline] exit_to_user_mode_loop+0x1fa/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:0x7f601c39de99 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd8d02f518 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007f601c627da0 RCX: 00007f601c39de99 RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 RBP: 00007f601c627da0 R08: 00007f601c626038 R09: 0000000000000000 R10: 0000000000ddb768 R11: 0000000000000246 R12: 00000000000177c1 R13: 00007f601c62609c R14: 0000000000016c39 R15: 00007f601c626090 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 80 54 0e fa 4c 89 f0 48 c1 e8 03 <80> 3c 18 00 74 08 4c 89 f7 e8 4b 82 7d fa 49 8b 16 4d 8d a6 a3 00 RSP: 0018:ffffc9000e67fb20 EFLAGS: 00010046 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: ffff888037058000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52001ccff60 R12: 0000000000000246 R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 000055556813f540(0000) GS:ffff88808c543000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000559a3f9e33e0 CR3: 0000000012808000 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 80 54 0e fa call 0xfa0e54a3 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 82 7d fa call 0xfa7d8283 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