general protection fault in f_midi2_free_ep_reqs

Status: upstream: reported C repro on 2026/07/28 13:52
Subsystems: usb
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+01a17afb30637396955e@syzkaller.appspotmail.com
First crash: 53d, last: 8d09h
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
d91db250 assessment-security DenialOfService: ✅ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ✅ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ general protection fault in f_midi2_free_ep_reqs 2026/07/25 01:29 2026/07/25 01:29 2026/07/25 01:56 1bdb5c57
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] Monthly usb report (Sep 2026) 0 (1) 2026/09/04 12:33
[PATCH] usb: gadget: midi2: Fix null-pointer dereference in f_midi2_free_ep_reqs 3 (3) 2026/07/29 19:37
[syzbot] [usb?] general protection fault in f_midi2_free_ep_reqs 0 (1) 2026/07/28 13:52

Sample crash report:
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: 5916 Comm: syz.0.17 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: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:ffffc9000491f9b8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff888055a08158 RCX: 1ffff1100ab41027
RDX: 00000000000000e6 RSI: ffffffff87e7aea6 RDI: ffff888055a08128
RBP: ffff888055a08150 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000020
R13: ffff888055a08128 R14: ffff88803a144120 R15: ffff888055a08000
FS:  0000555577eb7500(0000) GS:ffff8880d5fdc000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055bd21a12f40 CR3: 000000002626b000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 f_midi2_free_ep drivers/usb/gadget/function/f_midi2.c:1208 [inline]
 f_midi2_unbind+0x265/0x800 drivers/usb/gadget/function/f_midi2.c:2066
 purge_configs_funcs+0x285/0x510 drivers/usb/gadget/configfs.c:1600
 configfs_composite_unbind+0xae/0x210 drivers/usb/gadget/configfs.c:1846
 gadget_unbind_driver+0x20c/0x4f0 drivers/usb/gadget/udc/core.c:1724
 device_remove+0xcb/0x180 drivers/base/dd.c:616
 __device_release_driver drivers/base/dd.c:1349 [inline]
 device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372
 driver_detach+0xd8/0x1b0 drivers/base/dd.c:1435
 bus_remove_driver+0x13b/0x2e0 drivers/base/bus.c:832
 driver_unregister+0x76/0xb0 drivers/base/driver.c:202
 usb_gadget_unregister_driver+0x49/0x70 drivers/usb/gadget/udc/core.c:1784
 unregister_gadget drivers/usb/gadget/configfs.c:263 [inline]
 gadget_dev_desc_UDC_store+0x170/0x2e0 drivers/usb/gadget/configfs.c:290
 flush_write_buffer fs/configfs/file.c:207 [inline]
 configfs_write_iter+0x302/0x4e0 fs/configfs/file.c:229
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x6ac/0x1050 fs/read_write.c:687
 ksys_write+0x12a/0x250 fs/read_write.c:739
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd36979de99
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:00007fff74c96c88 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fd369a25fa0 RCX: 00007fd36979de99
RDX: 0000000000000001 RSI: 00002000000004c0 RDI: 0000000000000004
RBP: 00007fd369833eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd369a25fac R14: 00007fd369a25fa0 R15: 00007fd369a25fa0
 </TASK>
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:ffffc9000491f9b8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff888055a08158 RCX: 1ffff1100ab41027
RDX: 00000000000000e6 RSI: ffffffff87e7aea6 RDI: ffff888055a08128
RBP: ffff888055a08150 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000020
R13: ffff888055a08128 R14: ffff88803a144120 R15: ffff888055a08000
FS:  0000555577eb7500(0000) GS:ffff8880d60dc000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055bd21954620 CR3: 000000002626b000 CR4: 0000000000352ef0
----------------
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

