usb 1-1: SerialNumber: syz usb 1-1: config 0 descriptor?? usb 1-1: USB disconnect, device number 2 ================================================================== BUG: KASAN: slab-use-after-free in hdm_disconnect+0xf8/0x190 drivers/most/most_usb.c:1125 Read of size 8 at addr ffff0000d31bd8b0 by task kworker/1:1/26 CPU: 1 UID: 0 PID: 26 Comm: kworker/1:1 Not tainted 6.11.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Workqueue: usb_hub_wq hub_event Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x178/0x518 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 hdm_disconnect+0xf8/0x190 drivers/most/most_usb.c:1125 usb_unbind_interface+0x22c/0x7ec drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:568 [inline] __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x440/0x698 drivers/base/dd.c:1295 device_release_driver+0x28/0x38 drivers/base/dd.c:1318 bus_remove_device+0x314/0x3b4 drivers/base/bus.c:574 device_del+0x480/0x828 drivers/base/core.c:3871 usb_disable_device+0x354/0x760 drivers/usb/core/message.c:1418 usb_disconnect+0x290/0x808 drivers/usb/core/hub.c:2304 hub_port_connect drivers/usb/core/hub.c:5361 [inline] hub_port_connect_change drivers/usb/core/hub.c:5661 [inline] port_event drivers/usb/core/hub.c:5821 [inline] hub_event+0x1918/0x4280 drivers/usb/core/hub.c:5903 process_one_work+0x79c/0x15b8 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x978/0xec4 kernel/workqueue.c:3389 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Allocated by task 26: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x90/0xa8 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __kmalloc_cache_noprof+0x240/0x340 mm/slub.c:4189 kmalloc_noprof include/linux/slab.h:681 [inline] kzalloc_noprof include/linux/slab.h:807 [inline] hdm_probe+0xa4/0x1044 drivers/most/most_usb.c:959 usb_probe_interface+0x57c/0xa24 drivers/usb/core/driver.c:399 really_probe+0x38c/0x8fc drivers/base/dd.c:657 __driver_probe_device+0x194/0x374 drivers/base/dd.c:799 driver_probe_device+0x78/0x330 drivers/base/dd.c:829 __device_attach_driver+0x2a8/0x4f4 drivers/base/dd.c:957 bus_for_each_drv+0x228/0x2bc drivers/base/bus.c:457 __device_attach+0x2b4/0x434 drivers/base/dd.c:1029 device_initial_probe+0x24/0x34 drivers/base/dd.c:1078 bus_probe_device+0x178/0x240 drivers/base/bus.c:532 device_add+0x728/0xa6c drivers/base/core.c:3682 usb_set_configuration+0x15cc/0x1b38 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x8c/0x148 drivers/usb/core/generic.c:254 usb_probe_device+0x1a4/0x348 drivers/usb/core/driver.c:294 really_probe+0x38c/0x8fc drivers/base/dd.c:657 __driver_probe_device+0x194/0x374 drivers/base/dd.c:799 driver_probe_device+0x78/0x330 drivers/base/dd.c:829 __device_attach_driver+0x2a8/0x4f4 drivers/base/dd.c:957 bus_for_each_drv+0x228/0x2bc drivers/base/bus.c:457 __device_attach+0x2b4/0x434 drivers/base/dd.c:1029 device_initial_probe+0x24/0x34 drivers/base/dd.c:1078 bus_probe_device+0x178/0x240 drivers/base/bus.c:532 device_add+0x728/0xa6c drivers/base/core.c:3682 usb_new_device+0x908/0x149c drivers/usb/core/hub.c:2651 hub_port_connect drivers/usb/core/hub.c:5521 [inline] hub_port_connect_change drivers/usb/core/hub.c:5661 [inline] port_event drivers/usb/core/hub.c:5821 [inline] hub_event+0x2454/0x4280 drivers/usb/core/hub.c:5903 process_one_work+0x79c/0x15b8 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x978/0xec4 kernel/workqueue.c:3389 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Freed by task 26: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:68 kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:579 poison_slab_object+0x128/0x180 mm/kasan/common.c:240 __kasan_slab_free+0x1c/0x48 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2252 [inline] slab_free mm/slub.c:4473 [inline] kfree+0x13c/0x3bc mm/slub.c:4594 release_mdev+0x20/0x30 drivers/most/most_usb.c:932 device_release+0x8c/0x1ac kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x2a8/0x41c lib/kobject.c:737 put_device drivers/base/core.c:3790 [inline] device_unregister+0x3c/0xcc drivers/base/core.c:3913 most_deregister_interface+0x3e0/0x42c drivers/most/core.c:1402 hdm_disconnect+0xe0/0x190 drivers/most/most_usb.c:1123 usb_unbind_interface+0x22c/0x7ec drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:568 [inline] __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x440/0x698 drivers/base/dd.c:1295 device_release_driver+0x28/0x38 drivers/base/dd.c:1318 bus_remove_device+0x314/0x3b4 drivers/base/bus.c:574 device_del+0x480/0x828 drivers/base/core.c:3871 usb_disable_device+0x354/0x760 drivers/usb/core/message.c:1418 usb_disconnect+0x290/0x808 drivers/usb/core/hub.c:2304 hub_port_connect drivers/usb/core/hub.c:5361 [inline] hub_port_connect_change drivers/usb/core/hub.c:5661 [inline] port_event drivers/usb/core/hub.c:5821 [inline] hub_event+0x1918/0x4280 drivers/usb/core/hub.c:5903 process_one_work+0x79c/0x15b8 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x978/0xec4 kernel/workqueue.c:3389 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 The buggy address belongs to the object at ffff0000d31bc000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 6320 bytes inside of freed 8192-byte region [ffff0000d31bc000, ffff0000d31be000) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1131b8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0x5ffc00000000040(head|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 05ffc00000000040 ffff0000c0002280 0000000000000000 dead000000000001 raw: 0000000000000000 0000000080020002 00000001fdffffff 0000000000000000 head: 05ffc00000000040 ffff0000c0002280 0000000000000000 dead000000000001 head: 0000000000000000 0000000080020002 00000001fdffffff 0000000000000000 head: 05ffc00000000003 fffffdffc34c6e01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d31bd780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d31bd800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000d31bd880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000d31bd900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000d31bd980: 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: 1 PID: 26 at lib/refcount.c:28 refcount_warn_saturate+0x1c8/0x20c lib/refcount.c:28 Modules linked in: CPU: 1 UID: 0 PID: 26 Comm: kworker/1:1 Tainted: G B 6.11.0-rc5-syzkaller #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Workqueue: usb_hub_wq hub_event pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0x1c8/0x20c lib/refcount.c:28 lr : refcount_warn_saturate+0x1c8/0x20c lib/refcount.c:28 sp : ffff800091d472a0 x29: ffff800091d472a0 x28: 0000000000000000 x27: ffff0000c6043000 x26: 1fffe0001c818a07 x25: dfff800000000000 x24: ffff80008fa33410 x23: 1fffe0001a6378a2 x22: ffff0000e40c503c x21: 0000000000000003 x20: ffff0000e40c5038 x19: ffff80008ffc8000 x18: 0000000000000008 x17: 0000000000000000 x16: ffff80008a21c000 x15: 0000000000000001 x14: 1ffff000123a8da4 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000002 x10: 0000000000ff0100 x9 : 6c696cd53a379700 x8 : 6c696cd53a379700 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff800091d469f8 x4 : ffff80008d938ca0 x3 : ffff800082c48c08 x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000000 Call trace: refcount_warn_saturate+0x1c8/0x20c lib/refcount.c:28 __refcount_sub_and_test include/linux/refcount.h:275 [inline] __refcount_dec_and_test include/linux/refcount.h:307 [inline] refcount_dec_and_test include/linux/refcount.h:325 [inline] kref_put include/linux/kref.h:64 [inline] kobject_put+0x1a0/0x41c lib/kobject.c:737 put_device+0x28/0x40 drivers/base/core.c:3790 hdm_disconnect+0x170/0x190 drivers/most/most_usb.c:1129 usb_unbind_interface+0x22c/0x7ec drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:568 [inline] __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x440/0x698 drivers/base/dd.c:1295 device_release_driver+0x28/0x38 drivers/base/dd.c:1318 bus_remove_device+0x314/0x3b4 drivers/base/bus.c:574 device_del+0x480/0x828 drivers/base/core.c:3871 usb_disable_device+0x354/0x760 drivers/usb/core/message.c:1418 usb_disconnect+0x290/0x808 drivers/usb/core/hub.c:2304 hub_port_connect drivers/usb/core/hub.c:5361 [inline] hub_port_connect_change drivers/usb/core/hub.c:5661 [inline] port_event drivers/usb/core/hub.c:5821 [inline] hub_event+0x1918/0x4280 drivers/usb/core/hub.c:5903 process_one_work+0x79c/0x15b8 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x978/0xec4 kernel/workqueue.c:3389 kthread+0x288/0x310 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 irq event stamp: 132657 hardirqs last enabled at (132657): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1427 [inline] hardirqs last enabled at (132657): [] finish_lock_switch+0xbc/0x1e4 kernel/sched/core.c:4942 hardirqs last disabled at (132656): [] __schedule+0x2b4/0x2400 kernel/sched/core.c:6416 softirqs last enabled at (131976): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (131976): [] handle_softirqs+0xa3c/0xbfc kernel/softirq.c:582 softirqs last disabled at (131965): [] __do_softirq+0x14/0x20 kernel/softirq.c:588 ---[ end trace 0000000000000000 ]--- usb 1-1: new high-speed USB device number 6 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??