general protection fault in f_midi2_stop_eps

Status: upstream: reported C repro on 2026/07/25 13:23
Reported-by: syzbot+92601de1ff80feff08af@syzkaller.appspotmail.com
First crash: 10d, last: 7d20h
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in f_midi2_stop_eps usb prio:high 2 syz, C error 297 2h07m 7d02h 0/29 upstream: reported C repro on 2026/07/28 13:41

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: 5872 Comm: kworker/0:6 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Workqueue: usb_hub_wq hub_event
RIP: 0010:f_midi2_free_ep_reqs drivers/usb/gadget/function/f_midi2.c:1166 [inline]
RIP: 0010:f_midi2_stop_eps+0x286/0x4c0 drivers/usb/gadget/function/f_midi2.c:1247
Code: 89 f0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 f7 e8 df f4 0a fb 41 bf 30 07 00 00 4d 03 3e 4c 89 f8 48 c1 e8 03 48 89 44 24 18 <42> 0f b6 04 28 84 c0 0f 85 05 02 00 00 41 8b 1f 31 ff 89 de e8 e1
RSP: 0018:ffffc90000007840 EFLAGS: 00010002
RAX: 00000000000000e6 RBX: ffff88806b9f0120 RCX: ffff88801b780000
RDX: 0000000000000100 RSI: ffffffff8b1d0640 RDI: ffffffff8b1d0600
RBP: ffff88806b9f0100 R08: 0000000000000000 R09: 00000000eed9a316
R10: 000000005c29093d R11: 0000000000000100 R12: ffff88806b9f0730
R13: dffffc0000000000 R14: ffff88806b9f0128 R15: 0000000000000730
FS:  0000000000000000(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc0c5a780f5 CR3: 0000000031052000 CR4: 00000000003506f0
Call Trace:
 <IRQ>
 f_midi2_set_alt+0x100/0x800 drivers/usb/gadget/function/f_midi2.c:1299
 composite_setup+0x1ffe/0x33a0 drivers/usb/gadget/composite.c:1957
 configfs_composite_setup+0xc7/0x100 drivers/usb/gadget/configfs.c:1875
 dummy_timer+0x1309/0x3420 drivers/usb/gadget/udc/dummy_hcd.c:1935
 __run_hrtimer kernel/time/hrtimer.c:1754 [inline]
 __hrtimer_run_queues+0x525/0xc10 kernel/time/hrtimer.c:1818
 hrtimer_run_softirq+0x177/0x290 kernel/time/hrtimer.c:1835
 handle_softirqs+0x27d/0x820 kernel/softirq.c:578
 __do_softirq kernel/softirq.c:612 [inline]
 invoke_softirq kernel/softirq.c:452 [inline]
 __irq_exit_rcu+0xd3/0x190 kernel/softirq.c:661
 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
 sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0xc0/0x120 kernel/locking/spinlock.c:194
Code: c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f7 44 24 20 00 02 00 00 41 c6 04 07 f8 75 4b f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 <e8> 2b 5f c6 f6 65 8b 05 9c 2d 6d 75 85 c0 74 3c 48 c7 04 24 0e 36
RSP: 0018:ffffc900032466a0 EFLAGS: 00000206
RAX: dffffc0000000004 RBX: 0000000000000a06 RCX: 3cb7fa4b3e32b400
RDX: dffffc0000000000 RSI: ffffffff8acacbe0 RDI: 0000000000000001
RBP: ffffc90003246730 R08: ffffffff911eb56f R09: 1ffffffff223d6ad
R10: dffffc0000000000 R11: fffffbfff223d6ae R12: dffffc0000000000
R13: ffff8880b8e295c0 R14: ffff8880b8e295c0 R15: 1ffff92000648cd4
 __mod_timer+0x9b0/0xd60 kernel/time/timer.c:1134
 schedule_timeout+0x183/0x2d0 kernel/time/timer.c:2167
 do_wait_for_common kernel/sched/completion.c:95 [inline]
 __wait_for_common kernel/sched/completion.c:116 [inline]
 wait_for_common kernel/sched/completion.c:127 [inline]
 wait_for_completion_timeout+0x2c6/0x5d0 kernel/sched/completion.c:167
 usb_start_wait_urb+0x1ea/0x580 drivers/usb/core/message.c:72
 usb_internal_control_msg drivers/usb/core/message.c:117 [inline]
 usb_control_msg+0x235/0x3e0 drivers/usb/core/message.c:167
 usb_control_msg_send drivers/usb/core/message.c:226 [inline]
 usb_set_interface+0x51f/0x13f0 drivers/usb/core/message.c:1644
 set_altset sound/usb/midi2.c:1029 [inline]
 snd_usb_midi_v2_create+0x62f/0x48a0 sound/usb/midi2.c:1125
 snd_usb_create_stream+0x262/0x5d0 sound/usb/card.c:182
 snd_usb_create_streams sound/usb/card.c:282 [inline]
 usb_audio_probe+0xead/0x1f00 sound/usb/card.c:893
 usb_probe_interface+0x5c2/0xaf0 drivers/usb/core/driver.c:396
 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
 __device_attach_driver+0x2ca/0x510 drivers/base/dd.c:1037
 bus_for_each_drv+0x252/0x2e0 drivers/base/bus.c:459
 __device_attach+0x2c1/0x420 drivers/base/dd.c:1109
 bus_probe_device+0x180/0x260 drivers/base/bus.c:580
 device_add+0x87c/0xc40 drivers/base/core.c:3700
 usb_set_configuration+0x1ad0/0x2150 drivers/usb/core/message.c:2265
 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:238
 usb_probe_device+0x12a/0x260 drivers/usb/core/driver.c:293
 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
 __device_attach_driver+0x2ca/0x510 drivers/base/dd.c:1037
 bus_for_each_drv+0x252/0x2e0 drivers/base/bus.c:459
 __device_attach+0x2c1/0x420 drivers/base/dd.c:1109
 bus_probe_device+0x180/0x260 drivers/base/bus.c:580
 device_add+0x87c/0xc40 drivers/base/core.c:3700
 usb_new_device+0x995/0x1550 drivers/usb/core/hub.c:2660
 hub_port_connect drivers/usb/core/hub.c:5529 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5669 [inline]
 port_event drivers/usb/core/hub.c:5833 [inline]
 hub_event+0x29d5/0x4a80 drivers/usb/core/hub.c:5915
 process_one_work kernel/workqueue.c:2653 [inline]
 process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2730
 worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2811
 kthread+0x2fa/0x390 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
 </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_stop_eps+0x286/0x4c0 drivers/usb/gadget/function/f_midi2.c:1247
Code: 89 f0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 f7 e8 df f4 0a fb 41 bf 30 07 00 00 4d 03 3e 4c 89 f8 48 c1 e8 03 48 89 44 24 18 <42> 0f b6 04 28 84 c0 0f 85 05 02 00 00 41 8b 1f 31 ff 89 de e8 e1
RSP: 0018:ffffc90000007840 EFLAGS: 00010002
RAX: 00000000000000e6 RBX: ffff88806b9f0120 RCX: ffff88801b780000
RDX: 0000000000000100 RSI: ffffffff8b1d0640 RDI: ffffffff8b1d0600
RBP: ffff88806b9f0100 R08: 0000000000000000 R09: 00000000eed9a316
R10: 000000005c29093d R11: 0000000000000100 R12: ffff88806b9f0730
R13: dffffc0000000000 R14: ffff88806b9f0128 R15: 0000000000000730
FS:  0000000000000000(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc0c5a780f5 CR3: 0000000031052000 CR4: 00000000003506f0
----------------
Code disassembly (best guess):
   0:	89 f0                	mov    %esi,%eax
   2:	48 c1 e8 03          	shr    $0x3,%rax
   6:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1)
   b:	74 08                	je     0x15
   d:	4c 89 f7             	mov    %r14,%rdi
  10:	e8 df f4 0a fb       	call   0xfb0af4f4
  15:	41 bf 30 07 00 00    	mov    $0x730,%r15d
  1b:	4d 03 3e             	add    (%r14),%r15
  1e:	4c 89 f8             	mov    %r15,%rax
  21:	48 c1 e8 03          	shr    $0x3,%rax
  25:	48 89 44 24 18       	mov    %rax,0x18(%rsp)
* 2a:	42 0f b6 04 28       	movzbl (%rax,%r13,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	0f 85 05 02 00 00    	jne    0x23c
  37:	41 8b 1f             	mov    (%r15),%ebx
  3a:	31 ff                	xor    %edi,%edi
  3c:	89 de                	mov    %ebx,%esi
  3e:	e8                   	.byte 0xe8
  3f:	e1                   	.byte 0xe1

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/25 21:23 linux-6.6.y c5596480c50e 492bab15 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/27 19:20 linux-6.6.y c5596480c50e aae9036b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/27 19:19 linux-6.6.y c5596480c50e aae9036b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 17:33 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 17:33 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 17:29 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 17:29 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 17:29 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 17:27 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 17:26 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 17:24 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:33 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:32 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:32 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:31 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:29 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:29 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:29 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:27 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:26 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:26 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:25 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:23 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:23 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
2026/07/25 13:23 linux-6.6.y c5596480c50e 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan general protection fault in f_midi2_stop_eps
* Struck through repros no longer work on HEAD.