BUG: Bad page state in process syz.2.1087 pfn:60f0e page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888060f0ef00 pfn:0x60f0e flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff888060f0ef00 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959854592, free_ts 489623816317 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Not tainted 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108 BUG: Bad page state in process syz.2.1087 pfn:7ace3 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88807ace3f00 pfn:0x7ace3 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff88807ace3f00 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959842886, free_ts 489623847059 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Tainted: G B 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108 BUG: Bad page state in process syz.2.1087 pfn:341c0 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880341c0f00 pfn:0x341c0 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff8880341c0f00 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959831016, free_ts 489623853930 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Tainted: G B 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108 BUG: Bad page state in process syz.2.1087 pfn:28551 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888028551f00 pfn:0x28551 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff888028551f00 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959819708, free_ts 489623860217 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Tainted: G B 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108 BUG: Bad page state in process syz.2.1087 pfn:60783 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888060783f00 pfn:0x60783 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff888060783f00 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959806717, free_ts 489623866287 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Tainted: G B 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108 BUG: Bad page state in process syz.2.1087 pfn:6ac29 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88806ac29f00 pfn:0x6ac29 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff88806ac29f00 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959797374, free_ts 489623872543 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Tainted: G B 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108 BUG: Bad page state in process syz.2.1087 pfn:63618 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888063618f00 pfn:0x63618 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff888063618f00 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959784816, free_ts 489623878838 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Tainted: G B 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108 BUG: Bad page state in process syz.2.1087 pfn:6b302 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88806b302780 pfn:0x6b302 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff88806b302780 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959776359, free_ts 489623886721 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Tainted: G B 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108 BUG: Bad page state in process syz.2.1087 pfn:6bde2 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88806bde2f00 pfn:0x6bde2 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff88806bde2f00 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959767788, free_ts 489623892997 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Tainted: G B 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108 BUG: Bad page state in process syz.2.1087 pfn:684d9 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880684d9f00 pfn:0x684d9 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff8880684d9f00 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959759578, free_ts 489623899308 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Tainted: G B 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108 BUG: Bad page state in process syz.2.1087 pfn:7b656 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88807b656f00 pfn:0x7b656 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888021ac2000 0000000000000000 raw: ffff88807b656f00 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 10132, tgid 10131 (syz.2.1087), ts 493959751894, free_ts 489623905372 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3474 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751 alloc_pages_bulk_noprof+0x70b/0xcc0 mm/page_alloc.c:4699 alloc_pages_bulk_array_node_noprof include/linux/gfp.h:239 [inline] __page_pool_alloc_pages_slow+0x122/0x690 net/core/page_pool.c:538 page_pool_alloc_netmem net/core/page_pool.c:590 [inline] page_pool_alloc_pages+0xd0/0x1c0 net/core/page_pool.c:597 page_pool_alloc include/net/page_pool/helpers.h:129 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:167 [inline] skb_pp_cow_data+0xc43/0x1640 net/core/skbuff.c:983 netif_skb_check_for_xdp net/core/dev.c:5041 [inline] netif_receive_generic_xdp net/core/dev.c:5080 [inline] do_xdp_generic+0x505/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 page last free pid 10049 tgid 10049 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xf38/0x1a60 mm/page_alloc.c:2704 folios_put_refs+0x76c/0x860 mm/swap.c:962 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x496/0xc20 mm/mmap.c:1680 __mmput+0x115/0x3b0 kernel/fork.c:1353 exit_mm+0x220/0x310 kernel/exit.c:570 do_exit+0x9b2/0x28e0 kernel/exit.c:925 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 __do_sys_exit_group kernel/exit.c:1098 [inline] __se_sys_exit_group kernel/exit.c:1096 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1096 x64_sys_call+0x26a8/0x26b0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 10132 Comm: syz.2.1087 Tainted: G B 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0 Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 bad_page+0x176/0x1d0 mm/page_alloc.c:501 free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_unref_page+0x1048/0x1130 mm/page_alloc.c:2657 bpf_xdp_shrink_data net/core/filter.c:4148 [inline] bpf_xdp_frags_shrink_tail+0x3ee/0x7e0 net/core/filter.c:4169 ____bpf_xdp_adjust_tail net/core/filter.c:4194 [inline] bpf_xdp_adjust_tail+0x1c3/0x200 net/core/filter.c:4187 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:514 [inline] bpf_prog_run_generic_xdp+0x686/0x1510 net/core/dev.c:4973 netif_receive_generic_xdp net/core/dev.c:5086 [inline] do_xdp_generic+0x757/0xd30 net/core/dev.c:5148 __netif_receive_skb_core+0x1ce9/0x4690 net/core/dev.c:5492 __netif_receive_skb_one_core net/core/dev.c:5670 [inline] __netif_receive_skb+0x12f/0x650 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x1e8/0x890 net/core/dev.c:5930 tun_rx_batched+0x1b7/0x8f0 drivers/net/tun.c:1550 tun_get_user+0x30d6/0x4890 drivers/net/tun.c:2007 tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xaeb/0xd30 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4d7e37e98f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 f9 92 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 4c 93 02 00 48 RSP: 002b:00007f4d7f195020 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f4d7e545fa0 RCX: 00007f4d7e37e98f RDX: 0000000000011dc0 RSI: 00000000200004c0 RDI: 00000000000000c8 RBP: 00007f4d7e3f3cc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000011dc0 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4d7e545fa0 R15: 00007ffe3ccfb108