================================================================== BUG: KASAN: slab-use-after-free in list_empty include/linux/list.h:373 [inline] BUG: KASAN: slab-use-after-free in driver_deferred_probe_del+0x78/0x240 drivers/base/dd.c:148 Read of size 8 at addr ffff888102a4d8a8 by task syz.3.37/457 CPU: 1 UID: 0 PID: 457 Comm: syz.3.37 Not tainted syzkaller #0 d75e9a393de9c6a33055d5e25749154d2cb9f431 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:94 dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120 print_address_description+0x71/0x210 mm/kasan/report.c:377 print_report+0x4a/0x70 mm/kasan/report.c:481 kasan_report+0x162/0x1a0 mm/kasan/report.c:594 __asan_report_load8_noabort+0x18/0x20 mm/kasan/report_generic.c:381 list_empty include/linux/list.h:373 [inline] driver_deferred_probe_del+0x78/0x240 drivers/base/dd.c:148 device_del+0x593/0xcf0 drivers/base/core.c:3883 usb_del_gadget+0x18f/0x200 drivers/usb/gadget/udc/core.c:1577 usb_del_gadget_udc+0x19/0x30 drivers/usb/gadget/udc/core.c:1593 dummy_udc_remove+0x5c/0x70 drivers/usb/gadget/udc/dummy_hcd.c:1123 platform_remove+0x7e/0xb0 drivers/base/platform.c:1424 device_remove drivers/base/dd.c:567 [inline] __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x4ad/0x830 drivers/base/dd.c:1295 device_driver_detach+0x3f/0x50 drivers/base/dd.c:1331 unbind_store+0x1ab/0x1f0 drivers/base/bus.c:244 drv_attr_store+0x91/0xb0 drivers/base/bus.c:125 sysfs_kf_write+0x141/0x160 fs/sysfs/file.c:136 kernfs_fop_write_iter+0x319/0x510 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x762/0xfd0 fs/read_write.c:684 ksys_write+0x145/0x260 fs/read_write.c:737 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __x64_sys_write+0x7f/0x90 fs/read_write.c:746 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2 do_syscall_x64 arch/x86/entry/common.c:47 [inline] do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fa9c199e019 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa9c27af028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fa9c1c25fa0 RCX: 00007fa9c199e019 RDX: 000000000000000b RSI: 0000200000000400 RDI: 0000000000000003 RBP: 00007fa9c1a3500c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fa9c1c26038 R14: 00007fa9c1c25fa0 R15: 00007fff1ed7dde8 Allocated by task 453: kasan_save_stack mm/kasan/common.c:49 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:70 kasan_save_alloc_info+0x3a/0x50 mm/kasan/generic.c:565 poison_kmalloc_redzone mm/kasan/common.c:379 [inline] __kasan_kmalloc+0x96/0xb0 mm/kasan/common.c:396 kasan_kmalloc include/linux/kasan.h:261 [inline] __kmalloc_cache_noprof+0x23c/0x470 mm/slub.c:4426 kmalloc_noprof include/linux/slab.h:881 [inline] kzalloc_noprof include/linux/slab.h:1017 [inline] device_private_init drivers/base/core.c:3537 [inline] device_add+0xc1/0xbf0 drivers/base/core.c:3588 usb_add_gadget+0x43e/0x780 drivers/usb/gadget/udc/core.c:1448 usb_add_gadget_udc_release drivers/usb/gadget/udc/core.c:1504 [inline] usb_add_gadget_udc+0x11e/0x160 drivers/usb/gadget/udc/core.c:1551 dummy_udc_probe+0x6ea/0x7f0 drivers/usb/gadget/udc/dummy_hcd.c:1102 platform_probe+0x17a/0x200 drivers/base/platform.c:1404 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2e1/0x8b0 drivers/base/dd.c:657 __driver_probe_device+0x193/0x280 drivers/base/dd.c:799 device_driver_attach+0xdb/0x1f0 drivers/base/dd.c:1126 bind_store+0x1dc/0x230 drivers/base/bus.c:267 drv_attr_store+0x91/0xb0 drivers/base/bus.c:125 sysfs_kf_write+0x141/0x160 fs/sysfs/file.c:136 kernfs_fop_write_iter+0x319/0x510 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x762/0xfd0 fs/read_write.c:684 ksys_write+0x145/0x260 fs/read_write.c:737 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __x64_sys_write+0x7f/0x90 fs/read_write.c:746 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2 do_syscall_x64 arch/x86/entry/common.c:47 [inline] do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 457: kasan_save_stack mm/kasan/common.c:49 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:70 kasan_save_free_info+0x44/0x50 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:249 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:266 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2445 [inline] slab_free mm/slub.c:4714 [inline] kfree+0x158/0x440 mm/slub.c:4875 device_release+0xb6/0x1e0 drivers/base/core.c:2572 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1a7/0x2a0 lib/kobject.c:737 put_device+0x23/0x40 drivers/base/core.c:3800 klist_devices_put+0x3c/0x60 drivers/base/bus.c:817 klist_put lib/klist.c:221 [inline] klist_del+0xf5/0x120 lib/klist.c:230 bus_remove_device+0x33f/0x370 drivers/base/bus.c:572 device_del+0x583/0xcf0 drivers/base/core.c:3881 usb_del_gadget+0x18f/0x200 drivers/usb/gadget/udc/core.c:1577 usb_del_gadget_udc+0x19/0x30 drivers/usb/gadget/udc/core.c:1593 dummy_udc_remove+0x5c/0x70 drivers/usb/gadget/udc/dummy_hcd.c:1123 platform_remove+0x7e/0xb0 drivers/base/platform.c:1424 device_remove drivers/base/dd.c:567 [inline] __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x4ad/0x830 drivers/base/dd.c:1295 device_driver_detach+0x3f/0x50 drivers/base/dd.c:1331 unbind_store+0x1ab/0x1f0 drivers/base/bus.c:244 drv_attr_store+0x91/0xb0 drivers/base/bus.c:125 sysfs_kf_write+0x141/0x160 fs/sysfs/file.c:136 kernfs_fop_write_iter+0x319/0x510 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x762/0xfd0 fs/read_write.c:684 ksys_write+0x145/0x260 fs/read_write.c:737 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __x64_sys_write+0x7f/0x90 fs/read_write.c:746 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2 do_syscall_x64 arch/x86/entry/common.c:47 [inline] do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x76/0x7e The buggy address belongs to the object at ffff888102a4d800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 168 bytes inside of freed 256-byte region [ffff888102a4d800, ffff888102a4d900) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a4c head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x4000000000000040(head|zone=1) page_type: f5(slab) raw: 4000000000000040 ffff888100041b40 ffffea000413ff80 dead000000000004 raw: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000 head: 4000000000000040 ffff888100041b40 ffffea000413ff80 dead000000000004 head: 0000000000000000 0000000000100010 00000001f5000000 0000000000000000 head: 4000000000000001 ffffea00040a9301 ffffffffffffffff 0000000000000000 head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 3443539027, free_ts 0 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook+0x37d/0x3b0 mm/page_alloc.c:1863 prep_new_page+0x2d/0x180 mm/page_alloc.c:1871 get_page_from_freelist+0x4aea/0x4ba0 mm/page_alloc.c:3948 __alloc_pages_noprof+0x35a/0x7e0 mm/page_alloc.c:5315 alloc_slab_page+0x6b/0x1e0 mm/slub.c:-1 allocate_slab+0x69/0x430 mm/slub.c:2687 new_slab mm/slub.c:2741 [inline] ___slab_alloc+0x591/0x8c0 mm/slub.c:3934 __slab_alloc mm/slub.c:4025 [inline] __slab_alloc_node mm/slub.c:4078 [inline] slab_alloc_node mm/slub.c:4239 [inline] __kmalloc_cache_noprof+0x2cd/0x470 mm/slub.c:4421 kmalloc_noprof include/linux/slab.h:881 [inline] kzalloc_noprof include/linux/slab.h:1017 [inline] device_private_init drivers/base/core.c:3537 [inline] device_add+0xc1/0xbf0 drivers/base/core.c:3588 device_register+0x21/0x30 drivers/base/core.c:3774 usb_hub_create_port_device+0x3c7/0xd10 drivers/usb/core/port.c:768 hub_configure drivers/usb/core/hub.c:1741 [inline] hub_probe+0x2268/0x2f80 drivers/usb/core/hub.c:2008 usb_probe_interface+0x6a8/0xbf0 drivers/usb/core/driver.c:400 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x2e1/0x8b0 drivers/base/dd.c:657 __driver_probe_device+0x193/0x280 drivers/base/dd.c:799 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829 page_owner free stack trace missing Memory state around the buggy address: ffff888102a4d780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888102a4d800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888102a4d880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888102a4d900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888102a4d980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 457 at lib/refcount.c:28 refcount_warn_saturate+0x119/0x1c0 lib/refcount.c:28 Modules linked in: CPU: 0 UID: 0 PID: 457 Comm: syz.3.37 Tainted: G B syzkaller #0 d75e9a393de9c6a33055d5e25749154d2cb9f431 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 RIP: 0010:refcount_warn_saturate+0x119/0x1c0 lib/refcount.c:28 Code: 05 01 48 c7 c7 c0 e9 51 86 e8 53 78 55 fe 0f 0b eb da e8 1a a0 d8 fe c6 05 98 79 36 05 01 48 c7 c7 20 ea 51 86 e8 37 78 55 fe <0f> 0b eb be e8 fe 9f d8 fe c6 05 79 79 36 05 01 48 c7 c7 60 e9 51 RSP: 0018:ffffc90000eafa48 EFLAGS: 00010246 RAX: f6157c5a6763d200 RBX: 0000000000000003 RCX: ffff88811f392600 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000002 RBP: ffffc90000eafa58 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffffbfff0e9f34c R12: 0000000000000000 R13: ffff888104f24d34 R14: ffff888104f24d30 R15: ffff888104f24d30 FS: 00007fa9c27af6c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe09e3eec38 CR3: 00000001083d2000 CR4: 00000000003526b0 Call Trace: __refcount_sub_and_test include/linux/refcount.h:400 [inline] __refcount_dec_and_test include/linux/refcount.h:432 [inline] refcount_dec_and_test include/linux/refcount.h:450 [inline] kref_put include/linux/kref.h:64 [inline] kobject_put+0x25a/0x2a0 lib/kobject.c:737 put_device+0x23/0x40 drivers/base/core.c:3800 usb_put_gadget include/linux/usb/gadget.h:512 [inline] usb_del_gadget_udc+0x25/0x30 drivers/usb/gadget/udc/core.c:1594 dummy_udc_remove+0x5c/0x70 drivers/usb/gadget/udc/dummy_hcd.c:1123 platform_remove+0x7e/0xb0 drivers/base/platform.c:1424 device_remove drivers/base/dd.c:567 [inline] __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x4ad/0x830 drivers/base/dd.c:1295 device_driver_detach+0x3f/0x50 drivers/base/dd.c:1331 unbind_store+0x1ab/0x1f0 drivers/base/bus.c:244 drv_attr_store+0x91/0xb0 drivers/base/bus.c:125 sysfs_kf_write+0x141/0x160 fs/sysfs/file.c:136 kernfs_fop_write_iter+0x319/0x510 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x762/0xfd0 fs/read_write.c:684 ksys_write+0x145/0x260 fs/read_write.c:737 __do_sys_write fs/read_write.c:749 [inline] __se_sys_write fs/read_write.c:746 [inline] __x64_sys_write+0x7f/0x90 fs/read_write.c:746 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2 do_syscall_x64 arch/x86/entry/common.c:47 [inline] do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7fa9c199e019 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa9c27af028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fa9c1c25fa0 RCX: 00007fa9c199e019 RDX: 000000000000000b RSI: 0000200000000400 RDI: 0000000000000003 RBP: 00007fa9c1a3500c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fa9c1c26038 R14: 00007fa9c1c25fa0 R15: 00007fff1ed7dde8 ---[ end trace 0000000000000000 ]---