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: 10 Comm: kworker/0:1 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
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+0x5f/0x4d0 drivers/usb/gadget/function/f_midi2.c:1245
Code: e8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 ef e8 e7 f6 63 fa 41 bc 30 07 00 00 4c 03 65 00 4c 89 e0 48 c1 e8 03 48 89 44 24 10 <42> 0f b6 04 28 84 c0 0f 85 23 04 00 00 41 8b 1c 24 31 ff 89 de e8
RSP: 0018:ffffc90000007930 EFLAGS: 00010002
RAX: 00000000000000e6 RBX: 0000000000000001 RCX: ffff88801bf0a540
RDX: 0000000000000100 RSI: 0000000000000008 RDI: ffff888012380148
RBP: ffff8880123800f0 R08: ffff88801238014f R09: 1ffff11002470029
R10: dffffc0000000000 R11: ffffed100247002a R12: 0000000000000730
R13: dffffc0000000000 R14: ffff888012380128 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff88808c543000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb2aea61a40 CR3: 000000001279d000 CR4: 0000000000352ef0
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:usb_hcd_submit_urb+0x32a/0x1b60 drivers/usb/core/hcd.c:-1
Code: 00 00 fc ff df 80 3c 08 00 74 08 4c 89 ef e8 1d 78 d3 fa 4d 8b 5d 00 48 8b 7c 24 08 48 8b 34 24 89 ea 2e e8 d0 c0 9e 18 89 c5 <45> 31 ed 31 ff 89 c6 e8 6a 4b 64 fa 85 ed 0f 85 3e 0f 00 00 e8 1d
RSP: 0018:ffffc9000023e870 EFLAGS: 00000282
RAX: 0000000000000000 RBX: ffff88801fba0210 RCX: 0000000000000000
RDX: 0000000000000006 RSI: ffffffff8e230467 RDI: 00000000ffffffff
RBP: 0000000000000000 R08: ffffffff9057b737 R09: 1ffffffff20af6e6
R10: dffffc0000000000 R11: fffffbfff20af6e7 R12: 1ffff11003f7401e
R13: ffffffff8f9fc348 R14: 1ffff11003f74042 R15: 1ffff110035cc888
usb_start_wait_urb+0x13f/0x5b0 drivers/usb/core/message.c:62
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:1025 [inline]
snd_usb_midi_v2_create+0x621/0x4ac0 sound/usb/midi2.c:1120
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+0x5f/0x4d0 drivers/usb/gadget/function/f_midi2.c:1245
Code: e8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 ef e8 e7 f6 63 fa 41 bc 30 07 00 00 4c 03 65 00 4c 89 e0 48 c1 e8 03 48 89 44 24 10 <42> 0f b6 04 28 84 c0 0f 85 23 04 00 00 41 8b 1c 24 31 ff 89 de e8
RSP: 0018:ffffc90000007930 EFLAGS: 00010002
RAX: 00000000000000e6 RBX: 0000000000000001 RCX: ffff88801bf0a540
RDX: 0000000000000100 RSI: 0000000000000008 RDI: ffff888012380148
RBP: ffff8880123800f0 R08: ffff88801238014f R09: 1ffff11002470029
R10: dffffc0000000000 R11: ffffed100247002a R12: 0000000000000730
R13: dffffc0000000000 R14: ffff888012380128 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff88808c543000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb2aea61a40 CR3: 000000001279d000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
0: e8 48 c1 e8 03 call 0x3e8c14d
5: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
a: 74 08 je 0x14
c: 48 89 ef mov %rbp,%rdi
f: e8 e7 f6 63 fa call 0xfa63f6fb
14: 41 bc 30 07 00 00 mov $0x730,%r12d
1a: 4c 03 65 00 add 0x0(%rbp),%r12
1e: 4c 89 e0 mov %r12,%rax
21: 48 c1 e8 03 shr $0x3,%rax
25: 48 89 44 24 10 mov %rax,0x10(%rsp)
* 2a: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 0f 85 23 04 00 00 jne 0x45a
37: 41 8b 1c 24 mov (%r12),%ebx
3b: 31 ff xor %edi,%edi
3d: 89 de mov %ebx,%esi
3f: e8 .byte 0xe8