configfs-gadget.g1 gadget.0: Error: no playback and capture channels general protection fault, probably for non-canonical address 0xdffffc00000000e6: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000730-0x0000000000000737] CPU: 0 PID: 11663 Comm: syz.0.822 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 43 f9 08 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 45 RSP: 0018:ffffc9000423f768 EFLAGS: 00010202 RAX: 00000000000000e6 RBX: ffff8880637a8000 RCX: 0000000000080000 RDX: ffffc9000dd5e000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: dffffc0000000000 R08: ffffffff911ef687 R09: 1ffffffff223ded0 R10: dffffc0000000000 R11: fffffbfff223ded1 R12: 0000000000000730 R13: dffffc0000000000 R14: ffff8880637a8128 R15: dffffc0000000000 FS: 00007f5e662156c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005603a7221650 CR3: 00000000752da000 CR4: 00000000003506f0 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 call_write_iter include/linux/fs.h:2018 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x474/0x9a0 fs/read_write.c:584 ksys_write+0x151/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f5e6539e159 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:00007f5e66215028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f5e65625fa0 RCX: 00007f5e6539e159 RDX: 000000000000000b RSI: 0000200000000340 RDI: 0000000000000005 RBP: 00007f5e65435024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5e65626038 R14: 00007f5e65625fa0 R15: 00007ffd27a45aa8 Modules linked in: ---[ end trace 0000000000000000 ]--- 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 43 f9 08 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 45 RSP: 0018:ffffc9000423f768 EFLAGS: 00010202 RAX: 00000000000000e6 RBX: ffff8880637a8000 RCX: 0000000000080000 RDX: ffffc9000dd5e000 RSI: 000000000007ffff RDI: 0000000000080000 RBP: dffffc0000000000 R08: ffffffff911ef687 R09: 1ffffffff223ded0 R10: dffffc0000000000 R11: fffffbfff223ded1 R12: 0000000000000730 R13: dffffc0000000000 R14: ffff8880637a8128 R15: dffffc0000000000 FS: 00007f5e662156c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005636541f4950 CR3: 00000000752da000 CR4: 00000000003506f0 ---------------- 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 43 f9 08 fb call 0xfb08f958 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: 45 rex.RB