Oops: general protection fault, probably for non-canonical address 0xdffffc00000000e6: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000730-0x0000000000000737] CPU: 2 UID: 0 PID: 8956 Comm: syz.3.825 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:f_midi2_free_ep_reqs+0x56/0x2b0 drivers/usb/gadget/function/f_midi2.c:1166 Code: 85 6a 02 00 00 49 8b 45 00 48 89 44 24 18 48 05 30 07 00 00 48 89 c2 48 89 44 24 20 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e b5 01 00 00 48 8b 44 24 18 31 RSP: 0018:ffffc900006589d8 EFLAGS: 00010002 RAX: dffffc0000000000 RBX: ffff88802bc80000 RCX: 0000000000000103 RDX: 00000000000000e6 RSI: ffffffff87f53a76 RDI: ffff88802bc80128 RBP: ffff88802bc80128 R08: 0000000000000004 R09: 0000000000000020 R10: 0000000000000020 R11: 0000000000000001 R12: ffff88802bc800f0 R13: ffff88802bc80128 R14: ffff88802bc80740 R15: 0000000000000001 FS: 000055558d957500(0000) GS:ffff8880d5d60000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f20a3beb840 CR3: 000000005bd0d000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000001800 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Call Trace: f_midi2_stop_eps drivers/usb/gadget/function/f_midi2.c:1246 [inline] f_midi2_set_alt+0x444/0x5f0 drivers/usb/gadget/function/f_midi2.c:1296 composite_setup+0x16f8/0x9290 drivers/usb/gadget/composite.c:1933 configfs_composite_setup+0xfb/0x130 drivers/usb/gadget/configfs.c:1877 dummy_timer+0x2039/0x3700 drivers/usb/gadget/udc/dummy_hcd.c:1951 __run_hrtimer kernel/time/hrtimer.c:2067 [inline] __hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2124 hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2141 handle_softirqs+0x1e6/0x9d0 kernel/softirq.c:645 __do_softirq kernel/softirq.c:679 [inline] invoke_softirq kernel/softirq.c:519 [inline] __irq_exit_rcu+0x194/0x210 kernel/softirq.c:767 irq_exit_rcu+0x9/0x30 kernel/softirq.c:784 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0010:finish_task_switch.isra.0+0x2ca/0x10d0 kernel/sched/core.c:5371 Code: b6 0a 00 00 41 c7 87 20 0e 00 00 00 00 00 00 0f 1f 44 00 00 49 8d 7f 48 e8 e3 88 fb 09 e8 1e 0e 3d 00 fb 48 8d bb 10 17 00 00 <48> b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 04 02 84 RSP: 0018:ffffc90003227a80 EFLAGS: 00000202 RAX: 00000000000015e9 RBX: ffff88802b680000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffff8e3eb72f RDI: ffff88802b681710 RBP: ffffc90003227ad8 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffff888029bd0000 R13: 0000000000000000 R14: ffffffff91453504 R15: ffff88806a63bf00 context_switch kernel/sched/core.c:5523 [inline] __schedule+0x1261/0x6920 kernel/sched/core.c:7270 __schedule_loop kernel/sched/core.c:7347 [inline] schedule+0xdd/0x2c0 kernel/sched/core.c:7362 do_nanosleep+0x113/0x500 kernel/time/hrtimer.c:2429 hrtimer_nanosleep+0x14f/0x350 kernel/time/hrtimer.c:2475 common_nsleep+0xa1/0xd0 kernel/time/posix-timers.c:1360 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1406 [inline] __se_sys_clock_nanosleep kernel/time/posix-timers.c:1383 [inline] __x64_sys_clock_nanosleep+0x336/0x480 kernel/time/posix-timers.c:1383 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7e0775e98e Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08 RSP: 002b:00007fff2c22ef88 EFLAGS: 00000246 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 000055558d957500 RCX: 00007f7e0775e98e RDX: 00007fff2c22efe0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f7e07a27da0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000023061 R13: 00007f7e07a2609c R14: 0000000000022dba R15: 00007f7e07a26090 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:f_midi2_free_ep_reqs+0x56/0x2b0 drivers/usb/gadget/function/f_midi2.c:1166 Code: 85 6a 02 00 00 49 8b 45 00 48 89 44 24 18 48 05 30 07 00 00 48 89 c2 48 89 44 24 20 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e b5 01 00 00 48 8b 44 24 18 31 RSP: 0018:ffffc900006589d8 EFLAGS: 00010002 RAX: dffffc0000000000 RBX: ffff88802bc80000 RCX: 0000000000000103 RDX: 00000000000000e6 RSI: ffffffff87f53a76 RDI: ffff88802bc80128 RBP: ffff88802bc80128 R08: 0000000000000004 R09: 0000000000000020 R10: 0000000000000020 R11: 0000000000000001 R12: ffff88802bc800f0 R13: ffff88802bc80128 R14: ffff88802bc80740 R15: 0000000000000001 FS: 000055558d957500(0000) GS:ffff8880d5d60000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f20a3beb840 CR3: 000000005bd0d000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000001800 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 85 6a 02 test %ebp,0x2(%rdx) 3: 00 00 add %al,(%rax) 5: 49 8b 45 00 mov 0x0(%r13),%rax 9: 48 89 44 24 18 mov %rax,0x18(%rsp) e: 48 05 30 07 00 00 add $0x730,%rax 14: 48 89 c2 mov %rax,%rdx 17: 48 89 44 24 20 mov %rax,0x20(%rsp) 1c: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 23: fc ff df 26: 48 c1 ea 03 shr $0x3,%rdx * 2a: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax <-- trapping instruction 2e: 84 c0 test %al,%al 30: 74 08 je 0x3a 32: 3c 03 cmp $0x3,%al 34: 0f 8e b5 01 00 00 jle 0x1ef 3a: 48 8b 44 24 18 mov 0x18(%rsp),%rax 3f: 31 .byte 0x31