BUG: Bad page map in process syz-executor.3 pte:fffff63ddb120 pmd:27849067 page:ffffea0002708900 refcount:9 mapcount:-1 mapping:ffff88808e61d190 index:0x0 pfn:0x9c224 head:ffffea0002708900 order:2 entire_mapcount:0 nr_pages_mapped:1 pincount:0 memcg:ffff88807f12e000 aops:xfs_address_space_operations ino:244a dentry name:"bus" flags: 0xfff0000000816c(referenced|uptodate|lru|active|private|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfffffffe() raw: 00fff0000000816c ffffea00024ab7c8 ffff888024a68030 ffff88808e61d190 raw: 0000000000000000 ffff88802b6c0f80 00000009fffffffe ffff88807f12e000 page dumped because: bad pte page_owner tracks the page as allocated page last allocated via order 2, migratetype Movable, gfp_mask 0x152c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 10016, tgid 10015 (syz-executor.3), ts 3510744514655, free_ts 3506874307523 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 folio_alloc+0x1e/0x60 mm/mempolicy.c:2308 filemap_alloc_folio+0xde/0x500 mm/filemap.c:976 ra_alloc_folio mm/readahead.c:468 [inline] page_cache_ra_order+0x423/0xcc0 mm/readahead.c:524 do_sync_mmap_readahead+0x444/0x850 filemap_fault+0x7d3/0x1710 mm/filemap.c:3291 __xfs_filemap_fault+0x286/0x960 fs/xfs/xfs_file.c:1354 __do_fault+0x133/0x4e0 mm/memory.c:4204 do_read_fault mm/memory.c:4568 [inline] do_fault mm/memory.c:4705 [inline] do_pte_missing mm/memory.c:3669 [inline] handle_pte_fault mm/memory.c:4978 [inline] __handle_mm_fault mm/memory.c:5119 [inline] handle_mm_fault+0x428e/0x62b0 mm/memory.c:5284 faultin_page mm/gup.c:956 [inline] __get_user_pages+0x6bd/0x15f0 mm/gup.c:1239 __get_user_pages_locked mm/gup.c:1504 [inline] get_dump_page+0x146/0x2b0 mm/gup.c:2018 dump_user_range+0x126/0x910 fs/coredump.c:913 elf_core_dump+0x3c91/0x4540 fs/binfmt_elf.c:2142 do_coredump+0x1b73/0x2ab0 fs/coredump.c:764 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x34c/0x4e0 mm/mmu_gather.c:300 tlb_finish_mmu+0xd4/0x1f0 mm/mmu_gather.c:392 unmap_region+0x300/0x350 mm/mmap.c:2318 do_vmi_align_munmap+0x121e/0x1850 mm/mmap.c:2555 do_vmi_munmap+0x24d/0x2d0 mm/mmap.c:2623 __vm_munmap+0x230/0x450 mm/mmap.c:2908 __do_sys_munmap mm/mmap.c:2925 [inline] __se_sys_munmap mm/mmap.c:2922 [inline] __x64_sys_munmap+0x69/0x80 mm/mmap.c:2922 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd addr:0000000020003000 vm_flags:080000d0 anon_vma:0000000000000000 mapping:ffff88808e61d190 index:2 file:bus fault:xfs_filemap_fault mmap:xfs_file_mmap read_folio:xfs_vm_read_folio CPU: 0 PID: 10015 Comm: syz-executor.3 Not tainted 6.6.0-rc3-syzkaller-00165-g3b517966c561 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_bad_pte+0x581/0x5c0 mm/memory.c:535 zap_pte_range mm/memory.c:1458 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x1a76/0x3320 mm/memory.c:1644 unmap_vmas+0x2b8/0x460 mm/memory.c:1731 exit_mmap+0x297/0xc50 mm/mmap.c:3210 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9af/0x2650 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 get_signal+0x175d/0x1840 kernel/signal.c:2892 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa2fe47cae9 Code: Unable to access opcode bytes at 0x7fa2fe47cabf. RSP: 002b:00007ffde5e474f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007fa2fe47cae9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fa2fe59bf88 RBP: 0000000000000048 R08: 00007fa2fe59bf8c R09: 00007fa2fe59bf8c R10: 00007fa2fe009c10 R11: 0000000000000246 R12: 00007fa2fe59bf80 R13: 0000000000000b6c R14: 0000000000000000 R15: 00007fa2fe59bf80 BUG: Bad page map in process syz-executor.3 pte:fffff63ddc120 pmd:27849067 page:ffffea00027088c0 refcount:1 mapcount:-1 mapping:ffff8880283eab78 index:0x1d8 pfn:0x9c223 memcg:ffff88807f12e000 aops:shmem_aops ino:433e dentry name:"memfd:syzkaller" flags: 0xfff0000008013c(referenced|uptodate|dirty|lru|active|swapbacked|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfffffffe() raw: 00fff0000008013c ffffea0002708888 ffffea0002599788 ffff8880283eab78 raw: 00000000000001d8 0000000000000000 00000001fffffffe ffff88807f12e000 page dumped because: bad pte page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 10016, tgid 10015 (syz-executor.3), ts 3508779210296, free_ts 3508750346365 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 __folio_alloc+0x13/0x30 mm/page_alloc.c:4458 vma_alloc_folio+0x48a/0x9a0 mm/mempolicy.c:2259 shmem_alloc_folio mm/shmem.c:1658 [inline] shmem_alloc_and_acct_folio+0x438/0x9b0 mm/shmem.c:1683 shmem_get_folio_gfp+0xca4/0x2b60 mm/shmem.c:2020 shmem_get_folio mm/shmem.c:2143 [inline] shmem_write_begin+0x170/0x300 mm/shmem.c:2688 generic_perform_write+0x31b/0x630 mm/filemap.c:3969 shmem_file_write_iter+0xfc/0x120 mm/shmem.c:2865 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] shmem_undo_range+0x6ad/0x19c0 mm/shmem.c:1022 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29e/0xa80 mm/shmem.c:1243 evict+0x2a4/0x620 fs/inode.c:664 __dentry_kill+0x436/0x650 fs/dcache.c:607 dentry_kill+0xbb/0x290 dput+0x21e/0x470 fs/dcache.c:913 __fput+0x60d/0x910 fs/file_table.c:392 task_work_run+0x24a/0x300 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 addr:0000000020004000 vm_flags:080000d0 anon_vma:0000000000000000 mapping:ffff88808e61d190 index:3 file:bus fault:xfs_filemap_fault mmap:xfs_file_mmap read_folio:xfs_vm_read_folio CPU: 1 PID: 10015 Comm: syz-executor.3 Tainted: G B 6.6.0-rc3-syzkaller-00165-g3b517966c561 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_bad_pte+0x581/0x5c0 mm/memory.c:535 zap_pte_range mm/memory.c:1458 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x1a76/0x3320 mm/memory.c:1644 unmap_vmas+0x2b8/0x460 mm/memory.c:1731 exit_mmap+0x297/0xc50 mm/mmap.c:3210 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9af/0x2650 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 get_signal+0x175d/0x1840 kernel/signal.c:2892 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa2fe47cae9 Code: Unable to access opcode bytes at 0x7fa2fe47cabf. RSP: 002b:00007ffde5e474f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007fa2fe47cae9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fa2fe59bf88 RBP: 0000000000000048 R08: 00007fa2fe59bf8c R09: 00007fa2fe59bf8c R10: 00007fa2fe009c10 R11: 0000000000000246 R12: 00007fa2fe59bf80 R13: 0000000000000b6c R14: 0000000000000000 R15: 00007fa2fe59bf80 BUG: Bad page map in process syz-executor.3 pte:fffff7b38c120 pmd:27849067 page:ffffea0002131cc0 refcount:1 mapcount:-1 mapping:0000000000000000 index:0xe0 pfn:0x84c73 memcg:ffff888077ed0000 flags: 0xfff0000000802c(referenced|uptodate|lru|private|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfffffffe() raw: 00fff0000000802c ffffea0002131c88 ffffea000245a988 0000000000000000 raw: 00000000000000e0 ffff888046719ae0 00000001fffffffe ffff888077ed0000 page dumped because: bad pte page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 7081, tgid 7080 (syz-executor.1), ts 3353591335940, free_ts 3353589429743 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 folio_alloc+0x1e/0x60 mm/mempolicy.c:2308 filemap_alloc_folio+0xde/0x500 mm/filemap.c:976 __page_cache_alloc include/linux/pagemap.h:521 [inline] page_cache_alloc include/linux/pagemap.h:526 [inline] __ntfs_grab_cache_pages fs/ntfs/file.c:500 [inline] ntfs_perform_write+0x698/0x7ca0 fs/ntfs/file.c:1833 ntfs_file_write_iter+0x107c/0x1970 fs/ntfs/file.c:1916 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] shmem_undo_range+0x6ad/0x19c0 mm/shmem.c:1022 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29e/0xa80 mm/shmem.c:1243 evict+0x2a4/0x620 fs/inode.c:664 __dentry_kill+0x436/0x650 fs/dcache.c:607 dentry_kill+0xbb/0x290 dput+0x21e/0x470 fs/dcache.c:913 __fput+0x60d/0x910 fs/file_table.c:392 task_work_run+0x24a/0x300 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 addr:0000000020006000 vm_flags:080000d0 anon_vma:0000000000000000 mapping:ffff88808e61d190 index:5 file:bus fault:xfs_filemap_fault mmap:xfs_file_mmap read_folio:xfs_vm_read_folio CPU: 1 PID: 10015 Comm: syz-executor.3 Tainted: G B 6.6.0-rc3-syzkaller-00165-g3b517966c561 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_bad_pte+0x581/0x5c0 mm/memory.c:535 zap_pte_range mm/memory.c:1458 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x1a76/0x3320 mm/memory.c:1644 unmap_vmas+0x2b8/0x460 mm/memory.c:1731 exit_mmap+0x297/0xc50 mm/mmap.c:3210 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9af/0x2650 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 get_signal+0x175d/0x1840 kernel/signal.c:2892 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa2fe47cae9 Code: Unable to access opcode bytes at 0x7fa2fe47cabf. RSP: 002b:00007ffde5e474f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007fa2fe47cae9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fa2fe59bf88 RBP: 0000000000000048 R08: 00007fa2fe59bf8c R09: 00007fa2fe59bf8c R10: 00007fa2fe009c10 R11: 0000000000000246 R12: 00007fa2fe59bf80 R13: 0000000000000b6c R14: 0000000000000000 R15: 00007fa2fe59bf80 BUG: Bad page map in process syz-executor.3 pte:fffff7b38d120 pmd:27849067 page:ffffea0002131c80 refcount:1 mapcount:-1 mapping:0000000000000000 index:0xdf pfn:0x84c72 memcg:ffff888077ed0000 flags: 0xfff0000000802c(referenced|uptodate|lru|private|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfffffffe() raw: 00fff0000000802c ffffea0002251b48 ffffea0002131cc8 0000000000000000 raw: 00000000000000df ffff888046719910 00000001fffffffe ffff888077ed0000 page dumped because: bad pte page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 7081, tgid 7080 (syz-executor.1), ts 3353591155440, free_ts 3353589446191 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 folio_alloc+0x1e/0x60 mm/mempolicy.c:2308 filemap_alloc_folio+0xde/0x500 mm/filemap.c:976 __page_cache_alloc include/linux/pagemap.h:521 [inline] page_cache_alloc include/linux/pagemap.h:526 [inline] __ntfs_grab_cache_pages fs/ntfs/file.c:500 [inline] ntfs_perform_write+0x698/0x7ca0 fs/ntfs/file.c:1833 ntfs_file_write_iter+0x107c/0x1970 fs/ntfs/file.c:1916 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] shmem_undo_range+0x6ad/0x19c0 mm/shmem.c:1022 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29e/0xa80 mm/shmem.c:1243 evict+0x2a4/0x620 fs/inode.c:664 __dentry_kill+0x436/0x650 fs/dcache.c:607 dentry_kill+0xbb/0x290 dput+0x21e/0x470 fs/dcache.c:913 __fput+0x60d/0x910 fs/file_table.c:392 task_work_run+0x24a/0x300 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 addr:0000000020007000 vm_flags:080000d0 anon_vma:0000000000000000 mapping:ffff88808e61d190 index:6 file:bus fault:xfs_filemap_fault mmap:xfs_file_mmap read_folio:xfs_vm_read_folio CPU: 1 PID: 10015 Comm: syz-executor.3 Tainted: G B 6.6.0-rc3-syzkaller-00165-g3b517966c561 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_bad_pte+0x581/0x5c0 mm/memory.c:535 zap_pte_range mm/memory.c:1458 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x1a76/0x3320 mm/memory.c:1644 unmap_vmas+0x2b8/0x460 mm/memory.c:1731 exit_mmap+0x297/0xc50 mm/mmap.c:3210 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9af/0x2650 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 get_signal+0x175d/0x1840 kernel/signal.c:2892 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa2fe47cae9 Code: Unable to access opcode bytes at 0x7fa2fe47cabf. RSP: 002b:00007ffde5e474f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007fa2fe47cae9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fa2fe59bf88 RBP: 0000000000000048 R08: 00007fa2fe59bf8c R09: 00007fa2fe59bf8c R10: 00007fa2fe009c10 R11: 0000000000000246 R12: 00007fa2fe59bf80 R13: 0000000000000b6c R14: 0000000000000000 R15: 00007fa2fe59bf80 BUG: Bad page map in process syz-executor.3 pte:fffff7b38e120 pmd:27849067 page:ffffea0002131c40 refcount:1 mapcount:-1 mapping:0000000000000000 index:0x1f pfn:0x84c71 memcg:ffff888077ed0000 flags: 0xfff0000000802c(referenced|uptodate|lru|private|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfffffffe() raw: 00fff0000000802c ffffea00022108c8 ffffea0000e23108 0000000000000000 raw: 000000000000001f ffff888045eaa0e8 00000001fffffffe ffff888077ed0000 page dumped because: bad pte page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 31080, tgid 31076 (syz-executor.1), ts 2929501907088, free_ts 2929275587542 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 folio_alloc+0x1e/0x60 mm/mempolicy.c:2308 filemap_alloc_folio+0xde/0x500 mm/filemap.c:976 __page_cache_alloc include/linux/pagemap.h:521 [inline] page_cache_alloc include/linux/pagemap.h:526 [inline] __ntfs_grab_cache_pages fs/ntfs/file.c:500 [inline] ntfs_perform_write+0x698/0x7ca0 fs/ntfs/file.c:1833 ntfs_file_write_iter+0x107c/0x1970 fs/ntfs/file.c:1916 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x34c/0x4e0 mm/mmu_gather.c:300 tlb_finish_mmu+0xd4/0x1f0 mm/mmu_gather.c:392 unmap_region+0x300/0x350 mm/mmap.c:2318 do_vmi_align_munmap+0x121e/0x1850 mm/mmap.c:2555 do_vmi_munmap+0x24d/0x2d0 mm/mmap.c:2623 __vm_munmap+0x230/0x450 mm/mmap.c:2908 __do_sys_munmap mm/mmap.c:2925 [inline] __se_sys_munmap mm/mmap.c:2922 [inline] __x64_sys_munmap+0x69/0x80 mm/mmap.c:2922 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd addr:0000000020008000 vm_flags:080000d0 anon_vma:0000000000000000 mapping:ffff88808e61d190 index:7 file:bus fault:xfs_filemap_fault mmap:xfs_file_mmap read_folio:xfs_vm_read_folio CPU: 0 PID: 10015 Comm: syz-executor.3 Tainted: G B 6.6.0-rc3-syzkaller-00165-g3b517966c561 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_bad_pte+0x581/0x5c0 mm/memory.c:535 zap_pte_range mm/memory.c:1458 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x1a76/0x3320 mm/memory.c:1644 unmap_vmas+0x2b8/0x460 mm/memory.c:1731 exit_mmap+0x297/0xc50 mm/mmap.c:3210 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9af/0x2650 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 get_signal+0x175d/0x1840 kernel/signal.c:2892 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa2fe47cae9 Code: Unable to access opcode bytes at 0x7fa2fe47cabf. RSP: 002b:00007ffde5e474f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007fa2fe47cae9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fa2fe59bf88 RBP: 0000000000000048 R08: 00007fa2fe59bf8c R09: 00007fa2fe59bf8c R10: 00007fa2fe009c10 R11: 0000000000000246 R12: 00007fa2fe59bf80 R13: 0000000000000b6c R14: 0000000000000000 R15: 00007fa2fe59bf80 BUG: Bad page map in process syz-executor.3 pte:fffff63240120 pmd:27849067 page:ffffea0002736fc0 refcount:0 mapcount:-1 mapping:0000000000000000 index:0x1 pfn:0x9cdbf flags: 0xfff00000000004(referenced|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfffffffe() raw: 00fff00000000004 ffffea0002736e08 ffffea0002736f88 0000000000000000 raw: 0000000000000001 0000000000000000 00000000fffffffe 0000000000000000 page dumped because: bad pte page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 10022, tgid 10019 (syz-executor.0), ts 3510142326871, free_ts 3511952112600 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 __folio_alloc+0x13/0x30 mm/page_alloc.c:4458 vma_alloc_folio+0x48a/0x9a0 mm/mempolicy.c:2259 shmem_alloc_folio mm/shmem.c:1658 [inline] shmem_alloc_and_acct_folio+0x438/0x9b0 mm/shmem.c:1683 shmem_get_folio_gfp+0xca4/0x2b60 mm/shmem.c:2020 shmem_get_folio mm/shmem.c:2143 [inline] shmem_write_begin+0x170/0x300 mm/shmem.c:2688 generic_perform_write+0x31b/0x630 mm/filemap.c:3969 shmem_file_write_iter+0xfc/0x120 mm/shmem.c:2865 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] shmem_undo_range+0x6ad/0x19c0 mm/shmem.c:1022 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29e/0xa80 mm/shmem.c:1243 evict+0x2a4/0x620 fs/inode.c:664 __dentry_kill+0x436/0x650 fs/dcache.c:607 dentry_kill+0xbb/0x290 dput+0x21e/0x470 fs/dcache.c:913 __fput+0x60d/0x910 fs/file_table.c:392 task_work_run+0x24a/0x300 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 addr:000000002000a000 vm_flags:080000d0 anon_vma:0000000000000000 mapping:ffff88808e61d190 index:9 file:bus fault:xfs_filemap_fault mmap:xfs_file_mmap read_folio:xfs_vm_read_folio CPU: 1 PID: 10015 Comm: syz-executor.3 Tainted: G B 6.6.0-rc3-syzkaller-00165-g3b517966c561 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_bad_pte+0x581/0x5c0 mm/memory.c:535 zap_pte_range mm/memory.c:1458 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x1a76/0x3320 mm/memory.c:1644 unmap_vmas+0x2b8/0x460 mm/memory.c:1731 exit_mmap+0x297/0xc50 mm/mmap.c:3210 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9af/0x2650 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 get_signal+0x175d/0x1840 kernel/signal.c:2892 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa2fe47cae9 Code: Unable to access opcode bytes at 0x7fa2fe47cabf. RSP: 002b:00007ffde5e474f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007fa2fe47cae9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fa2fe59bf88 RBP: 0000000000000048 R08: 00007fa2fe59bf8c R09: 00007fa2fe59bf8c R10: 00007fa2fe009c10 R11: 0000000000000246 R12: 00007fa2fe59bf80 R13: 0000000000000b6c R14: 0000000000000000 R15: 00007fa2fe59bf80 BUG: Bad page state in process syz-executor.3 pfn:84c72 page:ffffea0002131c80 refcount:0 mapcount:-1 mapping:0000000000000000 index:0xdf pfn:0x84c72 flags: 0xfff0000000800c(referenced|uptodate|private|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfffffffe() raw: 00fff0000000800c ffffea0002131cc8 ffffc9000f92f2e0 0000000000000000 raw: 00000000000000df ffff888046719910 00000000fffffffe 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 7081, tgid 7080 (syz-executor.1), ts 3353591155440, free_ts 3353589446191 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 folio_alloc+0x1e/0x60 mm/mempolicy.c:2308 filemap_alloc_folio+0xde/0x500 mm/filemap.c:976 __page_cache_alloc include/linux/pagemap.h:521 [inline] page_cache_alloc include/linux/pagemap.h:526 [inline] __ntfs_grab_cache_pages fs/ntfs/file.c:500 [inline] ntfs_perform_write+0x698/0x7ca0 fs/ntfs/file.c:1833 ntfs_file_write_iter+0x107c/0x1970 fs/ntfs/file.c:1916 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] shmem_undo_range+0x6ad/0x19c0 mm/shmem.c:1022 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29e/0xa80 mm/shmem.c:1243 evict+0x2a4/0x620 fs/inode.c:664 __dentry_kill+0x436/0x650 fs/dcache.c:607 dentry_kill+0xbb/0x290 dput+0x21e/0x470 fs/dcache.c:913 __fput+0x60d/0x910 fs/file_table.c:392 task_work_run+0x24a/0x300 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 Modules linked in: CPU: 1 PID: 10015 Comm: syz-executor.3 Tainted: G B 6.6.0-rc3-syzkaller-00165-g3b517966c561 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 bad_page+0x14b/0x170 mm/page_alloc.c:513 free_page_is_bad mm/page_alloc.c:959 [inline] free_pages_prepare mm/page_alloc.c:1128 [inline] free_unref_page_prepare+0x97c/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x34c/0x4e0 mm/mmu_gather.c:300 zap_pte_range mm/memory.c:1534 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x29dc/0x3320 mm/memory.c:1644 unmap_vmas+0x2b8/0x460 mm/memory.c:1731 exit_mmap+0x297/0xc50 mm/mmap.c:3210 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9af/0x2650 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 get_signal+0x175d/0x1840 kernel/signal.c:2892 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa2fe47cae9 Code: Unable to access opcode bytes at 0x7fa2fe47cabf. RSP: 002b:00007ffde5e474f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007fa2fe47cae9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fa2fe59bf88 RBP: 0000000000000048 R08: 00007fa2fe59bf8c R09: 00007fa2fe59bf8c R10: 00007fa2fe009c10 R11: 0000000000000246 R12: 00007fa2fe59bf80 R13: 0000000000000b6c R14: 0000000000000000 R15: 00007fa2fe59bf80 BUG: Bad page state in process syz-executor.3 pfn:84c73 page:ffffea0002131cc0 refcount:0 mapcount:-1 mapping:0000000000000000 index:0xe0 pfn:0x84c73 flags: 0xfff0000000800c(referenced|uptodate|private|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfffffffe() raw: 00fff0000000800c ffffea00027088c8 ffffc9000f92f2e0 0000000000000000 raw: 00000000000000e0 ffff888046719ae0 00000000fffffffe 0000000000000000 page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 7081, tgid 7080 (syz-executor.1), ts 3353591335940, free_ts 3353589429743 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 folio_alloc+0x1e/0x60 mm/mempolicy.c:2308 filemap_alloc_folio+0xde/0x500 mm/filemap.c:976 __page_cache_alloc include/linux/pagemap.h:521 [inline] page_cache_alloc include/linux/pagemap.h:526 [inline] __ntfs_grab_cache_pages fs/ntfs/file.c:500 [inline] ntfs_perform_write+0x698/0x7ca0 fs/ntfs/file.c:1833 ntfs_file_write_iter+0x107c/0x1970 fs/ntfs/file.c:1916 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] shmem_undo_range+0x6ad/0x19c0 mm/shmem.c:1022 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29e/0xa80 mm/shmem.c:1243 evict+0x2a4/0x620 fs/inode.c:664 __dentry_kill+0x436/0x650 fs/dcache.c:607 dentry_kill+0xbb/0x290 dput+0x21e/0x470 fs/dcache.c:913 __fput+0x60d/0x910 fs/file_table.c:392 task_work_run+0x24a/0x300 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 Modules linked in: CPU: 1 PID: 10015 Comm: syz-executor.3 Tainted: G B 6.6.0-rc3-syzkaller-00165-g3b517966c561 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 bad_page+0x14b/0x170 mm/page_alloc.c:513 free_page_is_bad mm/page_alloc.c:959 [inline] free_pages_prepare mm/page_alloc.c:1128 [inline] free_unref_page_prepare+0x97c/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x34c/0x4e0 mm/mmu_gather.c:300 zap_pte_range mm/memory.c:1534 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x29dc/0x3320 mm/memory.c:1644 unmap_vmas+0x2b8/0x460 mm/memory.c:1731 exit_mmap+0x297/0xc50 mm/mmap.c:3210 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9af/0x2650 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 get_signal+0x175d/0x1840 kernel/signal.c:2892 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa2fe47cae9 Code: Unable to access opcode bytes at 0x7fa2fe47cabf. RSP: 002b:00007ffde5e474f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007fa2fe47cae9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fa2fe59bf88 RBP: 0000000000000048 R08: 00007fa2fe59bf8c R09: 00007fa2fe59bf8c R10: 00007fa2fe009c10 R11: 0000000000000246 R12: 00007fa2fe59bf80 R13: 0000000000000b6c R14: 0000000000000000 R15: 00007fa2fe59bf80 BUG: Bad page state in process syz-executor.3 pfn:9c223 page:ffffea00027088c0 refcount:0 mapcount:-1 mapping:ffff8880283eab78 index:0x1d8 pfn:0x9c223 aops:shmem_aops ino:433e dentry name:"memfd:syzkaller" flags: 0xfff0000008001c(referenced|uptodate|dirty|swapbacked|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfffffffe() raw: 00fff0000008001c ffffea00025bb808 ffffc9000f92f2e0 ffff8880283eab78 raw: 00000000000001d8 0000000000000000 00000000fffffffe 0000000000000000 page dumped because: non-NULL mapping page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 10016, tgid 10015 (syz-executor.3), ts 3508779210296, free_ts 3508750346365 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 __folio_alloc+0x13/0x30 mm/page_alloc.c:4458 vma_alloc_folio+0x48a/0x9a0 mm/mempolicy.c:2259 shmem_alloc_folio mm/shmem.c:1658 [inline] shmem_alloc_and_acct_folio+0x438/0x9b0 mm/shmem.c:1683 shmem_get_folio_gfp+0xca4/0x2b60 mm/shmem.c:2020 shmem_get_folio mm/shmem.c:2143 [inline] shmem_write_begin+0x170/0x300 mm/shmem.c:2688 generic_perform_write+0x31b/0x630 mm/filemap.c:3969 shmem_file_write_iter+0xfc/0x120 mm/shmem.c:2865 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] shmem_undo_range+0x6ad/0x19c0 mm/shmem.c:1022 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29e/0xa80 mm/shmem.c:1243 evict+0x2a4/0x620 fs/inode.c:664 __dentry_kill+0x436/0x650 fs/dcache.c:607 dentry_kill+0xbb/0x290 dput+0x21e/0x470 fs/dcache.c:913 __fput+0x60d/0x910 fs/file_table.c:392 task_work_run+0x24a/0x300 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 Modules linked in: CPU: 1 PID: 10015 Comm: syz-executor.3 Tainted: G B 6.6.0-rc3-syzkaller-00165-g3b517966c561 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 bad_page+0x14b/0x170 mm/page_alloc.c:513 free_page_is_bad mm/page_alloc.c:959 [inline] free_pages_prepare mm/page_alloc.c:1128 [inline] free_unref_page_prepare+0x97c/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x34c/0x4e0 mm/mmu_gather.c:300 zap_pte_range mm/memory.c:1534 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x29dc/0x3320 mm/memory.c:1644 unmap_vmas+0x2b8/0x460 mm/memory.c:1731 exit_mmap+0x297/0xc50 mm/mmap.c:3210 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9af/0x2650 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 get_signal+0x175d/0x1840 kernel/signal.c:2892 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa2fe47cae9 Code: Unable to access opcode bytes at 0x7fa2fe47cabf. RSP: 002b:00007ffde5e474f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007fa2fe47cae9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fa2fe59bf88 RBP: 0000000000000048 R08: 00007fa2fe59bf8c R09: 00007fa2fe59bf8c R10: 00007fa2fe009c10 R11: 0000000000000246 R12: 00007fa2fe59bf80 R13: 0000000000000b6c R14: 0000000000000000 R15: 00007fa2fe59bf80 page:ffffea0002736fc0 refcount:0 mapcount:-1 mapping:0000000000000000 index:0x1 pfn:0x9cdbf flags: 0xfff00000000004(referenced|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfffffffe() raw: 00fff00000000004 ffffea0002736e08 ffffea0002736f88 0000000000000000 raw: 0000000000000001 0000000000000000 00000000fffffffe 0000000000000000 page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0) page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 10022, tgid 10019 (syz-executor.0), ts 3510142326871, free_ts 3511952112600 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170 __alloc_pages+0x255/0x670 mm/page_alloc.c:4426 __folio_alloc+0x13/0x30 mm/page_alloc.c:4458 vma_alloc_folio+0x48a/0x9a0 mm/mempolicy.c:2259 shmem_alloc_folio mm/shmem.c:1658 [inline] shmem_alloc_and_acct_folio+0x438/0x9b0 mm/shmem.c:1683 shmem_get_folio_gfp+0xca4/0x2b60 mm/shmem.c:2020 shmem_get_folio mm/shmem.c:2143 [inline] shmem_write_begin+0x170/0x300 mm/shmem.c:2688 generic_perform_write+0x31b/0x630 mm/filemap.c:3969 shmem_file_write_iter+0xfc/0x120 mm/shmem.c:2865 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x782/0xaf0 fs/read_write.c:584 ksys_write+0x1a0/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1136 [inline] free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2451 release_pages+0x2113/0x23f0 mm/swap.c:1042 __folio_batch_release+0x84/0x100 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] shmem_undo_range+0x6ad/0x19c0 mm/shmem.c:1022 shmem_truncate_range mm/shmem.c:1114 [inline] shmem_evict_inode+0x29e/0xa80 mm/shmem.c:1243 evict+0x2a4/0x620 fs/inode.c:664 __dentry_kill+0x436/0x650 fs/dcache.c:607 dentry_kill+0xbb/0x290 dput+0x21e/0x470 fs/dcache.c:913 __fput+0x60d/0x910 fs/file_table.c:392 task_work_run+0x24a/0x300 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 ------------[ cut here ]------------ kernel BUG at include/linux/mm.h:1095! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 10015 Comm: syz-executor.3 Tainted: G B 6.6.0-rc3-syzkaller-00165-g3b517966c561 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 RIP: 0010:put_page_testzero include/linux/mm.h:1095 [inline] RIP: 0010:folio_put_testzero include/linux/mm.h:1101 [inline] RIP: 0010:release_pages+0x2174/0x23f0 mm/swap.c:1000 Code: 00 0f 85 8b 02 00 00 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 9b a5 c8 ff 4c 89 ff 48 c7 c6 a0 46 13 8b e8 0c 86 0a 00 <0f> 0b e8 85 a5 c8 ff 4c 89 ff 48 c7 c6 a0 46 13 8b e8 f6 85 0a 00 RSP: 0018:ffffc9000f92f240 EFLAGS: 00010046 RAX: 160a6e8b918cee00 RBX: 0000000000000000 RCX: ffffffff816d75c0 RDX: 0000000000000000 RSI: ffffffff8b599a80 RDI: ffffffff8b599a40 RBP: ffffc9000f92f378 R08: ffffffff8e9a7d6f R09: 1ffffffff1d34fad R10: dffffc0000000000 R11: fffffbfff1d34fae R12: dffffc0000000000 R13: ffff8880177d5000 R14: ffffea0002736ff4 R15: ffffea0002736fc0 FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000555556476938 CR3: 000000000d130000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x34c/0x4e0 mm/mmu_gather.c:300 zap_pte_range mm/memory.c:1534 [inline] zap_pmd_range mm/memory.c:1573 [inline] zap_pud_range mm/memory.c:1602 [inline] zap_p4d_range mm/memory.c:1623 [inline] unmap_page_range+0x29dc/0x3320 mm/memory.c:1644 unmap_vmas+0x2b8/0x460 mm/memory.c:1731 exit_mmap+0x297/0xc50 mm/mmap.c:3210 __mmput+0x115/0x3c0 kernel/fork.c:1349 exit_mm+0x21f/0x300 kernel/exit.c:567 do_exit+0x9af/0x2650 kernel/exit.c:861 do_group_exit+0x206/0x2c0 kernel/exit.c:1024 get_signal+0x175d/0x1840 kernel/signal.c:2892 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa2fe47cae9 Code: Unable to access opcode bytes at 0x7fa2fe47cabf. RSP: 002b:00007ffde5e474f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007fa2fe47cae9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fa2fe59bf88 RBP: 0000000000000048 R08: 00007fa2fe59bf8c R09: 00007fa2fe59bf8c R10: 00007fa2fe009c10 R11: 0000000000000246 R12: 00007fa2fe59bf80 R13: 0000000000000b6c R14: 0000000000000000 R15: 00007fa2fe59bf80 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:put_page_testzero include/linux/mm.h:1095 [inline] RIP: 0010:folio_put_testzero include/linux/mm.h:1101 [inline] RIP: 0010:release_pages+0x2174/0x23f0 mm/swap.c:1000 Code: 00 0f 85 8b 02 00 00 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 9b a5 c8 ff 4c 89 ff 48 c7 c6 a0 46 13 8b e8 0c 86 0a 00 <0f> 0b e8 85 a5 c8 ff 4c 89 ff 48 c7 c6 a0 46 13 8b e8 f6 85 0a 00 RSP: 0018:ffffc9000f92f240 EFLAGS: 00010046 RAX: 160a6e8b918cee00 RBX: 0000000000000000 RCX: ffffffff816d75c0 RDX: 0000000000000000 RSI: ffffffff8b599a80 RDI: ffffffff8b599a40 RBP: ffffc9000f92f378 R08: ffffffff8e9a7d6f R09: 1ffffffff1d34fad R10: dffffc0000000000 R11: fffffbfff1d34fae R12: dffffc0000000000 R13: ffff8880177d5000 R14: ffffea0002736ff4 R15: ffffea0002736fc0 FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000555556476938 CR3: 000000000d130000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400