================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_write include/linux/instrumented.h:82 [inline] BUG: KASAN: slab-use-after-free in clear_bit include/asm-generic/bitops/instrumented-atomic.h:41 [inline] BUG: KASAN: slab-use-after-free in cpumask_clear_cpu include/linux/cpumask.h:628 [inline] BUG: KASAN: slab-use-after-free in flush_tlb_func+0x23d/0x6c0 arch/x86/mm/tlb.c:1132 Write of size 8 at addr ffff888023ec7580 by task pool_workqueue_/3 CPU: 0 UID: 0 PID: 3 Comm: pool_workqueue_ Not tainted 6.16.0-rc4-next-20250702-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189 instrument_atomic_write include/linux/instrumented.h:82 [inline] clear_bit include/asm-generic/bitops/instrumented-atomic.h:41 [inline] cpumask_clear_cpu include/linux/cpumask.h:628 [inline] flush_tlb_func+0x23d/0x6c0 arch/x86/mm/tlb.c:1132 csd_do_func kernel/smp.c:134 [inline] __flush_smp_call_function_queue+0x370/0xaa0 kernel/smp.c:540 __sysvec_call_function_single+0xa8/0x3d0 arch/x86/kernel/smp.c:271 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline] sysvec_call_function_single+0x9e/0xc0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:lockdep_unregister_key+0x2c5/0x310 kernel/locking/lockdep.c:6619 Code: 65 48 8b 05 1d a3 25 11 48 3b 44 24 10 0f 84 26 fe ff ff e8 4d 8e d8 09 e8 78 8f d8 09 41 f7 c7 00 02 00 00 74 bd fb 40 84 ed <75> bc eb cd 90 0f 0b 90 e9 19 ff ff ff 90 0f 0b 90 e9 2a ff ff ff RSP: 0018:ffffc90000087c00 EFLAGS: 00000246 RAX: f80688e2cd026300 RBX: ffff88805e141138 RCX: f80688e2cd026300 RDX: ffffffff93876358 RSI: ffffffff8da7d37d RDI: ffffffff8be4b100 RBP: ffff88805e141100 R08: 0000000000000000 R09: ffffffff81aafe18 R10: dffffc0000000000 R11: fffffbfff1f853c7 R12: 0000000000000000 R13: 0000000000001000 R14: 0000000000000001 R15: 0000000000000203 wq_unregister_lockdep kernel/workqueue.c:4819 [inline] pwq_release_workfn+0x6d5/0x870 kernel/workqueue.c:5115 kthread_worker_fn+0x507/0xb60 kernel/kthread.c:1009 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 19368: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4236 dup_mm kernel/fork.c:1466 [inline] copy_mm+0xdb/0x4b0 kernel/fork.c:1528 copy_process+0x1706/0x3c00 kernel/fork.c:2168 kernel_clone+0x21e/0x870 kernel/fork.c:2598 __do_sys_clone kernel/fork.c:2741 [inline] __se_sys_clone kernel/fork.c:2725 [inline] __x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2725 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 23636: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x18f/0x400 mm/slub.c:4782 mmdrop include/linux/sched/mm.h:55 [inline] mmdrop_sched include/linux/sched/mm.h:83 [inline] mmdrop_lazy_tlb_sched include/linux/sched/mm.h:110 [inline] finish_task_switch+0x3ee/0x950 kernel/sched/core.c:5206 context_switch kernel/sched/core.c:5316 [inline] __schedule+0x16fd/0x4d00 kernel/sched/core.c:6696 __schedule_loop kernel/sched/core.c:6774 [inline] schedule+0x165/0x360 kernel/sched/core.c:6789 schedule_timeout+0x9a/0x270 kernel/time/sleep_timeout.c:75 ___down_common kernel/locking/semaphore.c:268 [inline] __down_common+0x319/0x6a0 kernel/locking/semaphore.c:293 down_interruptible+0x8a/0xe0 kernel/locking/semaphore.c:124 raw_event_queue_fetch drivers/usb/gadget/legacy/raw_gadget.c:100 [inline] raw_ioctl_event_fetch drivers/usb/gadget/legacy/raw_gadget.c:637 [inline] raw_ioctl+0x13e6/0x3c90 drivers/usb/gadget/legacy/raw_gadget.c:1309 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888023ec6b80 which belongs to the cache mm_struct of size 2584 The buggy address is located 2560 bytes inside of freed 2584-byte region [ffff888023ec6b80, ffff888023ec7598) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23ec0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff8880308b2181 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801a84bb40 0000000000000000 dead000000000001 raw: 0000000000000000 00000000800b000b 00000000f5000000 ffff8880308b2181 head: 00fff00000000040 ffff88801a84bb40 0000000000000000 dead000000000001 head: 0000000000000000 00000000800b000b 00000000f5000000 ffff8880308b2181 head: 00fff00000000003 ffffea00008fb001 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5601, tgid 5601 (dhcpcd-run-hook), ts 59146355946, free_ts 59063092190 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1848 prep_new_page mm/page_alloc.c:1856 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3855 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5145 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0xbeb/0x1410 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0x283/0x3c0 mm/slub.c:4236 dup_mm kernel/fork.c:1466 [inline] copy_mm+0xdb/0x4b0 kernel/fork.c:1528 copy_process+0x1706/0x3c00 kernel/fork.c:2168 kernel_clone+0x21e/0x870 kernel/fork.c:2598 __do_sys_clone kernel/fork.c:2741 [inline] __se_sys_clone kernel/fork.c:2725 [inline] __x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2725 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5602 tgid 5602 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1392 [inline] __free_frozen_pages+0xb80/0xd80 mm/page_alloc.c:2892 discard_slab mm/slub.c:2753 [inline] __put_partials+0x156/0x1a0 mm/slub.c:3218 put_cpu_partial+0x17c/0x250 mm/slub.c:3293 __slab_free+0x2d5/0x3c0 mm/slub.c:4550 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4236 getname_flags+0xb8/0x540 fs/namei.c:146 getname include/linux/fs.h:2909 [inline] getname_maybe_null include/linux/fs.h:2916 [inline] vfs_fstatat+0x43/0x170 fs/stat.c:370 __do_sys_newfstatat fs/stat.c:542 [inline] __se_sys_newfstatat fs/stat.c:536 [inline] __x64_sys_newfstatat+0x116/0x190 fs/stat.c:536 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888023ec7480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888023ec7500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888023ec7580: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888023ec7600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888023ec7680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 65 48 8b 05 1d a3 25 mov %gs:0x1125a31d(%rip),%rax # 0x1125a325 7: 11 8: 48 3b 44 24 10 cmp 0x10(%rsp),%rax d: 0f 84 26 fe ff ff je 0xfffffe39 13: e8 4d 8e d8 09 call 0x9d88e65 18: e8 78 8f d8 09 call 0x9d88f95 1d: 41 f7 c7 00 02 00 00 test $0x200,%r15d 24: 74 bd je 0xffffffe3 26: fb sti 27: 40 84 ed test %bpl,%bpl * 2a: 75 bc jne 0xffffffe8 <-- trapping instruction 2c: eb cd jmp 0xfffffffb 2e: 90 nop 2f: 0f 0b ud2 31: 90 nop 32: e9 19 ff ff ff jmp 0xffffff50 37: 90 nop 38: 0f 0b ud2 3a: 90 nop 3b: e9 2a ff ff ff jmp 0xffffff6a