syzbot
general protection fault in f_midi2_free_ep
Status:
upstream: reported C repro on 2026/07/25 17:35
Bug presence:
origin:upstream
[Documentation on labels]
Reported-by: syzbot+aef6eae86ecaed191ece@syzkaller.appspotmail.com
First crash: 12d, last: 2d08h
▶
▼
Bug presence (1)
| Date |
Name |
Commit |
Repro |
Result |
| 2026/08/01 |
upstream (ToT) |
02dc699f83d0 |
C
|
[report] general protection fault in f_midi2_free_ep
|
Sample crash report:
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: 5922 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/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 63 fc 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 65
RSP: 0018:ffffc9000332f9c8 EFLAGS: 00010202
RAX: 00000000000000e6 RBX: ffff888060738000 RCX: ffff8880281bda00
RDX: 0000000000000000 RSI: ffffffff8acacbe0 RDI: ffff888060738128
RBP: dffffc0000000000 R08: ffffffff911eb5f7 R09: 1ffffffff223d6be
R10: dffffc0000000000 R11: fffffbfff223d6bf R12: 0000000000000730
R13: dffffc0000000000 R14: ffff888060738128 R15: dffffc0000000000
FS: 0000555559d94500(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055ed11d04ee8 CR3: 0000000025737000 CR4: 00000000003506f0
Call Trace:
<TASK>
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_unbind+0xa4/0x1c0 drivers/usb/gadget/configfs.c:1844
gadget_unbind_driver+0x1bf/0x3e0 drivers/usb/gadget/udc/core.c:1702
device_remove drivers/base/dd.c:626 [inline]
__device_release_driver drivers/base/dd.c:1351 [inline]
device_release_driver_internal+0x408/0x6f0 drivers/base/dd.c:1374
driver_detach+0x1f3/0x2d0 drivers/base/dd.c:1437
bus_remove_driver+0x221/0x2f0 drivers/base/bus.c:792
usb_gadget_unregister_driver+0x4e/0x70 drivers/usb/gadget/udc/core.c:1762
unregister_gadget drivers/usb/gadget/configfs.c:263 [inline]
gadget_dev_desc_UDC_store+0x178/0x2e0 drivers/usb/gadget/configfs.c:290
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:0x7fc7fd39de99
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:00007ffe1987df68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fc7fd625fa0 RCX: 00007fc7fd39de99
RDX: 0000000000000001 RSI: 00002000000004c0 RDI: 0000000000000004
RBP: 00007fc7fd433eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc7fd625fac R14: 00007fc7fd625fa0 R15: 00007fc7fd625fa0
</TASK>
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 63 fc 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 65
RSP: 0018:ffffc9000332f9c8 EFLAGS: 00010202
RAX: 00000000000000e6 RBX: ffff888060738000 RCX: ffff8880281bda00
RDX: 0000000000000000 RSI: ffffffff8acacbe0 RDI: ffff888060738128
RBP: dffffc0000000000 R08: ffffffff911eb5f7 R09: 1ffffffff223d6be
R10: dffffc0000000000 R11: fffffbfff223d6bf R12: 0000000000000730
R13: dffffc0000000000 R14: ffff888060738128 R15: dffffc0000000000
FS: 0000555559d94500(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055ed11ce2df4 CR3: 0000000025737000 CR4: 00000000003506e0
----------------
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 63 fc 0a fb call 0xfb0afc78
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: 65 gs
* Struck through repros no longer work on HEAD.