vhci_hcd vhci_hcd.0: stop threads
vhci_hcd vhci_hcd.0: release socket
==================================================================
BUG: KASAN: slab-use-after-free in vhci_cleanup_unlink_list+0x452/0x460
Read of size 4 at addr ffff88816be2c450 by task kworker/u8:4/5698

CPU: 1 UID: 0 PID: 5698 Comm: kworker/u8:4 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: usbip_event event_handler
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 vhci_cleanup_unlink_list+0x452/0x460
 vhci_shutdown_connection+0x2af/0x650
 event_handler+0x2a4/0x4b0
 process_scheduled_works+0xa8e/0x14e0
 worker_thread+0xa47/0xfb0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 1:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_noprof+0x375/0x720
 __usb_create_hcd+0x67/0x900
 vhci_hcd_probe+0x104/0x3e0
 platform_probe+0xf9/0x190
 really_probe+0x254/0xae0
 __driver_probe_device+0x1e8/0x360
 driver_probe_device+0x4f/0x240
 __device_attach_driver+0x270/0x410
 bus_for_each_drv+0x258/0x2f0
 __device_attach+0x2c4/0x450
 device_initial_probe+0xa1/0xd0
 bus_probe_device+0x12a/0x220
 device_add+0x7d7/0xb80
 platform_device_add+0x4bd/0x860
 platform_device_register_full+0x62d/0x710
 vhci_hcd_init+0x227/0x360
 do_one_initcall+0x250/0x870
 do_initcall_level+0x10a/0x1a0
 do_initcalls+0x59/0xa0
 kernel_init_freeable+0x29d/0x3e0
 kernel_init+0x1d/0x1d0
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Freed by task 7344:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x640
 vhci_hcd_remove+0xe4/0x110
 device_release_driver_internal+0x48b/0x880
 unbind_store+0x1a1/0x1d0
 kernfs_fop_write_iter+0x3a4/0x540
 vfs_write+0x612/0xba0
 ksys_write+0x150/0x270
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 insert_work+0x3d/0x330
 __queue_work+0xcd8/0x10a0
 queue_work_on+0x106/0x1d0
 unlink1+0x344/0x3e0
 usb_hcd_unlink_urb+0xe6/0x1e0
 usb_kill_urb+0x10b/0x2f0
 hub_quiesce+0x211/0x330
 hub_suspend+0x904/0xad0
 usb_suspend_both+0x285/0x1040
 usb_runtime_suspend+0x58/0x110
 __rpm_callback+0x2c7/0x950
 rpm_suspend+0x8a0/0x17b0
 __pm_runtime_suspend+0x12f/0x1a0
 usb_runtime_idle+0x76/0x90
 rpm_idle+0x5b4/0x980
 pm_runtime_work+0x11e/0x1b0
 process_scheduled_works+0xa8e/0x14e0
 worker_thread+0xa47/0xfb0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Second to last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 insert_work+0x3d/0x330
 __queue_work+0xcd8/0x10a0
 queue_work_on+0x106/0x1d0
 usb_hcd_submit_urb+0xa3b/0x1b60
 usb_start_wait_urb+0x13f/0x5b0
 usb_control_msg+0x234/0x3e0
 hub_ext_port_status+0x114/0x810
 hub_activate+0x740/0x1b20
 process_scheduled_works+0xa8e/0x14e0
 worker_thread+0xa47/0xfb0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

The buggy address belongs to the object at ffff88816be2c000
 which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 1104 bytes inside of
 freed 8192-byte region [ffff88816be2c000, ffff88816be2e000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x16be28
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000040 ffff888100042280 dead000000000122 0000000000000000
raw: 0000000000000000 0000000800020002 00000000f5000000 0000000000000000
head: 057ff00000000040 ffff888100042280 dead000000000122 0000000000000000
head: 0000000000000000 0000000800020002 00000000f5000000 0000000000000000
head: 057ff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
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, tgid 1 (swapper/0), ts 11093171909, free_ts 0
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x21fa/0x2270
 __alloc_frozen_pages_noprof+0x18d/0x380
 allocate_slab+0x79/0x5e0
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2bf/0x6b0
 __kmalloc_noprof+0x485/0x720
 __usb_create_hcd+0x67/0x900
 vhci_hcd_probe+0x104/0x3e0
 platform_probe+0xf9/0x190
 really_probe+0x254/0xae0
 __driver_probe_device+0x1e8/0x360
 driver_probe_device+0x4f/0x240
 __device_attach_driver+0x270/0x410
 bus_for_each_drv+0x258/0x2f0
 __device_attach+0x2c4/0x450
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88816be2c300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88816be2c380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88816be2c400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                 ^
 ffff88816be2c480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88816be2c500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
