Hello,
syzbot found the following issue on:
HEAD commit: 674f684f7c61 Linux 5.15.212
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=163a1449580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=f161cbc9aef65db0
dashboard link:
https://syzkaller.appspot.com/bug?extid=121ca3ec4261dcaff785
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/f55be2937b89/disk-674f684f.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/a19fb0ffc049/vmlinux-674f684f.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/365d4529a007/bzImage-674f684f.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+121ca3...@syzkaller.appspotmail.com
vhci_hcd: disconnect device
vhci_hcd: stop threads
==================================================================
BUG: KASAN: use-after-free in vhci_shutdown_connection+0x211/0x580 drivers/usb/usbip/vhci_hcd.c:1057
Read of size 8 at addr ffff8880241c49b0 by task kworker/u4:8/6746
CPU: 0 PID: 6746 Comm: kworker/u4:8 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Workqueue: usbip_event event_handler
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
print_address_description+0x60/0x2d0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xdf/0x130 mm/kasan/report.c:451
vhci_shutdown_connection+0x211/0x580 drivers/usb/usbip/vhci_hcd.c:1057
event_handler+0x299/0x460 drivers/usb/usbip/usbip_event.c:79
process_one_work+0x867/0xff0 kernel/workqueue.c:2310
worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
kthread+0x42e/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
</TASK>
Allocated by task 1:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc mm/kasan/common.c:513 [inline]
__kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522
kmalloc include/linux/slab.h:612 [inline]
kzalloc include/linux/slab.h:738 [inline]
__usb_create_hcd+0x5f/0x830 drivers/usb/core/hcd.c:2587
vhci_hcd_probe+0xff/0x370 drivers/usb/usbip/vhci_hcd.c:1376
platform_probe+0x137/0x1c0 drivers/base/platform.c:1391
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x276/0xc70 drivers/base/dd.c:595
__driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775
driver_probe_device+0x4f/0x420 drivers/base/dd.c:805
__device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927
bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
__device_attach+0x2a7/0x480 drivers/base/dd.c:999
bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
device_add+0xbcf/0x1050 drivers/base/core.c:3427
platform_device_add+0x4bf/0x830 drivers/base/platform.c:712
vhci_hcd_init+0x3c7/0x500 drivers/usb/usbip/vhci_hcd.c:1571
do_one_initcall+0x272/0x730 init/main.c:1315
do_initcall_level+0x13d/0x1f0 init/main.c:1388
do_initcalls+0x4b/0x90 init/main.c:1404
kernel_init_freeable+0x3d5/0x560 init/main.c:1628
kernel_init+0x19/0x1b0 init/main.c:1519
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Freed by task 8959:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1710 [inline]
slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736
slab_free mm/slub.c:3504 [inline]
kfree+0xef/0x2a0 mm/slub.c:4564
vhci_hcd_remove+0xe0/0x100 drivers/usb/usbip/vhci_hcd.c:1434
platform_remove+0x92/0xe0 drivers/base/platform.c:1413
__device_release_driver drivers/base/dd.c:1247 [inline]
device_release_driver_internal+0x44c/0x710 drivers/base/dd.c:1282
unbind_store+0x2e2/0x300 drivers/base/bus.c:193
kernfs_fop_write_iter+0x3a8/0x500 fs/kernfs/file.c:296
call_write_iter include/linux/fs.h:2173 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x748/0xd70 fs/read_write.c:594
ksys_write+0x153/0x260 fs/read_write.c:647
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
The buggy address belongs to the object at ffff8880241c4000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 2480 bytes inside of
8192-byte region [ffff8880241c4000, ffff8880241c6000)
The buggy address belongs to the page:
page:ffffea0000907000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x241c0
head:ffffea0000907000 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888016c42280
raw: 0000000000000000 0000000000020002 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 11641133143, free_ts 0
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192
__alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501
alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031
alloc_slab_page mm/slub.c:1780 [inline]
allocate_slab mm/slub.c:1917 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1980
___slab_alloc+0x807/0xdd0 mm/slub.c:3013
__slab_alloc mm/slub.c:3100 [inline]
slab_alloc_node mm/slub.c:3191 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc_trace+0xf9/0x290 mm/slub.c:3250
kmalloc include/linux/slab.h:607 [inline]
kzalloc include/linux/slab.h:738 [inline]
init+0x68e/0x1170 drivers/usb/gadget/udc/dummy_hcd.c:2820
do_one_initcall+0x272/0x730 init/main.c:1315
do_initcall_level+0x13d/0x1f0 init/main.c:1388
do_initcalls+0x4b/0x90 init/main.c:1404
kernel_init_freeable+0x3d5/0x560 init/main.c:1628
kernel_init+0x19/0x1b0 init/main.c:1519
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
page_owner free stack trace missing
Memory state around the buggy address:
ffff8880241c4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880241c4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880241c4980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880241c4a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880241c4a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
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