BUG: Bad page state in process syz.2.1964 pfn:4d421 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88804d421f00 pfn:0x4d421 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: ffff88804d421f00 3fffffffffffffff 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 13450, tgid 13448 (syz.2.1964), ts 185793699827, free_ts 185784172636 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_frag_netmem+0x219/0x9c0 net/core/page_pool.c:1038 page_pool_alloc_netmem include/net/page_pool/helpers.h:131 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x584/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Not tainted 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:4302c page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x48a0 pfn:0x4302c flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: 00000000000048a0 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 13450, tgid 13448 (syz.2.1964), ts 185793692565, free_ts 185784181758 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:359e1 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x359e1 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: ffffffffffffffff 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 13450, tgid 13448 (syz.2.1964), ts 185793685215, free_ts 185784190654 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:49552 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x49552 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: 0000000000000000 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 13450, tgid 13448 (syz.2.1964), ts 185793677962, free_ts 185784199565 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:3ec44 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88802c546b80 pfn:0x3ec44 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: ffff88802c546b80 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 13450, tgid 13448 (syz.2.1964), ts 185793671087, free_ts 185784208360 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:32ff5 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x32ff5 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: ffff888000000000 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 13450, tgid 13448 (syz.2.1964), ts 185793615046, free_ts 185784217522 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:54bd1 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88802cb5e0c0 pfn:0x54bd1 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: ffff88802cb5e0c0 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 13450, tgid 13448 (syz.2.1964), ts 185793608844, free_ts 185784226807 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:3a843 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88803a843f00 pfn:0x3a843 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: ffff88803a843f00 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 13450, tgid 13448 (syz.2.1964), ts 185793602044, free_ts 185784236113 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:4302a page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x489e pfn:0x4302a flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: 000000000000489e 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 13450, tgid 13448 (syz.2.1964), ts 185793595798, free_ts 185784244967 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:616f5 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x200000000 pfn:0x616f5 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: 0000000200000000 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 13450, tgid 13448 (syz.2.1964), ts 185793588835, free_ts 185784254269 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:589b9 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x589b9 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: 0000000000000000 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 13450, tgid 13448 (syz.2.1964), ts 185793582193, free_ts 185784263338 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 BUG: Bad page state in process syz.2.1964 pfn:3ec43 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3ec43 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888022379000 0000000000000000 raw: 0000000000000000 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 13450, tgid 13448 (syz.2.1964), ts 185793575016, free_ts 185784272530 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 __alloc_pages_noprof mm/page_alloc.c:4993 [inline] alloc_pages_bulk_noprof+0x71c/0x1410 mm/page_alloc.c:4913 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x193/0xc30 net/core/page_pool.c:567 page_pool_alloc_netmems net/core/page_pool.c:618 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:605 page_pool_alloc_netmem include/net/page_pool/helpers.h:128 [inline] page_pool_alloc include/net/page_pool/helpers.h:160 [inline] page_pool_dev_alloc include/net/page_pool/helpers.h:181 [inline] skb_pp_cow_data+0x7c0/0xff0 net/core/skbuff.c:952 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:986 netif_skb_check_for_xdp net/core/dev.c:5329 [inline] netif_receive_generic_xdp net/core/dev.c:5370 [inline] do_xdp_generic+0x530/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2879 [inline] pagetable_dtor_free include/linux/mm.h:2977 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core+0x799/0x14e0 kernel/rcu/tree.c:2832 handle_softirqs+0x216/0x8e0 kernel/softirq.c:579 run_ksoftirqd kernel/softirq.c:968 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:960 smpboot_thread_fn+0x3f4/0xae0 kernel/smpboot.c:164 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Modules linked in: CPU: 0 UID: 0 PID: 13450 Comm: syz.2.1964 Tainted: G B 6.16.0-rc2-syzkaller-00269-g11313e2f7812 #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120 bad_page+0xcf/0x220 mm/page_alloc.c:506 free_page_is_bad mm/page_alloc.c:939 [inline] free_page_is_bad mm/page_alloc.c:933 [inline] free_pages_prepare mm/page_alloc.c:1240 [inline] __free_frozen_pages+0x824/0x1180 mm/page_alloc.c:2706 page_frag_free+0x27f/0x2e0 mm/page_frag_cache.c:169 __xdp_return+0x38e/0xa90 net/core/xdp.c:448 bpf_xdp_shrink_data net/core/filter.c:4172 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4192 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4217 [inline] bpf_xdp_adjust_tail+0xa11/0xfd0 net/core/filter.c:4210 bpf_prog_f476d5219b92964a+0x1e/0x24 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:657 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5260 netif_receive_generic_xdp net/core/dev.c:5376 [inline] do_xdp_generic+0x8e6/0x1320 net/core/dev.c:5438 __netif_receive_skb_core.constprop.0+0x161c/0x4a00 net/core/dev.c:5788 __netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:5975 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 netif_receive_skb_internal net/core/dev.c:6176 [inline] netif_receive_skb+0x137/0x7b0 net/core/dev.c:6235 tun_rx_batched.isra.0+0x3ee/0x740 drivers/net/tun.c:1509 tun_get_user+0x28a2/0x3b80 drivers/net/tun.c:1938 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x12a/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fec6ed8d3df 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:00007fec6fb99000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fec6efb5fa0 RCX: 00007fec6ed8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007fec6ee10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fec6efb5fa0 R15: 00007ffd6677ee38 bridge0: port 1(syz_tun) entered disabled state syz_tun (unregistering): left allmulticast mode syz_tun (unregistering): left promiscuous mode bridge0: port 1(syz_tun) entered disabled state