general protection fault in f_midi2_free_ep

Status: closed as dup on 2026/07/30 11:27
Subsystems: usb
Labels: prio:low
[Documentation on labels]
Reported-by: syzbot+3451bfda4264c512ef27@syzkaller.appspotmail.com
First crash: 10d, last: 15h46m
Cause bisection: failed (error log, bisect log)
  
✨ AI Patch Versions (1)
Version Stage Reported Report Link Job
1 moderation 2026/07/30 10:14 Discussion 87029043-73c1-4080-852b-012a419da14f
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision Error
87029043 patching general protection fault in f_midi2_free_ep 2026/07/30 08:46 2026/07/30 08:46 2026/07/30 10:14 2377cd3d

			
		
30b0cb8a assessment-security DenialOfService: ✅ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ general protection fault in f_midi2_free_ep 2026/07/26 00:44 2026/07/26 00:44 2026/07/26 01:14 492bab15

			
		
Duplicate of
Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported
general protection fault in f_midi2_stop_eps usb prio:high 2 syz, C error 286 2h25m 6d12h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [usb?] general protection fault in f_midi2_free_ep 1 (3) 2026/07/30 11:27
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.6 general protection fault in f_midi2_free_ep origin:upstream 2 syz, C 3 8d22h 9d08h 0/2 upstream: reported C repro on 2026/07/25 17:35

Sample crash report:
Oops: gen[   99.553665][ T5620] Oops: general protection fault, probably for non-canonical address 0xdffffc00000000ee: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000770-0x0000000000000777]
CPU: 0 UID: 0 PID: 5620 Comm: syz-executor121 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
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/0x2f0 drivers/usb/gadget/function/f_midi2.c:1208
Code: 4c 89 f0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 f7 e8 23 9d e7 fa 41 bc 70 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 5d 02 00 00 41 8b 1c 24 31 ff 89 de e8 d5
RSP: 0018:ffffc900040df978 EFLAGS: 00010206
RAX: 00000000000000ee RBX: ffff8880446f4000 RCX: ffff888038dcdd00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff8faf9837 R09: 1ffffffff1f5f306
R10: dffffc0000000000 R11: fffffbfff1f5f307 R12: 0000000000000770
R13: dffffc0000000000 R14: ffff8880446f4128 R15: dffffc0000000000
FS:  000055558593b400(0000) GS:ffff888125c41000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005653470e07a0 CR3: 0000000042ae2000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 f_midi2_unbind+0x9b/0x340 drivers/usb/gadget/function/f_midi2.c:2066
 purge_configs_funcs+0x248/0x3d0 drivers/usb/gadget/configfs.c:1600
 configfs_composite_unbind+0xa0/0x1b0 drivers/usb/gadget/configfs.c:1846
 gadget_unbind_driver+0x1cb/0x410 drivers/usb/gadget/udc/core.c:1724
 device_remove drivers/base/dd.c:616 [inline]
 __device_release_driver drivers/base/dd.c:1349 [inline]
 device_release_driver_internal+0x48b/0x880 drivers/base/dd.c:1372
 driver_detach+0x1f3/0x2d0 drivers/base/dd.c:1435
 bus_remove_driver+0x229/0x320 drivers/base/bus.c:832
 usb_gadget_unregister_driver+0x4e/0x70 drivers/usb/gadget/udc/core.c:1784
 unregister_gadget drivers/usb/gadget/configfs.c:263 [inline]
 gadget_dev_desc_UDC_store+0x17a/0x2f0 drivers/usb/gadget/configfs.c:290
 flush_write_buffer fs/configfs/file.c:207 [inline]
 configfs_write_iter+0x33a/0x430 fs/configfs/file.c:229
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x61e/0xbb0 fs/read_write.c:687
 ksys_write+0x156/0x270 fs/read_write.c:739
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd367807789
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd35b431c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 6769666e6f632f2e RCX: 00007fd367807789
RDX: 0000000000000001 RSI: 00002000000004c0 RDI: 0000000000000004
RBP: 6e6f635f796d2f2e R08: 0000000000000006 R09: 0000000000000006
R10: 0000000000000006 R11: 0000000000000246 R12: 00007ffd35b43338
R13: 431bde82d7b634db R14: 00007fd36789ac40 R15: 0000000000000002
 </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/0x2f0 drivers/usb/gadget/function/f_midi2.c:1208
Code: 4c 89 f0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 f7 e8 23 9d e7 fa 41 bc 70 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 5d 02 00 00 41 8b 1c 24 31 ff 89 de e8 d5
RSP: 0018:ffffc900040df978 EFLAGS: 00010206
RAX: 00000000000000ee RBX: ffff8880446f4000 RCX: ffff888038dcdd00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff8faf9837 R09: 1ffffffff1f5f306
R10: dffffc0000000000 R11: fffffbfff1f5f307 R12: 0000000000000770
R13: dffffc0000000000 R14: ffff8880446f4128 R15: dffffc0000000000
FS:  000055558593b400(0000) GS:ffff888125c41000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005653470e07a0 CR3: 0000000042ae2000 CR4: 00000000003526f0
----------------
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 23 9d e7 fa       	call   0xfae79d38
  15:	41 bc 70 07 00 00    	mov    $0x770,%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 5d 02 00 00    	jne    0x293
  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:	d5                   	.byte 0xd5

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/30 03:53 upstream fc46aed51f62 6ef5c1e2 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in f_midi2_free_ep
2026/08/03 04:00 linux-next cc2b5f627e8c e611ffe1 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce general protection fault in f_midi2_free_ep
2026/08/03 10:22 upstream 075b74841bd0 e611ffe1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/08/02 06:54 upstream 2d2338c93da7 e611ffe1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/08/01 09:29 upstream 0131b508c0e2 e611ffe1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/08/01 09:27 upstream 0131b508c0e2 e611ffe1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/08/01 06:31 upstream 0131b508c0e2 7664cf44 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/08/01 06:31 upstream 0131b508c0e2 7664cf44 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/08/01 06:28 upstream 0131b508c0e2 7664cf44 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/08/01 06:28 upstream 0131b508c0e2 7664cf44 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/08/01 03:29 upstream 8ba098e6b6ff 7664cf44 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/07/29 03:58 upstream 3b5f4b83c4ab 19622d9d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/07/28 19:55 upstream 62cc90241548 19622d9d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/07/28 09:11 upstream 62cc90241548 45ae1df4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/07/28 09:06 upstream 62cc90241548 45ae1df4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/07/28 07:28 upstream 62cc90241548 45ae1df4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/07/27 13:32 upstream f5098b6bae76 aae9036b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in f_midi2_free_ep
2026/07/27 02:20 upstream 4235cb24ec1e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/07/27 02:09 upstream 4235cb24ec1e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/07/25 17:15 upstream 0ce37745d4bf 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root general protection fault in f_midi2_free_ep
2026/07/25 14:31 upstream 0ce37745d4bf 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/07/25 04:27 upstream 48a5a7ab8d6a 05b26a28 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root general protection fault in f_midi2_free_ep
2026/07/25 00:43 upstream 48a5a7ab8d6a 05b26a28 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in f_midi2_free_ep
2026/07/24 13:47 upstream d326f83e819c 544adce9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root general protection fault in f_midi2_free_ep
2026/07/25 09:23 linux-next cc2b5f627e8c 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce general protection fault in f_midi2_free_ep
* Struck through repros no longer work on HEAD.