BUG: Bad page state in process syz.0.7432 pfn:82601
page does not match folio
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x82601
ksm flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0002098000 00000000ffffffff ffffffffffffffff
raw: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: nonzero pincount
page_owner tracks the page as allocated
page last allocated via order 9, migratetype Unmovable, gfp_mask 0x152c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 31694, tgid 31694 (syz.6.7427), ts 1764438730752, free_ts 1744790809697
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704
prep_new_page mm/page_alloc.c:1712 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419
alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2510
folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2520
filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007
ractl_alloc_folio mm/readahead.c:186 [inline]
ra_alloc_folio mm/readahead.c:441 [inline]
page_cache_ra_order+0x5e5/0xc70 mm/readahead.c:509
do_sync_mmap_readahead+0x31a/0x5f0 mm/filemap.c:3234
filemap_fault+0x62a/0x1200 mm/filemap.c:3412
__do_fault+0x135/0x390 mm/memory.c:5169
do_shared_fault mm/memory.c:5654 [inline]
do_fault mm/memory.c:5728 [inline]
do_pte_missing mm/memory.c:4251 [inline]
handle_pte_fault mm/memory.c:6069 [inline]
__handle_mm_fault+0x198b/0x5620 mm/memory.c:6212
handle_mm_fault+0x40a/0x8e0 mm/memory.c:6381
do_user_addr_fault+0xa81/0x1390 arch/x86/mm/fault.c:1336
handle_page_fault arch/x86/mm/fault.c:1476 [inline]
exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
page last free pid 6163 tgid 6163 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
free_unref_folios+0xc66/0x14d0 mm/page_alloc.c:2763
folios_put_refs+0x559/0x640 mm/swap.c:992
folio_batch_release include/linux/pagevec.h:101 [inline]
truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:383
kill_bdev block/bdev.c:91 [inline]
blkdev_flush_mapping+0x108/0x270 block/bdev.c:712
blkdev_put_whole block/bdev.c:719 [inline]
bdev_release+0x417/0x650 block/bdev.c:1144
blkdev_release+0x15/0x20 block/fops.c:684
__fput+0x44c/0xa70 fs/file_table.c:465
task_work_run+0x1d1/0x260 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:114
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Modules linked in:
CPU: 0 UID: 0 PID: 31714 Comm: syz.0.7432 Not tainted 6.16.0-rc3-syzkaller-00329-gdfba48a70cb6 #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
bad_page+0x180/0x1c0 mm/page_alloc.c:506
free_tail_page_prepare+0x2c3/0x4f0 mm/page_alloc.c:-1
free_pages_prepare mm/page_alloc.c:1224 [inline]
__free_frozen_pages+0x8aa/0xe70 mm/page_alloc.c:2706
__folio_put+0x21b/0x2c0 mm/swap.c:112
delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339
truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:380
kill_bdev block/bdev.c:91 [inline]
blkdev_flush_mapping+0x108/0x270 block/bdev.c:712
blkdev_put_whole block/bdev.c:719 [inline]
bdev_release+0x417/0x650 block/bdev.c:1144
blkdev_release+0x15/0x20 block/fops.c:684
__fput+0x44c/0xa70 fs/file_table.c:465
task_work_run+0x1d1/0x260 kernel/task_work.c:227
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x6b5/0x22e0 kernel/exit.c:964
do_group_exit+0x21c/0x2d0 kernel/exit.c:1105
get_signal+0x1286/0x1340 kernel/signal.c:3034
arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:111
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc5e338e929
Code: Unable to access opcode bytes at 0x7fc5e338e8ff.
RSP: 002b:00007fc5e4289038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: 0000000000010106 RBX: 00007fc5e35b6080 RCX: 00007fc5e338e929
RDX: 0000000000010106 RSI: 00002000000000c0 RDI: 0000000000000003
RBP: 00007fc5e3410b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000001 R14: 00007fc5e35b6080 R15: 00007fc5e36dfa28
BUG: Bad page state in process syz.0.7432 pfn:82600
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x82600
head: order:0 mapcount:0 entire_mapcount:1 nr_pages_mapped:0 pincount:0
flags: 0xfff1800000024d(locked|referenced|uptodate|workingset|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff1800000024d dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
head: 00fff1800000024d dead000000000100 dead000000000122 0000000000000000
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
head: 00fff00000000000 0000000000000000 00000000ffffffff 0000000000000000
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
page_owner tracks the page as allocated
page last allocated via order 9, migratetype Unmovable, gfp_mask 0x152c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 31694, tgid 31694 (syz.6.7427), ts 1764438730752, free_ts 1744790809697
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704
prep_new_page mm/page_alloc.c:1712 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419
alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2510
folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2520
filemap_alloc_folio_noprof+0xdf/0x470 mm/filemap.c:1007
ractl_alloc_folio mm/readahead.c:186 [inline]
ra_alloc_folio mm/readahead.c:441 [inline]
page_cache_ra_order+0x5e5/0xc70 mm/readahead.c:509
do_sync_mmap_readahead+0x31a/0x5f0 mm/filemap.c:3234
filemap_fault+0x62a/0x1200 mm/filemap.c:3412
__do_fault+0x135/0x390 mm/memory.c:5169
do_shared_fault mm/memory.c:5654 [inline]
do_fault mm/memory.c:5728 [inline]
do_pte_missing mm/memory.c:4251 [inline]
handle_pte_fault mm/memory.c:6069 [inline]
__handle_mm_fault+0x198b/0x5620 mm/memory.c:6212
handle_mm_fault+0x40a/0x8e0 mm/memory.c:6381
do_user_addr_fault+0xa81/0x1390 arch/x86/mm/fault.c:1336
handle_page_fault arch/x86/mm/fault.c:1476 [inline]
exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
page last free pid 6163 tgid 6163 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
free_unref_folios+0xc66/0x14d0 mm/page_alloc.c:2763
folios_put_refs+0x559/0x640 mm/swap.c:992
folio_batch_release include/linux/pagevec.h:101 [inline]
truncate_inode_pages_range+0x346/0xda0 mm/truncate.c:383
kill_bdev block/bdev.c:91 [inline]
blkdev_flush_mapping+0x108/0x270 block/bdev.c:712
blkdev_put_whole block/bdev.c:719 [inline]
bdev_release+0x417/0x650 block/bdev.c:1144
blkdev_release+0x15/0x20 block/fops.c:684
__fput+0x44c/0xa70 fs/file_table.c:465
task_work_run+0x1d1/0x260 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:114
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Modules linked in:
CPU: 0 UID: 0 PID: 31714 Comm: syz.0.7432 Tainted: G B 6.16.0-rc3-syzkaller-00329-gdfba48a70cb6 #0 PREEMPT(full)
Tainted: [B]=BAD_PAGE
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
bad_page+0x180/0x1c0 mm/page_alloc.c:506
free_page_is_bad mm/page_alloc.c:939 [inline]
free_pages_prepare mm/page_alloc.c:1240 [inline]
__free_frozen_pages+0xe17/0xe70 mm/page_alloc.c:2706
__folio_put+0x21b/0x2c0 mm/swap.c:112
delete_from_page_cache_batch+0x84c/0x9b0 mm/filemap.c:339
truncate_inode_pages_range+0x28a/0xda0 mm/truncate.c:380
kill_bdev block/bdev.c:91 [inline]
blkdev_flush_mapping+0x108/0x270 block/bdev.c:712
blkdev_put_whole block/bdev.c:719 [inline]
bdev_release+0x417/0x650 block/bdev.c:1144
blkdev_release+0x15/0x20 block/fops.c:684
__fput+0x44c/0xa70 fs/file_table.c:465
task_work_run+0x1d1/0x260 kernel/task_work.c:227
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x6b5/0x22e0 kernel/exit.c:964
do_group_exit+0x21c/0x2d0 kernel/exit.c:1105
get_signal+0x1286/0x1340 kernel/signal.c:3034
arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:111
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc5e338e929
Code: Unable to access opcode bytes at 0x7fc5e338e8ff.
RSP: 002b:00007fc5e4289038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: 0000000000010106 RBX: 00007fc5e35b6080 RCX: 00007fc5e338e929
RDX: 0000000000010106 RSI: 00002000000000c0 RDI: 0000000000000003
RBP: 00007fc5e3410b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000001 R14: 00007fc5e35b6080 R15: 00007fc5e36dfa28