================================================================== 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 ffff8880346730e8 by task rm/14776 CPU: 1 UID: 0 PID: 14776 Comm: rm Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2026 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 handle_control_request drivers/usb/gadget/udc/dummy_hcd.c:1761 [inline] dummy_timer+0x259e/0x3700 drivers/usb/gadget/udc/dummy_hcd.c:1942 __run_hrtimer kernel/time/hrtimer.c:2074 [inline] __hrtimer_run_queues+0x462/0x9c0 kernel/time/hrtimer.c:2131 hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2148 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+0x16a/0x210 kernel/softirq.c:758 irq_exit_rcu+0x9/0x30 kernel/softirq.c:775 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:rcu_is_watching_curr_cpu include/linux/context_tracking.h:128 [inline] RIP: 0010:rcu_is_watching+0xe/0xc0 kernel/rcu/tree.c:753 Code: cc cc e8 35 93 8f 00 eb cd 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 55 53 65 48 ff 05 8a a0 9c 12 4d 2a e1 09 48 c7 c3 e8 ad 8d 94 89 c5 83 f8 07 0f 87 83 00 00 RSP: 0018:ffffc900036f76a8 EFLAGS: 00000282 RAX: 0000000000000001 RBX: ffffc900036f7f48 RCX: ffffffff92a0d401 RDX: ffffc900036f7f50 RSI: ffffc900036f7f38 RDI: ffffc900036f7740 RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000007 R10: 0000000000000200 R11: 00000000000ad051 R12: ffffc900036f7780 R13: ffffc900036f7730 R14: ffffc900036f7f48 R15: ffffc900036f7764 rcu_read_unlock include/linux/rcupdate.h:878 [inline] class_rcu_destructor include/linux/rcupdate.h:1216 [inline] unwind_next_frame+0x745/0x2090 arch/x86/kernel/unwind_orc.c:495 arch_stack_walk+0x94/0xf0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:556 slab_free_hook mm/slub.c:2709 [inline] slab_free mm/slub.c:6508 [inline] kmem_cache_free+0x424/0x6c0 mm/slub.c:6635 tear_down_vmas+0x2a5/0x610 mm/mmap.c:1277 exit_mmap+0x469/0xa00 mm/mmap.c:1335 __mmput+0x12a/0x410 kernel/fork.c:1193 mmput+0x67/0x80 kernel/fork.c:1216 exit_mm kernel/exit.c:617 [inline] do_exit+0x8b1/0x2ae0 kernel/exit.c:999 do_group_exit+0xd5/0x2a0 kernel/exit.c:1154 __do_sys_exit_group kernel/exit.c:1165 [inline] __se_sys_exit_group kernel/exit.c:1163 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1163 x64_sys_call+0x1567/0x1570 arch/x86/include/generated/asm/syscalls_64.h:232 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 RIP: 0033:0x7f05a11946c5 Code: Unable to access opcode bytes at 0x7f05a119469b. RSP: 002b:00007fffcdfe45e8 EFLAGS: 00000206 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007f05a1295fe8 RCX: 00007f05a11946c5 RDX: 00000000000000e7 RSI: ffffffffffffff88 RDI: 0000000000000000 RBP: 0000000000000001 R08: 00007fffcdfe4578 R09: 0000000000000000 R10: 00007fffcdfe4410 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f05a1294680 R15: 00007f05a1296000 Allocated by task 12876: 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+0x2f8/0x6d0 mm/slub.c:5563 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [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 12876: 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:2748 [inline] slab_free mm/slub.c:6508 [inline] kfree+0x22b/0x6d0 mm/slub.c:6801 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 ffff888034673000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 232 bytes inside of freed 512-byte region [ffff888034673000, ffff888034673200) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x34670 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801c02fc80 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801c02fc80 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 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 4979, tgid 4979 (udevd), ts 27231119940 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/0x35d0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7417 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __kmalloc_cache_noprof+0x4f4/0x6d0 mm/slub.c:5559 _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [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 page last free pid 4988 tgid 4988 ts 27211106499 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x79f/0x10f0 mm/page_alloc.c:2962 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4683 [inline] slab_alloc_node mm/slub.c:4996 [inline] kmem_cache_alloc_noprof+0x269/0x6a0 mm/slub.c:5010 alloc_filename fs/namei.c:147 [inline] do_getname+0x35/0x390 fs/namei.c:187 class_filename_flags_constructor include/linux/fs.h:2586 [inline] do_sys_openat2+0xc7/0x1e0 fs/open.c:1416 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 Memory state around the buggy address: ffff888034672f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888034673000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888034673080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888034673100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888034673180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: cc int3 1: cc int3 2: e8 35 93 8f 00 call 0x8f933c 7: eb cd jmp 0xffffffd6 9: 0f 1f 00 nopl (%rax) c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: f3 0f 1e fa endbr64 20: 55 push %rbp 21: 53 push %rbx 22: 65 48 ff 05 8a a0 9c incq %gs:0x129ca08a(%rip) # 0x129ca0b4 29: 12 * 2a: e8 4d 2a e1 09 call 0x9e12a7c <-- trapping instruction 2f: 48 c7 c3 e8 ad 8d 94 mov $0xffffffff948dade8,%rbx 36: 89 c5 mov %eax,%ebp 38: 83 f8 07 cmp $0x7,%eax 3b: 0f .byte 0xf 3c: 87 .byte 0x87 3d: 83 00 00 addl $0x0,(%rax)