Hello,
syzbot found the following issue on:
HEAD commit: 50cbba13faa2 Linux 6.1.159
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=169d12b2580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=6a5cbd268406bf43
dashboard link:
https://syzkaller.appspot.com/bug?extid=09c0af25290c423864c8
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/50ceb00b1b39/disk-50cbba13.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/ebb8883b9a29/vmlinux-50cbba13.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/7edc2a795f03/bzImage-50cbba13.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+09c0af...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in snd_usbmidi_error_timer+0x5fe/0x660 sound/usb/midi.c:352
Read of size 1 at addr ffff888055936543 by task swapper/0/0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<IRQ>
dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:420
kasan_report+0x10b/0x140 mm/kasan/report.c:524
snd_usbmidi_error_timer+0x5fe/0x660 sound/usb/midi.c:352
call_timer_fn+0x1a0/0x670 kernel/time/timer.c:1701
expire_timers kernel/time/timer.c:1752 [inline]
__run_timers+0x529/0x7d0 kernel/time/timer.c:2023
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:2036
handle_softirqs+0x2a1/0x920 kernel/softirq.c:596
__do_softirq kernel/softirq.c:630 [inline]
invoke_softirq kernel/softirq.c:470 [inline]
__irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679
irq_exit_rcu+0x5/0x20 kernel/softirq.c:691
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691
RIP: 0010:default_idle+0xb/0x10 arch/x86/kernel/process.c:742
Code: 48 89 df e8 a7 b3 b6 f7 e9 4c ff ff ff e8 9d 0e f6 ff 00 00 cc cc 00 00 cc cc 00 00 cc cc 00 66 90 0f 00 2d c7 40 4c 00 fb f4 <c3> 0f 1f 40 00 41 57 41 56 53 49 be 00 00 00 00 00 fc ff df 65 48
RSP: 0018:ffffffff8c607d88 EFLAGS: 000002c6
RAX: e75a735270763e00 RBX: ffffffff8a1a6267 RCX: e75a735270763e00
RDX: 0000000000000001 RSI: ffffffff8a6c0600 RDI: ffffffff8abef920
RBP: ffffffff8c607ec0 R08: dffffc0000000000 R09: ffffed10171c6afa
R10: ffffed10171c6afa R11: 1ffff110171c6af9 R12: 0000000000000000
R13: dffffc0000000000 R14: ffffffff8c6bc740 R15: 1ffffffff1bfe206
default_idle_call+0x84/0xc0 kernel/sched/idle.c:109
cpuidle_idle_call kernel/sched/idle.c:191 [inline]
do_idle+0x1fc/0x570 kernel/sched/idle.c:303
cpu_startup_entry+0x3f/0x60 kernel/sched/idle.c:401
rest_init+0x2dc/0x300 init/main.c:745
arch_call_rest_init+0xa/0xa init/main.c:905
start_kernel+0x490/0x539 init/main.c:1152
secondary_startup_64_no_verify+0xcf/0xdb
</TASK>
Allocated by task 4347:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
snd_usbmidi_in_endpoint_create+0x7e/0xa20 sound/usb/midi.c:1342
snd_usbmidi_create_endpoints sound/usb/midi.c:1937 [inline]
__snd_usbmidi_create+0x173c/0x3010 sound/usb/midi.c:2659
snd_usb_create_quirk sound/usb/quirks.c:539 [inline]
create_composite_quirk+0x1ec/0x4e0 sound/usb/quirks.c:48
usb_audio_probe+0xb72/0x1d50 sound/usb/card.c:885
usb_probe_interface+0x5a0/0xaf0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x2aa/0xc70 drivers/base/dd.c:639
__driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
__device_attach_driver+0x2c6/0x510 drivers/base/dd.c:943
bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
__device_attach+0x29b/0x460 drivers/base/dd.c:1015
bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
device_add+0xa00/0xfb0 drivers/base/core.c:3697
usb_set_configuration+0x1991/0x1fd0 drivers/usb/core/message.c:2165
usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238
usb_probe_device+0x139/0x270 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x2aa/0xc70 drivers/base/dd.c:639
__driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
__device_attach_driver+0x2c6/0x510 drivers/base/dd.c:943
bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
__device_attach+0x29b/0x460 drivers/base/dd.c:1015
bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
device_add+0xa00/0xfb0 drivers/base/core.c:3697
usb_new_device+0xd4d/0x1620 drivers/usb/core/hub.c:2659
hub_port_connect drivers/usb/core/hub.c:5517 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5657 [inline]
port_event drivers/usb/core/hub.c:5817 [inline]
hub_event+0x2d5e/0x54e0 drivers/usb/core/hub.c:5899
process_one_work+0x898/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Freed by task 4347:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1729 [inline]
slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
__kmem_cache_free+0xb6/0x1f0 mm/slub.c:3700
snd_usbmidi_free sound/usb/midi.c:1530 [inline]
snd_usbmidi_rawmidi_free+0xaa/0x150 sound/usb/midi.c:1590
snd_rawmidi_free+0x3b7/0x3e0 sound/core/rawmidi.c:1908
snd_rawmidi_dev_free+0x34/0x40 sound/core/rawmidi.c:1917
__snd_device_free+0x1cd/0x2e0 sound/core/device.c:76
snd_device_free_all+0xcb/0x180 sound/core/device.c:233
snd_card_do_free sound/core/init.c:603 [inline]
release_card_device+0x6b/0x1a0 sound/core/init.c:145
device_release+0x92/0x1c0 drivers/base/core.c:-1
kobject_cleanup lib/kobject.c:681 [inline]
kobject_release lib/kobject.c:712 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x21d/0x460 lib/kobject.c:729
snd_card_free_when_closed sound/core/init.c:633 [inline]
snd_card_free+0x123/0x190 sound/core/init.c:666
usb_audio_probe+0x187f/0x1d50 sound/usb/card.c:939
usb_probe_interface+0x5a0/0xaf0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x2aa/0xc70 drivers/base/dd.c:639
__driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
__device_attach_driver+0x2c6/0x510 drivers/base/dd.c:943
bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
__device_attach+0x29b/0x460 drivers/base/dd.c:1015
bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
device_add+0xa00/0xfb0 drivers/base/core.c:3697
usb_set_configuration+0x1991/0x1fd0 drivers/usb/core/message.c:2165
usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238
usb_probe_device+0x139/0x270 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x2aa/0xc70 drivers/base/dd.c:639
__driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
__device_attach_driver+0x2c6/0x510 drivers/base/dd.c:943
bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
__device_attach+0x29b/0x460 drivers/base/dd.c:1015
bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
device_add+0xa00/0xfb0 drivers/base/core.c:3697
usb_new_device+0xd4d/0x1620 drivers/usb/core/hub.c:2659
hub_port_connect drivers/usb/core/hub.c:5517 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5657 [inline]
port_event drivers/usb/core/hub.c:5817 [inline]
hub_event+0x2d5e/0x54e0 drivers/usb/core/hub.c:5899
process_one_work+0x898/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
The buggy address belongs to the object at ffff888055936400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 323 bytes inside of
512-byte region [ffff888055936400, ffff888055936600)
The buggy address belongs to the physical page:
page:ffffea0001564d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x55934
head:ffffea0001564d00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0001e4d800 dead000000000002 ffff888017441c80
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4267, tgid 4267 (syz-executor), ts 83107204886, free_ts 23838402268
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
prep_new_page mm/page_alloc.c:2539 [inline]
get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328
__alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
alloc_slab_page+0x5d/0x160 mm/slub.c:1799
allocate_slab mm/slub.c:1944 [inline]
new_slab+0x87/0x2c0 mm/slub.c:1997
___slab_alloc+0xbc6/0x1230 mm/slub.c:3154
__slab_alloc mm/slub.c:3240 [inline]
slab_alloc_node mm/slub.c:3325 [inline]
__kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398
__do_kmalloc_node mm/slab_common.c:935 [inline]
__kmalloc_node_track_caller+0x9e/0x230 mm/slab_common.c:956
kmalloc_reserve net/core/skbuff.c:446 [inline]
__alloc_skb+0x22a/0x7e0 net/core/skbuff.c:515
alloc_skb include/linux/skbuff.h:1271 [inline]
netlink_alloc_large_skb net/netlink/af_netlink.c:1182 [inline]
netlink_sendmsg+0x645/0xbc0 net/netlink/af_netlink.c:1847
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
__sys_sendto+0x44f/0x5c0 net/socket.c:2153
__do_sys_sendto net/socket.c:2165 [inline]
__se_sys_sendto net/socket.c:2161 [inline]
__x64_sys_sendto+0xda/0xf0 net/socket.c:2161
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1459 [inline]
free_pcp_prepare mm/page_alloc.c:1509 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479
free_contig_range+0x9d/0x150 mm/page_alloc.c:9574
destroy_args+0x100/0xa31 mm/debug_vm_pgtable.c:1031
debug_vm_pgtable+0x32a/0x37e mm/debug_vm_pgtable.c:1359
do_one_initcall+0x214/0x7a0 init/main.c:1310
do_initcall_level+0x137/0x1e4 init/main.c:1383
do_initcalls+0x4b/0x8a init/main.c:1399
kernel_init_freeable+0x3fa/0x5ac init/main.c:1638
kernel_init+0x19/0x1b0 init/main.c:1526
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888055936400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888055936480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888055936500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888055936580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888055936600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 48 89 df mov %rbx,%rdi
3: e8 a7 b3 b6 f7 call 0xf7b6b3af
8: e9 4c ff ff ff jmp 0xffffff59
d: e8 9d 0e f6 ff call 0xfff60eaf
12: 00 00 add %al,(%rax)
14: cc int3
15: cc int3
16: 00 00 add %al,(%rax)
18: cc int3
19: cc int3
1a: 00 00 add %al,(%rax)
1c: cc int3
1d: cc int3
1e: 00 66 90 add %ah,-0x70(%rsi)
21: 0f 00 2d c7 40 4c 00 verw 0x4c40c7(%rip) # 0x4c40ef
28: fb sti
29: f4 hlt
* 2a: c3 ret <-- trapping instruction
2b: 0f 1f 40 00 nopl 0x0(%rax)
2f: 41 57 push %r15
31: 41 56 push %r14
33: 53 push %rbx
34: 49 be 00 00 00 00 00 movabs $0xdffffc0000000000,%r14
3b: fc ff df
3e: 65 gs
3f: 48 rex.W
---
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