vhci_hcd: release socket vhci_hcd: disconnect device vhci_hcd: stop threads vhci_hcd: release socket ================================================================== BUG: KASAN: use-after-free in vdev_to_vhci_hcd drivers/usb/usbip/vhci.h:171 [inline] BUG: KASAN: use-after-free in vhci_cleanup_unlink_list+0x44d/0x460 drivers/usb/usbip/vhci_hcd.c:981 Read of size 4 at addr ffff8880205c4670 by task kworker/u4:13/4722 CPU: 1 PID: 4722 Comm: kworker/u4:13 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: 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 vdev_to_vhci_hcd drivers/usb/usbip/vhci.h:171 [inline] vhci_cleanup_unlink_list+0x44d/0x460 drivers/usb/usbip/vhci_hcd.c:981 vhci_device_unlink_cleanup drivers/usb/usbip/vhci_hcd.c:1024 [inline] vhci_shutdown_connection+0x2a0/0x580 drivers/usb/usbip/vhci_hcd.c:1064 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 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 5596: 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 ffff8880205c4000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 1648 bytes inside of 8192-byte region [ffff8880205c4000, ffff8880205c6000) The buggy address belongs to the page: page:ffffea0000817000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x205c0 head:ffffea0000817000 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 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 7105963599, 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] __kmalloc+0x11d/0x340 mm/slub.c:4408 kmalloc_array include/linux/slab.h:647 [inline] fb_show_logo_line drivers/video/fbdev/core/fbmem.c:494 [inline] fb_show_logo+0xf1c/0x1c10 drivers/video/fbdev/core/fbmem.c:698 fbcon_switch+0x15cc/0x2040 drivers/video/fbdev/core/fbcon.c:2162 redraw_screen+0x581/0x1000 drivers/tty/vt/vt.c:1021 do_bind_con_driver+0xe9d/0x1030 drivers/tty/vt/vt.c:3719 do_take_over_console+0x87c/0xa00 drivers/tty/vt/vt.c:4274 do_fbcon_takeover+0x12e/0x230 drivers/video/fbdev/core/fbcon.c:525 do_register_framebuffer drivers/video/fbdev/core/fbmem.c:1703 [inline] register_framebuffer+0x7d7/0xa70 drivers/video/fbdev/core/fbmem.c:1920 __drm_fb_helper_initial_config_and_unlock+0x1104/0x16d0 drivers/gpu/drm/drm_fb_helper.c:1871 drm_fb_helper_initial_config drivers/gpu/drm/drm_fb_helper.c:1937 [inline] drm_fbdev_client_hotplug+0x4f9/0x750 drivers/gpu/drm/drm_fb_helper.c:2442 drm_fbdev_generic_setup+0x169/0x3f0 drivers/gpu/drm/drm_fb_helper.c:2529 page_owner free stack trace missing Memory state around the buggy address: ffff8880205c4500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880205c4580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880205c4600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880205c4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880205c4700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================