Crashes (935):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/29 13:32 upstream fc02acf6ac0c 4a865b71 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/07/29 11:28 upstream fc02acf6ac0c 4a865b71 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/07/26 21:59 upstream 4235cb24ec1e 4a865b71 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/07/26 14:55 upstream 3dab139d4795 4a865b71 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/07/25 00:50 upstream 48a5a7ab8d6a 4a865b71 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 21:55 upstream 1fc5a74b108f 4f7b22a0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in f_midi2_free_ep_reqs
2026/09/04 20:39 upstream 986c24e0fe44 3f042c7b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in f_midi2_free_ep_reqs
2026/09/04 17:54 upstream 841e384b841a 3f042c7b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in f_midi2_free_ep_reqs
2026/09/03 18:12 upstream 940de590b839 6a988719 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in f_midi2_free_ep_reqs
2026/09/07 04:04 upstream 1fc5a74b108f 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/07 00:23 upstream 1fc5a74b108f 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 23:59 upstream 1fc5a74b108f 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 20:29 upstream 1fc5a74b108f 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 18:09 upstream 1fc5a74b108f 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 15:56 upstream 1fc5a74b108f 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 13:26 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 11:10 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 10:03 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 08:52 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 07:34 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 06:22 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 05:18 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 02:10 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 02:10 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/06 01:06 upstream 4d7d9486c04d 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 23:45 upstream 4d7d9486c04d 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 22:22 upstream 4d7d9486c04d 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 20:36 upstream 4d7d9486c04d 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 18:29 upstream 4d7d9486c04d 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 17:25 upstream 4d7d9486c04d 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 11:41 upstream 654ae5d73c05 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 10:33 upstream 654ae5d73c05 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 09:27 upstream 654ae5d73c05 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 06:59 upstream 654ae5d73c05 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 06:26 upstream 654ae5d73c05 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 05:00 upstream 654ae5d73c05 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 03:41 upstream 654ae5d73c05 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/05 01:54 upstream 654ae5d73c05 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/04 23:29 upstream 654ae5d73c05 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/04 20:44 upstream bc35965f6940 44dda43b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/04 19:27 upstream bc35965f6940 44dda43b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/04 16:04 upstream bc35965f6940 44dda43b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/04 14:54 upstream bc35965f6940 44dda43b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/04 14:36 upstream bc35965f6940 44dda43b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in f_midi2_free_ep_reqs
2026/09/07 01:53 upstream 1fc5a74b108f 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in f_midi2_free_ep_reqs
2026/09/06 16:58 upstream 1fc5a74b108f 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in f_midi2_free_ep_reqs
2026/09/06 14:54 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in f_midi2_free_ep_reqs
2026/09/06 03:11 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in f_midi2_free_ep_reqs
2026/09/06 03:10 upstream 9f0346dcbea3 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in f_midi2_free_ep_reqs
2026/09/05 15:09 upstream 4d7d9486c04d 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in f_midi2_free_ep_reqs
2026/09/05 13:39 upstream 4d7d9486c04d 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in f_midi2_free_ep_reqs
2026/09/05 00:19 upstream 654ae5d73c05 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in f_midi2_free_ep_reqs
2026/09/07 19:29 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux master 73ae59e97596 5e4626f5 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64-mte BUG: unable to handle kernel NULL pointer dereference in f_midi2_free_ep_reqs
2026/09/05 19:17 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux master 73ae59e97596 4f7b22a0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64 BUG: unable to handle kernel paging request in f_midi2_free_ep_reqs
2026/09/03 22:13 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux master 0f23d56f17fd a8a356ea .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm32 BUG: unable to handle kernel NULL pointer dereference in f_midi2_free_ep_reqs
2026/08/16 10:57 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux master 3eb40771c00a 746171ee .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm32 BUG: unable to handle kernel NULL pointer dereference in f_midi2_free_ep_reqs
2026/08/05 08:00 https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux master 31996e14bd59 52aa2820 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-arm64-mte BUG: unable to handle kernel NULL pointer dereference in f_midi2_free_ep_reqs
* Struck through repros no longer work on HEAD.