Oops: general protection fault, probably for non-canonical address 0xdffffc00000000e6: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000730-0x0000000000000737]
CPU: 0 UID: 0 PID: 5643 Comm: kworker/0:5 Not tainted syzkaller #0 PREEMPT(full)
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+0x28e/0x4d0 drivers/usb/gadget/function/f_midi2.c:1246
Code: 89 f0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 f7 e8 b7 e6 63 fa 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 12 02 00 00 41 8b 1f 31 ff 89 de e8 59
RSP: 0018:ffffc90000007930 EFLAGS: 00010012
RAX: 00000000000000e6 RBX: ffff888055468120 RCX: ffff88803225dd00
RDX: 0000000000000100 RSI: ffffffff8c4bdd60 RDI: ffffffff8c4bdd20
RBP: ffff888055468100 R08: 00000000524c3017 R09: 0000000045da1054
R10: 0000000000000010 R11: ffffffff8eb59c60 R12: ffff888055468730
R13: dffffc0000000000 R14: ffff888055468128 R15: 0000000000000730
FS: 0000000000000000(0000) GS:ffff888124f4c000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa8a51d4ff8 CR3: 000000002b26f000 CR4: 0000000000350ef0
Call Trace:
f_midi2_set_alt+0x11c/0xf00 drivers/usb/gadget/function/f_midi2.c:1296
composite_setup+0x1ffd/0x3480 drivers/usb/gadget/composite.c:1933
configfs_composite_setup+0xc7/0x100 drivers/usb/gadget/configfs.c:1877
dummy_timer+0x2f43/0x4cf0 drivers/usb/gadget/udc/dummy_hcd.c:1951
__run_hrtimer kernel/time/hrtimer.c:2032 [inline]
__hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2096
hrtimer_run_softirq+0x17a/0x240 kernel/time/hrtimer.c:2113
handle_softirqs+0x225/0x840 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x220 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:__might_sleep+0x31/0xf0 kernel/sched/core.c:9114
Code: 41 56 41 55 41 54 53 50 49 bf 00 00 00 00 00 fc ff df 65 48 8b 1d 07 21 d7 11 4c 8d 73 18 4c 89 f0 48 c1 e8 03 42 0f b6 04 38 <84> c0 0f 85 81 00 00 00 41 8b 2e 85 ed 74 2f 48 81 c3 70 18 00 00
RSP: 0018:ffffc900043ae780 EFLAGS: 00000216
RAX: 0000000000000000 RBX: ffff88803225dd00 RCX: 0000000000100000
RDX: ffffc9001d321000 RSI: 0000000000000074 RDI: ffffffff8e2ecc3a
RBP: ffffc900043ae8f0 R08: ffffffff90579d37 R09: 1ffffffff20af3a6
R10: dffffc0000000000 R11: fffffbfff20af3a7 R12: ffffc900043ae960
R13: 1ffff92000875d28 R14: ffff88803225dd18 R15: dffffc0000000000
__wait_for_common kernel/sched/completion.c:116 [inline]
wait_for_common kernel/sched/completion.c:132 [inline]
wait_for_completion_timeout+0x96/0x610 kernel/sched/completion.c:172
usb_start_wait_urb+0x1e9/0x5b0 drivers/usb/core/message.c:72
usb_internal_control_msg drivers/usb/core/message.c:117 [inline]
usb_control_msg+0x234/0x3e0 drivers/usb/core/message.c:167
usb_control_msg_send drivers/usb/core/message.c:226 [inline]
usb_set_interface+0x521/0x1470 drivers/usb/core/message.c:1649
set_altset sound/usb/midi2.c:1027 [inline]
snd_usb_midi_v2_create+0x621/0x4ac0 sound/usb/midi2.c:1122
snd_usb_create_stream+0x262/0x630 sound/usb/card.c:290
snd_usb_create_streams sound/usb/card.c:392 [inline]
usb_audio_probe+0x1447/0x2280 sound/usb/card.c:1031
usb_probe_interface+0x653/0xc60 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c4/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c4/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3772
usb_new_device+0x99d/0x1620 drivers/usb/core/hub.c:2695
hub_port_connect drivers/usb/core/hub.c:5567 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5707 [inline]
port_event drivers/usb/core/hub.c:5871 [inline]
hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5953
process_one_work kernel/workqueue.c:3322 [inline]
process_scheduled_works+0xa8e/0x14e0 kernel/workqueue.c:3405
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3486
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
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+0x28e/0x4d0 drivers/usb/gadget/function/f_midi2.c:1246
Code: 89 f0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 f7 e8 b7 e6 63 fa 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 12 02 00 00 41 8b 1f 31 ff 89 de e8 59
RSP: 0018:ffffc90000007930 EFLAGS: 00010012
RAX: 00000000000000e6 RBX: ffff888055468120 RCX: ffff88803225dd00
RDX: 0000000000000100 RSI: ffffffff8c4bdd60 RDI: ffffffff8c4bdd20
RBP: ffff888055468100 R08: 00000000524c3017 R09: 0000000045da1054
R10: 0000000000000010 R11: ffffffff8eb59c60 R12: ffff888055468730
R13: dffffc0000000000 R14: ffff888055468128 R15: 0000000000000730
FS: 0000000000000000(0000) GS:ffff888124f4c000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa8a51d4ff8 CR3: 000000002b26f000 CR4: 0000000000350ef0
----------------
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 b7 e6 63 fa call 0xfa63e6cc
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 12 02 00 00 jne 0x249
37: 41 8b 1f mov (%r15),%ebx
3a: 31 ff xor %edi,%edi
3c: 89 de mov %ebx,%esi
3e: e8 .byte 0xe8
3f: 59 pop %rcx