usb 1-1: SerialNumber: syz usb 1-1: config 0 descriptor?? usb 1-1: USB disconnect, device number 2 ================================================================== BUG: KASAN: use-after-free in hdm_disconnect+0xf4/0x18c drivers/most/most_usb.c:1125 Read of size 8 at addr ffff0000c158d978 by task kworker/0:6/4139 CPU: 0 PID: 4139 Comm: kworker/0:6 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: usb_hub_wq hub_event Call trace: dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x78/0x30c mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xec/0x15c mm/kasan/report.c:451 __asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309 hdm_disconnect+0xf4/0x18c drivers/most/most_usb.c:1125 usb_unbind_interface+0x1b8/0x750 drivers/usb/core/driver.c:458 __device_release_driver drivers/base/dd.c:1229 [inline] device_release_driver_internal+0x3fc/0x63c drivers/base/dd.c:1262 device_release_driver+0x28/0x38 drivers/base/dd.c:1285 bus_remove_device+0x294/0x388 drivers/base/bus.c:531 device_del+0x568/0x964 drivers/base/core.c:3600 usb_disable_device+0x33c/0x780 drivers/usb/core/message.c:1414 usb_disconnect+0x290/0x7d0 drivers/usb/core/hub.c:2287 hub_port_connect drivers/usb/core/hub.c:5341 [inline] hub_port_connect_change drivers/usb/core/hub.c:5637 [inline] port_event drivers/usb/core/hub.c:5799 [inline] hub_event+0x1610/0x42c0 drivers/usb/core/hub.c:5881 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:856 Allocated by task 4139: 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+0xb0/0xf0 mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x274/0x3fc mm/slub.c:3252 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:735 [inline] hdm_probe+0x9c/0x1044 drivers/most/most_usb.c:959 usb_probe_interface+0x4fc/0x994 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26c/0xaec drivers/base/dd.c:595 __driver_probe_device+0x180/0x314 drivers/base/dd.c:755 driver_probe_device+0x78/0x34c drivers/base/dd.c:785 __device_attach_driver+0x274/0x4c4 drivers/base/dd.c:907 bus_for_each_drv+0x150/0x1d8 drivers/base/bus.c:429 __device_attach+0x2a8/0x3d4 drivers/base/dd.c:979 device_initial_probe+0x24/0x34 drivers/base/dd.c:1028 bus_probe_device+0xbc/0x1c4 drivers/base/bus.c:489 device_add+0xb04/0xf94 drivers/base/core.c:3412 usb_set_configuration+0x15b8/0x1b2c drivers/usb/core/message.c:2165 usb_generic_driver_probe+0x8c/0x144 drivers/usb/core/generic.c:238 usb_probe_device+0x120/0x25c drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26c/0xaec drivers/base/dd.c:595 __driver_probe_device+0x180/0x314 drivers/base/dd.c:755 driver_probe_device+0x78/0x34c drivers/base/dd.c:785 __device_attach_driver+0x274/0x4c4 drivers/base/dd.c:907 bus_for_each_drv+0x150/0x1d8 drivers/base/bus.c:429 __device_attach+0x2a8/0x3d4 drivers/base/dd.c:979 device_initial_probe+0x24/0x34 drivers/base/dd.c:1028 bus_probe_device+0xbc/0x1c4 drivers/base/bus.c:489 device_add+0xb04/0xf94 drivers/base/core.c:3412 usb_new_device+0x7ec/0x1164 drivers/usb/core/hub.c:2632 hub_port_connect drivers/usb/core/hub.c:5497 [inline] hub_port_connect_change drivers/usb/core/hub.c:5637 [inline] port_event drivers/usb/core/hub.c:5799 [inline] hub_event+0x2240/0x42c0 drivers/usb/core/hub.c:5881 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:856 Freed by task 4139: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x84 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360 ____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0x128/0x1e8 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0x170/0x40c mm/slub.c:4564 release_mdev+0x20/0x30 drivers/most/most_usb.c:932 device_release+0x8c/0x1ac drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:713 [inline] kobject_release lib/kobject.c:744 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2cc/0x454 lib/kobject.c:761 put_device drivers/base/core.c:3520 [inline] device_unregister+0x3c/0xcc drivers/base/core.c:3634 most_deregister_interface+0x3e0/0x42c drivers/most/core.c:1402 hdm_disconnect+0xdc/0x18c drivers/most/most_usb.c:1123 usb_unbind_interface+0x1b8/0x750 drivers/usb/core/driver.c:458 __device_release_driver drivers/base/dd.c:1229 [inline] device_release_driver_internal+0x3fc/0x63c drivers/base/dd.c:1262 device_release_driver+0x28/0x38 drivers/base/dd.c:1285 bus_remove_device+0x294/0x388 drivers/base/bus.c:531 device_del+0x568/0x964 drivers/base/core.c:3600 usb_disable_device+0x33c/0x780 drivers/usb/core/message.c:1414 usb_disconnect+0x290/0x7d0 drivers/usb/core/hub.c:2287 hub_port_connect drivers/usb/core/hub.c:5341 [inline] hub_port_connect_change drivers/usb/core/hub.c:5637 [inline] port_event drivers/usb/core/hub.c:5799 [inline] hub_event+0x1610/0x42c0 drivers/usb/core/hub.c:5881 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:856 The buggy address belongs to the object at ffff0000c158c000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 6520 bytes inside of 8192-byte region [ffff0000c158c000, ffff0000c158e000) The buggy address belongs to the page: page:000000002cd773f5 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101588 head:000000002cd773f5 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 0000000000000000 dead000000000122 ffff0000c0002c00 raw: 0000000000000000 0000000080020002 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c158d800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000c158d880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000c158d900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000c158d980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000c158da00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 4139 at lib/refcount.c:28 refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 Modules linked in: CPU: 0 PID: 4139 Comm: kworker/0:6 Tainted: G B syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Workqueue: usb_hub_wq hub_event pstate: 62400005 (nZCv daif +PAN -UAO +TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 lr : refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 sp : ffff80001f3473e0 x29: ffff80001f3473e0 x28: ffff8000160ca660 x27: 1fffe00018fc6400 x26: 1fffe00018fc6407 x25: dfff800000000000 x24: ffff0000c7e31030 x23: 1fffe000182b18bb x22: ffff0000c7e3203c x21: 0000000000000000 x20: ffff0000c7e32038 x19: ffff8000165c5000 x18: 0000000000000001 x17: 0000000000000000 x16: ffff800008302168 x15: 00000000ffffffff x14: 0000000000ff0100 x13: 0000000000000001 x12: 0000000000ff0100 x11: 0000000000000000 x10: 0000000000000000 x9 : a4eee3312fa9e800 x8 : a4eee3312fa9e800 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff80001f346cd8 x4 : ffff80001425f420 x3 : ffff800008302278 x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026 Call trace: refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 __refcount_sub_and_test include/linux/refcount.h:283 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] kref_put include/linux/kref.h:64 [inline] kobject_put+0x19c/0x454 lib/kobject.c:761 put_device+0x28/0x40 drivers/base/core.c:3520 hdm_disconnect+0x16c/0x18c drivers/most/most_usb.c:1129 usb_unbind_interface+0x1b8/0x750 drivers/usb/core/driver.c:458 __device_release_driver drivers/base/dd.c:1229 [inline] device_release_driver_internal+0x3fc/0x63c drivers/base/dd.c:1262 device_release_driver+0x28/0x38 drivers/base/dd.c:1285 bus_remove_device+0x294/0x388 drivers/base/bus.c:531 device_del+0x568/0x964 drivers/base/core.c:3600 usb_disable_device+0x33c/0x780 drivers/usb/core/message.c:1414 usb_disconnect+0x290/0x7d0 drivers/usb/core/hub.c:2287 hub_port_connect drivers/usb/core/hub.c:5341 [inline] hub_port_connect_change drivers/usb/core/hub.c:5637 [inline] port_event drivers/usb/core/hub.c:5799 [inline] hub_event+0x1610/0x42c0 drivers/usb/core/hub.c:5881 process_one_work+0x79c/0x1140 kernel/workqueue.c:2310 worker_thread+0x8f4/0x101c kernel/workqueue.c:2457 kthread+0x374/0x454 kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:856 irq event stamp: 12380 hardirqs last enabled at (12379): [] kasan_quarantine_put+0xc4/0x204 mm/kasan/quarantine.c:231 hardirqs last disabled at (12380): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (12380): [] _raw_spin_lock_irqsave+0xfc/0x14c kernel/locking/spinlock.c:162 softirqs last enabled at (11730): [] spin_unlock_bh include/linux/spinlock.h:408 [inline] softirqs last enabled at (11730): [] __fib6_clean_all+0x1ec/0x320 net/ipv6/ip6_fib.c:2261 softirqs last disabled at (11724): [] spin_lock_bh include/linux/spinlock.h:368 [inline] softirqs last disabled at (11724): [] __fib6_clean_all+0x1ac/0x320 net/ipv6/ip6_fib.c:2258 ---[ end trace 9d0d8511e66983be ]--- usb 1-1: new high-speed USB device number 3 using dummy_hcd usb 1-1: Using ep0 maxpacket: 32 usb 1-1: config 0 has an invalid interface number: 237 but max is 0 usb 1-1: config 0 has no interface number 0 usb 1-1: New USB device found, idVendor=0424, idProduct=cf19, bcdDevice=55.89 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: syz usb 1-1: Manufacturer: syz usb 1-1: SerialNumber: syz usb 1-1: config 0 descriptor?? usb 1-1: USB disconnect, device number 3 usb 1-1: new high-speed USB device number 4 using dummy_hcd usb 1-1: Using ep0 maxpacket: 32 usb 1-1: config 0 has an invalid interface number: 237 but max is 0 usb 1-1: config 0 has no interface number 0 usb 1-1: New USB device found, idVendor=0424, idProduct=cf19, bcdDevice=55.89 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: syz usb 1-1: Manufacturer: syz usb 1-1: SerialNumber: syz usb 1-1: config 0 descriptor?? usb 1-1: USB disconnect, device number 4 usb 1-1: USB disconnect, device number 5