BUG: Bad page state in process syz.2.1470 pfn:334fe page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x334fe flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 0000000000000000 raw: ffff888000000000 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 11309, tgid 11307 (syz.2.1470), ts 131123676098, free_ts 131090156668 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:2a220 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88802a220000 pfn:0x2a220 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 0000000000000000 raw: ffff88802a220000 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 11309, tgid 11307 (syz.2.1470), ts 131123669639, free_ts 131090165645 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:21d12 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888021d12fe0 pfn:0x21d12 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 0000000000000000 raw: ffff888021d12fe0 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 11309, tgid 11307 (syz.2.1470), ts 131123663449, free_ts 131090174558 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:52a61 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x52a61 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 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 11309, tgid 11307 (syz.2.1470), ts 131123657303, free_ts 131090183472 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:5ddab page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88805ddabf00 pfn:0x5ddab flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 0000000000000000 raw: ffff88805ddabf00 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 11309, tgid 11307 (syz.2.1470), ts 131123651148, free_ts 131090188782 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:4c6cd page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88804c6cdf00 pfn:0x4c6cd flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 0000000000000000 raw: ffff88804c6cdf00 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 11309, tgid 11307 (syz.2.1470), ts 131123644858, free_ts 131090198017 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:2585c page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x2585c flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 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 11309, tgid 11307 (syz.2.1470), ts 131123638561, free_ts 131090207297 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:55beb page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888055bebf00 pfn:0x55beb flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 0000000000000000 raw: ffff888055bebf00 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 11309, tgid 11307 (syz.2.1470), ts 131123631877, free_ts 131090212716 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:4ef2d page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4ef2d flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 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 11309, tgid 11307 (syz.2.1470), ts 131123625222, free_ts 131090222673 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:127ad page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x238 pfn:0x127ad flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 0000000000000000 raw: 0000000000000238 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 11309, tgid 11307 (syz.2.1470), ts 131123618812, free_ts 131090232584 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:354d5 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x27b pfn:0x354d5 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 0000000000000000 raw: 000000000000027b 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 11309, tgid 11307 (syz.2.1470), ts 131123612598, free_ts 131090241905 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8 BUG: Bad page state in process syz.2.1470 pfn:3577c page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3577c flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880221fb000 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 11309, tgid 11307 (syz.2.1470), ts 131123606406, free_ts 131090250815 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 28 tgid 28 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: 1 UID: 0 PID: 11309 Comm: syz.2.1470 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:0x7f1c2eb8d3df 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:00007f1c2f92a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1c2edb5fa0 RCX: 00007f1c2eb8d3df RDX: 000000000000fe53 RSI: 0000200000000440 RDI: 00000000000000c8 RBP: 00007f1c2ec10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fe53 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c2edb5fa0 R15: 00007ffc194ba0b8