================================================================== BUG: KASAN: slab-use-after-free in find_endpoint+0x2a3/0x2c0 drivers/usb/gadget/udc/dummy_hcd.c:1618 Read of size 1 at addr ffff8880548bd512 by task kworker/0:1/21308 CPU: 0 UID: 0 PID: 21308 Comm: kworker/0:1 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 find_endpoint+0x2a3/0x2c0 drivers/usb/gadget/udc/dummy_hcd.c:1618 dummy_timer+0x500/0x3700 drivers/usb/gadget/udc/dummy_hcd.c:1890 __run_hrtimer kernel/time/hrtimer.c:2067 [inline] __hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2124 hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2141 handle_softirqs+0x1e6/0x9d0 kernel/softirq.c:645 __do_softirq kernel/softirq.c:679 [inline] invoke_softirq kernel/softirq.c:519 [inline] __irq_exit_rcu+0x194/0x210 kernel/softirq.c:767 irq_exit_rcu+0x9/0x30 kernel/softirq.c:784 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0010:__sanitizer_cov_trace_pc+0x4b/0x70 kernel/kcov.c:220 Code: 1e f6 c4 01 74 44 a9 00 00 00 0f 75 3d f7 c1 00 00 00 f0 75 35 8b 82 34 17 00 00 85 c0 74 2b 8b 82 08 17 00 00 83 f8 02 75 20 <48> 8b 8a 10 17 00 00 8b 92 0c 17 00 00 48 8b 01 48 83 c0 01 48 39 RSP: 0018:ffffc900048d6e28 EFLAGS: 00000246 RAX: 0000000000000002 RBX: ffff88801dfd8f80 RCX: 0000000000000001 RDX: ffff888028150000 RSI: ffffffff86625400 RDI: ffff88801dfd8f98 RBP: dffffc0000000000 R08: 0000000000000001 R09: fffff5200091adb8 R10: 0000000000000003 R11: 0000000000000000 R12: ffff88801c1f8000 R13: ffff88801c1f82b0 R14: ffff888035992078 R15: ffff88801c1f82c0 get_device_parent+0x150/0x4c0 drivers/base/core.c:3342 device_add+0x1ad/0x1970 drivers/base/core.c:3685 input_register_device+0x7d2/0xe00 drivers/input/input.c:2436 xpad_init_input+0xee3/0x14b0 drivers/input/joystick/xpad.c:2028 xpad_probe+0x152a/0x1f60 drivers/input/joystick/xpad.c:2206 usb_probe_interface+0x303/0x8f0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3776 usb_set_configuration+0xd97/0x1c60 drivers/usb/core/message.c:2268 usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250 usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3776 usb_new_device.part.0+0xcc2/0x1686 drivers/usb/core/hub.c:2703 usb_new_device include/linux/workqueue.h:714 [inline] hub_port_connect drivers/usb/core/hub.c:5575 [inline] hub_port_connect_change drivers/usb/core/hub.c:5715 [inline] port_event drivers/usb/core/hub.c:5879 [inline] hub_event.cold+0x1e3/0xe90 drivers/usb/core/hub.c:5961 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3387 process_scheduled_works kernel/workqueue.c:3470 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3551 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 21588: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x2e7/0x6b0 mm/slub.c:5484 _kmalloc_noprof include/linux/slab.h:988 [inline] _kzalloc_noprof include/linux/slab.h:1309 [inline] kernfs_fop_open+0x23d/0xd50 fs/kernfs/file.c:634 do_dentry_open+0x6ab/0x14d0 fs/open.c:996 vfs_open+0x82/0x3f0 fs/open.c:1101 do_open fs/namei.c:4837 [inline] path_openat+0x19fa/0x2440 fs/namei.c:5000 do_file_open+0x20e/0x430 fs/namei.c:5029 do_sys_openat2+0x10f/0x1e0 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 21588: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2678 [inline] slab_free mm/slub.c:6372 [inline] kfree+0x22b/0x6c0 mm/slub.c:6687 kernfs_fop_release+0x12c/0x1f0 fs/kernfs/file.c:779 __fput+0x3ff/0xb50 fs/file_table.c:512 fput_close_sync+0x118/0x250 fs/file_table.c:617 __do_sys_close fs/open.c:1560 [inline] __se_sys_close fs/open.c:1545 [inline] __x64_sys_close+0x8b/0x120 fs/open.c:1545 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880548bd400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 274 bytes inside of freed 512-byte region [ffff8880548bd400, ffff8880548bd600) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880548bd000 pfn:0x548bc head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801c026c80 ffffea0001f00a10 ffffea0001530d10 raw: ffff8880548bd000 000000080010000f 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801c026c80 ffffea0001f00a10 ffffea0001530d10 head: ffff8880548bd000 000000080010000f 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 37, tgid 37 (kworker/u8:2), ts 74206164343 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x110d/0x35b0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3267 [inline] allocate_slab mm/slub.c:3382 [inline] new_slab+0xa5/0x640 mm/slub.c:3428 refill_objects+0xe3/0x410 mm/slub.c:7305 refill_sheaf mm/slub.c:2805 [inline] __pcs_replace_empty_main+0x372/0x680 mm/slub.c:4677 alloc_from_pcs mm/slub.c:4775 [inline] slab_alloc_node mm/slub.c:4907 [inline] __kmalloc_cache_noprof+0x47b/0x6b0 mm/slub.c:5480 _kmalloc_noprof include/linux/slab.h:988 [inline] _kzalloc_noprof include/linux/slab.h:1309 [inline] mca_alloc net/ipv6/mcast.c:871 [inline] __ipv6_dev_mc_inc+0x2f1/0xbd0 net/ipv6/mcast.c:962 addrconf_join_solict net/ipv6/addrconf.c:2262 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4135 [inline] addrconf_dad_work+0x276/0x1360 net/ipv6/addrconf.c:4263 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3387 process_scheduled_works kernel/workqueue.c:3470 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3551 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 page last free pid 1 tgid 1 ts 21599293121 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] free_pages_prepare+0x586/0xe00 mm/page_alloc.c:1463 __free_contig_range_common+0x14f/0x250 mm/page_alloc.c:7060 debug_vm_pgtable_free_huge_page mm/debug_vm_pgtable.c:980 [inline] destroy_args+0xa8/0x7a0 mm/debug_vm_pgtable.c:993 debug_vm_pgtable+0x1d69/0x3490 mm/debug_vm_pgtable.c:1368 do_one_initcall+0x11c/0x6f0 init/main.c:1353 do_initcall_level init/main.c:1415 [inline] do_initcalls init/main.c:1431 [inline] do_basic_setup init/main.c:1451 [inline] kernel_init_freeable+0x6ea/0x7b0 init/main.c:1666 kernel_init+0x21/0x1e0 init/main.c:1556 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff8880548bd400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880548bd480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880548bd500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880548bd580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880548bd600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: f6 c4 01 test $0x1,%ah 3: 74 44 je 0x49 5: a9 00 00 00 0f test $0xf000000,%eax a: 75 3d jne 0x49 c: f7 c1 00 00 00 f0 test $0xf0000000,%ecx 12: 75 35 jne 0x49 14: 8b 82 34 17 00 00 mov 0x1734(%rdx),%eax 1a: 85 c0 test %eax,%eax 1c: 74 2b je 0x49 1e: 8b 82 08 17 00 00 mov 0x1708(%rdx),%eax 24: 83 f8 02 cmp $0x2,%eax 27: 75 20 jne 0x49 * 29: 48 8b 8a 10 17 00 00 mov 0x1710(%rdx),%rcx <-- trapping instruction 30: 8b 92 0c 17 00 00 mov 0x170c(%rdx),%edx 36: 48 8b 01 mov (%rcx),%rax 39: 48 83 c0 01 add $0x1,%rax 3d: 48 rex.W 3e: 39 .byte 0x39