[v6.6] general protection fault in f_midi2_stop_eps

1 view
Skip to first unread message

syzbot

unread,
Jul 25, 2026, 9:23:33 AM (9 days ago) Jul 25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c5596480c50e Linux 6.6.145
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15f2e1b9580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0bc3d90c30838b5
dashboard link: https://syzkaller.appspot.com/bug?extid=92601de1ff80feff08af
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eb5cda0a8020/disk-c5596480.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ca05ff2fc502/vmlinux-c5596480.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6daf3255b985/bzImage-c5596480.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+92601d...@syzkaller.appspotmail.com

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: 5854 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: ffff888075410120 RCX: ffff88802ba1bc00
RDX: 0000000000000100 RSI: ffffffff8b1d0640 RDI: ffffffff8b1d0600
RBP: ffff888075410100 R08: 0000000000000000 R09: 00000000eed9a316
R10: 000000005c29093d R11: 0000000000000100 R12: ffff888075410730
R13: dffffc0000000000 R14: ffff888075410128 R15: 0000000000000730
FS: 0000000000000000(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0250000218 CR3: 0000000061b21000 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:ffffc900047de880 EFLAGS: 00000206
RAX: dffffc0000000004 RBX: 0000000000000a02 RCX: 8da67e5757d1dd00
RDX: dffffc0000000000 RSI: ffffffff8acacbe0 RDI: 0000000000000001
RBP: ffffc900047de910 R08: ffffffff911eb56f R09: 1ffffffff223d6ad
R10: dffffc0000000000 R11: fffffbfff223d6ae R12: dffffc0000000000
R13: dffffc0000000000 R14: ffff888142be0000 R15: 1ffff920008fbd10
spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
dummy_urb_enqueue+0x587/0x780 drivers/usb/gadget/udc/dummy_hcd.c:1318
usb_hcd_submit_urb+0x318/0x1aa0 drivers/usb/core/hcd.c:1533
usb_start_wait_urb+0x140/0x580 drivers/usb/core/message.c:62
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: ffff888075410120 RCX: ffff88802ba1bc00
RDX: 0000000000000100 RSI: ffffffff8b1d0640 RDI: ffffffff8b1d0600
RBP: ffff888075410100 R08: 0000000000000000 R09: 00000000eed9a316
R10: 000000005c29093d R11: 0000000000000100 R12: ffff888075410730
R13: dffffc0000000000 R14: ffff888075410128 R15: 0000000000000730
FS: 0000000000000000(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0250000218 CR3: 0000000061b21000 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


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Jul 25, 2026, 5:24:32 PM (9 days ago) Jul 25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: c5596480c50e Linux 6.6.145
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=155f109e580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0bc3d90c30838b5
dashboard link: https://syzkaller.appspot.com/bug?extid=92601de1ff80feff08af
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1393d88e580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=135f109e580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eb5cda0a8020/disk-c5596480.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ca05ff2fc502/vmlinux-c5596480.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6daf3255b985/bzImage-c5596480.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+92601d...@syzkaller.appspotmail.com

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
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


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
Reply all
Reply to author
Forward
0 new messages