RBP: 00007f526d6451d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007f5270716b2f R14: 00007f526d645300 R15: 0000000000022000 ================================================================== BUG: KASAN: use-after-free in native_pmd_val arch/x86/include/asm/pgtable_types.h:390 [inline] BUG: KASAN: use-after-free in pmd_pfn arch/x86/include/asm/pgtable.h:192 [inline] BUG: KASAN: use-after-free in pte_lockptr include/linux/mm.h:2210 [inline] BUG: KASAN: use-after-free in zap_pte_range mm/memory.c:1320 [inline] BUG: KASAN: use-after-free in zap_pmd_range mm/memory.c:1481 [inline] BUG: KASAN: use-after-free in zap_pud_range mm/memory.c:1510 [inline] BUG: KASAN: use-after-free in zap_p4d_range mm/memory.c:1531 [inline] BUG: KASAN: use-after-free in unmap_page_range+0x254a/0x2a10 mm/memory.c:1552 Read of size 8 at addr ffff888156f0ec00 by task syz-executor.0/16673 CPU: 1 PID: 16673 Comm: syz-executor.0 Not tainted 5.15.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 native_pmd_val arch/x86/include/asm/pgtable_types.h:390 [inline] pmd_pfn arch/x86/include/asm/pgtable.h:192 [inline] pte_lockptr include/linux/mm.h:2210 [inline] zap_pte_range mm/memory.c:1320 [inline] zap_pmd_range mm/memory.c:1481 [inline] zap_pud_range mm/memory.c:1510 [inline] zap_p4d_range mm/memory.c:1531 [inline] unmap_page_range+0x254a/0x2a10 mm/memory.c:1552 __oom_reap_task_mm+0x22d/0x400 mm/oom_kill.c:555 __do_sys_process_mrelease+0x32a/0x400 mm/oom_kill.c:1199 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f52700cfa39 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f526d645188 EFLAGS: 00000246 ORIG_RAX: 00000000000001c0 RAX: ffffffffffffffda RBX: 00007f52701e2f60 RCX: 00007f52700cfa39 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f526d6451d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007f5270716b2f R14: 00007f526d645300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea00055bc380 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x156f0e flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000000000 ffffea000552ac08 ffffea00055e1288 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x400dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO), pid 16673, ts 1624091778933, free_ts 1624565604193 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4153 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5375 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2191 pmd_alloc_one include/asm-generic/pgalloc.h:126 [inline] __pmd_alloc+0x3b/0x5c0 mm/memory.c:4867 pmd_alloc include/linux/mm.h:2173 [inline] copy_pmd_range mm/memory.c:1136 [inline] copy_pud_range mm/memory.c:1193 [inline] copy_p4d_range mm/memory.c:1217 [inline] copy_page_range+0x2a95/0x4420 mm/memory.c:1290 dup_mmap kernel/fork.c:610 [inline] dup_mm+0xa4e/0x13e0 kernel/fork.c:1453 copy_mm kernel/fork.c:1505 [inline] copy_process+0x6fdf/0x7590 kernel/fork.c:2194 kernel_clone+0xe7/0xac0 kernel/fork.c:2584 __do_sys_fork+0x8a/0xc0 kernel/fork.c:2647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x2c5/0x780 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3315 [inline] free_unref_page_list+0x1a9/0xfa0 mm/page_alloc.c:3431 release_pages+0x830/0x20b0 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu mm/mmu_gather.c:249 [inline] tlb_finish_mmu+0x165/0x8c0 mm/mmu_gather.c:340 exit_mmap+0x1ea/0x630 mm/mmap.c:3173 __mmput+0x122/0x4b0 kernel/fork.c:1115 mmput+0x58/0x60 kernel/fork.c:1136 exit_mm kernel/exit.c:501 [inline] do_exit+0xabc/0x2a30 kernel/exit.c:812 do_group_exit+0x125/0x310 kernel/exit.c:922 get_signal+0x47f/0x21d0 kernel/signal.c:2855 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:865 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 ret_from_fork+0x15/0x30 arch/x86/entry/entry_64.S:288 Memory state around the buggy address: ffff888156f0eb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888156f0eb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888156f0ec00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888156f0ec80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888156f0ed00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================