================================================================== BUG: KASAN: use-after-free in user_mode arch/x86/include/asm/ptrace.h:131 [inline] BUG: KASAN: use-after-free in trace_page_fault_entries arch/x86/mm/fault.c:1516 [inline] BUG: KASAN: use-after-free in do_page_fault+0x6d/0x320 arch/x86/mm/fault.c:1528 Read of size 8 at addr ffff8881dd867e20 by task syz.3.95/857 CPU: 1 PID: 857 Comm: syz.3.95 Not tainted 5.4.292-syzkaller-00021-gcd8e74fa0fa3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: Allocated by task 251: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x162/0x200 mm/kasan/common.c:529 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:537 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xe2/0x270 mm/slub.c:2842 vm_area_dup kernel/fork.c:358 [inline] dup_mmap kernel/fork.c:548 [inline] dup_mm kernel/fork.c:1379 [inline] copy_mm+0x752/0x1150 kernel/fork.c:1435 copy_process+0x1163/0x2cf0 kernel/fork.c:2052 _do_fork+0x190/0x860 kernel/fork.c:2399 __do_sys_clone kernel/fork.c:2557 [inline] __se_sys_clone kernel/fork.c:2538 [inline] __x64_sys_clone+0x12e/0x160 kernel/fork.c:2538 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 327: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1c3/0x280 mm/kasan/common.c:487 kasan_slab_free+0xe/0x10 mm/kasan/common.c:496 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook+0xb7/0x180 mm/slub.c:1494 slab_free mm/slub.c:3080 [inline] kmem_cache_free+0x10c/0x2c0 mm/slub.c:3096 vm_area_free+0x1c/0x20 kernel/fork.c:369 remove_vma mm/mmap.c:182 [inline] exit_mmap+0x41b/0x520 mm/mmap.c:3202 __mmput+0x92/0x2e0 kernel/fork.c:1101 mmput+0x47/0x60 kernel/fork.c:1122 exec_mmap fs/exec.c:1084 [inline] flush_old_exec+0x9a1/0x1730 fs/exec.c:1319 load_elf_binary+0xa92/0x2890 fs/binfmt_elf.c:847 search_binary_handler+0x192/0x5e0 fs/exec.c:1707 exec_binprm+0x97/0x390 fs/exec.c:1750 __do_execve_file+0xc91/0x1010 fs/exec.c:1882 do_execveat_common fs/exec.c:1928 [inline] do_execve fs/exec.c:1945 [inline] __do_sys_execve fs/exec.c:2021 [inline] __se_sys_execve fs/exec.c:2016 [inline] __x64_sys_execve+0x94/0xb0 fs/exec.c:2016 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 The buggy address belongs to the object at ffff8881dd867de0 which belongs to the cache vm_area_struct of size 232 The buggy address is located 64 bytes inside of 232-byte region [ffff8881dd867de0, ffff8881dd867ec8) The buggy address belongs to the page: page:ffffea00077619c0 refcount:1 mapcount:0 mapping:ffff8881f5cf6000 index:0x0 flags: 0x8000000000000200(slab) raw: 8000000000000200 dead000000000100 dead000000000122 ffff8881f5cf6000 raw: 0000000000000000 00000000000d000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x35e/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x1296/0x1310 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x202/0x4b0 mm/page_alloc.c:4894 alloc_slab_page+0x3c/0x3b0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x93/0x420 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x29e/0x420 mm/slub.c:2667 __slab_alloc+0x63/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0x12c/0x270 mm/slub.c:2842 vm_area_dup kernel/fork.c:358 [inline] dup_mmap kernel/fork.c:548 [inline] dup_mm kernel/fork.c:1379 [inline] copy_mm+0x752/0x1150 kernel/fork.c:1435 copy_process+0x1163/0x2cf0 kernel/fork.c:2052 _do_fork+0x190/0x860 kernel/fork.c:2399 __do_sys_clone kernel/fork.c:2557 [inline] __se_sys_clone kernel/fork.c:2538 [inline] __x64_sys_clone+0x12e/0x160 kernel/fork.c:2538 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] free_pcp_prepare mm/page_alloc.c:1233 [inline] free_unref_page_prepare+0x2a9/0x3a0 mm/page_alloc.c:3085 free_unref_page mm/page_alloc.c:3134 [inline] free_the_page mm/page_alloc.c:4954 [inline] __free_pages mm/page_alloc.c:4962 [inline] free_pages+0x117/0x180 mm/page_alloc.c:4970 tlb_batch_list_free mm/mmu_gather.c:61 [inline] tlb_finish_mmu+0x248/0x300 mm/mmu_gather.c:280 exit_mmap+0x2db/0x520 mm/mmap.c:3193 __mmput+0x92/0x2e0 kernel/fork.c:1101 mmput+0x47/0x60 kernel/fork.c:1122 exit_mm kernel/exit.c:538 [inline] do_exit+0x99f/0x2660 kernel/exit.c:848 do_group_exit+0x13e/0x300 kernel/exit.c:984 __do_sys_exit_group kernel/exit.c:995 [inline] __se_sys_exit_group kernel/exit.c:993 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:993 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881dd867d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881dd867d80: 00 00 00 00 00 00 00 00 fc fc fc fc fb fb fb fb >ffff8881dd867e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881dd867e80: f1 f1 f1 f1 00 f2 f2 f2 04 f3 f3 f3 fc fc fc fc ffff8881dd867f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================