general protection fault, probably for non-canonical address 0xdffffc00000000e6: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000730-0x0000000000000737] CPU: 1 PID: 5979 Comm: syz.0.26 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 RIP: 0010:f_midi2_free_ep_reqs drivers/usb/gadget/function/f_midi2.c:1166 [inline] RIP: 0010:f_midi2_free_ep+0x52/0x2e0 drivers/usb/gadget/function/f_midi2.c:1209 Code: 4c 89 f0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 f7 e8 73 dc 0a fb 41 bc 30 07 00 00 4d 03 26 4c 89 e0 48 c1 e8 03 48 89 44 24 30 <0f> b6 04 28 84 c0 0f 85 50 02 00 00 41 8b 1c 24 31 ff 89 de e8 85 RSP: 0018:ffffc9000516f768 EFLAGS: 00010202 RAX: 00000000000000e6 RBX: ffff888023fa8000 RCX: 0000000000080000 RDX: ffffc9000cf62000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: dffffc0000000000 R08: ffffffff911eb61f R09: 1ffffffff223d6c3 R10: dffffc0000000000 R11: fffffbfff223d6c4 R12: 0000000000000730 R13: dffffc0000000000 R14: ffff888023fa8128 R15: dffffc0000000000 FS: 00007fa23e9d96c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f046d7fb000 CR3: 000000007c046000 CR4: 00000000003506e0 Call Trace: f_midi2_unbind+0x9b/0x330 drivers/usb/gadget/function/f_midi2.c:2069 purge_configs_funcs+0x241/0x3a0 drivers/usb/gadget/configfs.c:1597 configfs_composite_bind+0x1075/0x13f0 drivers/usb/gadget/configfs.c:1822 gadget_bind_driver+0x2b3/0x770 drivers/usb/gadget/udc/core.c:1651 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x247/0xae0 drivers/base/dd.c:717 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:879 driver_probe_device+0x4f/0x420 drivers/base/dd.c:909 __driver_attach+0x444/0x6d0 drivers/base/dd.c:1295 bus_for_each_dev+0x235/0x2b0 drivers/base/bus.c:370 bus_add_driver+0x340/0x630 drivers/base/bus.c:723 driver_register+0x23a/0x310 drivers/base/driver.c:246 usb_gadget_register_driver_owner+0xf9/0x270 drivers/usb/gadget/udc/core.c:1730 gadget_dev_desc_UDC_store+0x1c7/0x2e0 drivers/usb/gadget/configfs.c:300 flush_write_buffer fs/configfs/file.c:207 [inline] configfs_write_iter+0x312/0x400 fs/configfs/file.c:229 ---------------- Code disassembly (best guess): 0: 4c 89 f0 mov %r14,%rax 3: 48 c1 e8 03 shr $0x3,%rax 7: 80 3c 28 00 cmpb $0x0,(%rax,%rbp,1) b: 74 08 je 0x15 d: 4c 89 f7 mov %r14,%rdi 10: e8 73 dc 0a fb call 0xfb0adc88 15: 41 bc 30 07 00 00 mov $0x730,%r12d 1b: 4d 03 26 add (%r14),%r12 1e: 4c 89 e0 mov %r12,%rax 21: 48 c1 e8 03 shr $0x3,%rax 25: 48 89 44 24 30 mov %rax,0x30(%rsp) * 2a: 0f b6 04 28 movzbl (%rax,%rbp,1),%eax <-- trapping instruction 2e: 84 c0 test %al,%al 30: 0f 85 50 02 00 00 jne 0x286 36: 41 8b 1c 24 mov (%r12),%ebx 3a: 31 ff xor %edi,%edi 3c: 89 de mov %ebx,%esi 3e: e8 .byte 0xe8 3f: 85 .byte 0x85