BUG: Bad page state in process syz.2.1692 pfn:24543 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x24543 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 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 11225, tgid 11224 (syz.2.1692), ts 161156276867, free_ts 161117275658 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 34 tgid 34 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 run_ksoftirqd kernel/softirq.c:950 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:942 smpboot_thread_fn+0x661/0xa30 kernel/smpboot.c:164 kthread+0x3af/0x750 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Not tainted 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78 BUG: Bad page state in process syz.2.1692 pfn:57465 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x57465 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 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 11225, tgid 11224 (syz.2.1692), ts 161156269310, free_ts 161117280487 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 34 tgid 34 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 run_ksoftirqd kernel/softirq.c:950 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:942 smpboot_thread_fn+0x661/0xa30 kernel/smpboot.c:164 kthread+0x3af/0x750 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Tainted: G B 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78 BUG: Bad page state in process syz.2.1692 pfn:3215d page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3215d flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 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 11225, tgid 11224 (syz.2.1692), ts 161156262411, free_ts 161117285163 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 34 tgid 34 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 run_ksoftirqd kernel/softirq.c:950 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:942 smpboot_thread_fn+0x661/0xa30 kernel/smpboot.c:164 kthread+0x3af/0x750 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Tainted: G B 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78 BUG: Bad page state in process syz.2.1692 pfn:4e32f page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x4e32f flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 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 11225, tgid 11224 (syz.2.1692), ts 161156255738, free_ts 161117289901 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 34 tgid 34 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 run_ksoftirqd kernel/softirq.c:950 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:942 smpboot_thread_fn+0x661/0xa30 kernel/smpboot.c:164 kthread+0x3af/0x750 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Tainted: G B 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78 BUG: Bad page state in process syz.2.1692 pfn:5a3dc page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88805a3dcf78 pfn:0x5a3dc flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 0000000000000000 raw: ffff88805a3dcf78 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 11225, tgid 11224 (syz.2.1692), ts 161156248812, free_ts 161117293021 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 34 tgid 34 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 run_ksoftirqd kernel/softirq.c:950 [inline] run_ksoftirqd+0x3a/0x60 kernel/softirq.c:942 smpboot_thread_fn+0x661/0xa30 kernel/smpboot.c:164 kthread+0x3af/0x750 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Tainted: G B 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78 BUG: Bad page state in process syz.2.1692 pfn:245f5 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880245f5e70 pfn:0x245f5 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 0000000000000000 raw: ffff8880245f5e70 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 11225, tgid 11224 (syz.2.1692), ts 161156241702, free_ts 161133949835 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 9304 tgid 9304 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_call_function arch/x86/kernel/smp.c:257 [inline] sysvec_call_function+0xa4/0xc0 arch/x86/kernel/smp.c:257 asm_sysvec_call_function+0x1a/0x20 arch/x86/include/asm/idtentry.h:710 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Tainted: G B 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78 BUG: Bad page state in process syz.2.1692 pfn:2f32d page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2f32d flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 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 11225, tgid 11224 (syz.2.1692), ts 161156234556, free_ts 161133957470 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 9304 tgid 9304 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_call_function arch/x86/kernel/smp.c:257 [inline] sysvec_call_function+0xa4/0xc0 arch/x86/kernel/smp.c:257 asm_sysvec_call_function+0x1a/0x20 arch/x86/include/asm/idtentry.h:710 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Tainted: G B 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78 BUG: Bad page state in process syz.2.1692 pfn:359a7 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880359a7000 pfn:0x359a7 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 0000000000000000 raw: ffff8880359a7000 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 11225, tgid 11224 (syz.2.1692), ts 161156227694, free_ts 161133974970 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 9304 tgid 9304 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_call_function arch/x86/kernel/smp.c:257 [inline] sysvec_call_function+0xa4/0xc0 arch/x86/kernel/smp.c:257 asm_sysvec_call_function+0x1a/0x20 arch/x86/include/asm/idtentry.h:710 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Tainted: G B 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78 BUG: Bad page state in process syz.2.1692 pfn:323a0 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x323a0 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 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 11225, tgid 11224 (syz.2.1692), ts 161156220804, free_ts 161133981256 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 9304 tgid 9304 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_call_function arch/x86/kernel/smp.c:257 [inline] sysvec_call_function+0xa4/0xc0 arch/x86/kernel/smp.c:257 asm_sysvec_call_function+0x1a/0x20 arch/x86/include/asm/idtentry.h:710 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Tainted: G B 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78 BUG: Bad page state in process syz.2.1692 pfn:31b55 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x31b55 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 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 11225, tgid 11224 (syz.2.1692), ts 161156213566, free_ts 161133987628 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 9304 tgid 9304 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_call_function arch/x86/kernel/smp.c:257 [inline] sysvec_call_function+0xa4/0xc0 arch/x86/kernel/smp.c:257 asm_sysvec_call_function+0x1a/0x20 arch/x86/include/asm/idtentry.h:710 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Tainted: G B 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78 BUG: Bad page state in process syz.2.1692 pfn:4e250 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x4e250 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff8880202b4000 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 11225, tgid 11224 (syz.2.1692), ts 161156206722, free_ts 161133991323 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x221/0x2470 mm/page_alloc.c:4739 __alloc_pages_noprof mm/page_alloc.c:4773 [inline] alloc_pages_bulk_noprof+0x6f9/0x1390 mm/page_alloc.c:4693 alloc_pages_bulk_node_noprof include/linux/gfp.h:235 [inline] __page_pool_alloc_pages_slow+0x18c/0x770 net/core/page_pool.c:542 page_pool_alloc_netmems net/core/page_pool.c:593 [inline] page_pool_alloc_netmems+0xc4/0x160 net/core/page_pool.c:580 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+0x776/0xf10 net/core/skbuff.c:893 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:927 netif_skb_check_for_xdp net/core/dev.c:5262 [inline] netif_receive_generic_xdp net/core/dev.c:5301 [inline] do_xdp_generic+0x3f1/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 page last free pid 9304 tgid 9304 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0x6db/0xfb0 mm/page_alloc.c:2660 pagetable_free include/linux/mm.h:2917 [inline] pagetable_dtor_free include/linux/mm.h:3015 [inline] __tlb_remove_table include/asm-generic/tlb.h:216 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x116/0x1a0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2546 [inline] rcu_core+0x79d/0x14d0 kernel/rcu/tree.c:2802 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x109/0x170 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_call_function arch/x86/kernel/smp.c:257 [inline] sysvec_call_function+0xa4/0xc0 arch/x86/kernel/smp.c:257 asm_sysvec_call_function+0x1a/0x20 arch/x86/include/asm/idtentry.h:710 Modules linked in: CPU: 3 UID: 0 PID: 11225 Comm: syz.2.1692 Tainted: G B 6.14.0-rc4-syzkaller-00090-gdd83757f6e68 #0 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+0xb3/0x1f0 mm/page_alloc.c:501 free_page_is_bad_report mm/page_alloc.c:913 [inline] free_page_is_bad mm/page_alloc.c:923 [inline] free_pages_prepare mm/page_alloc.c:1119 [inline] free_frozen_pages+0x701/0xfb0 mm/page_alloc.c:2660 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x319/0xa70 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4155 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4175 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4200 [inline] bpf_xdp_adjust_tail+0x9de/0xf70 net/core/filter.c:4193 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run_xdp include/net/xdp.h:654 [inline] bpf_prog_run_generic_xdp+0x623/0x1500 net/core/dev.c:5194 netif_receive_generic_xdp net/core/dev.c:5307 [inline] do_xdp_generic+0x70a/0xe70 net/core/dev.c:5369 __netif_receive_skb_core.constprop.0+0x12da/0x4330 net/core/dev.c:5719 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5897 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6012 netif_receive_skb_internal net/core/dev.c:6098 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:6157 tun_rx_batched.isra.0+0x3eb/0x730 drivers/net/tun.c:1574 tun_get_user+0x2a22/0x3e50 drivers/net/tun.c:2007 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:2053 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1f3398bc1f 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:00007f1f348a9000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f1f33ba5fa0 RCX: 00007f1f3398bc1f RDX: 000000000000fd5c RSI: 0000400000000440 RDI: 00000000000000c8 RBP: 00007f1f33a0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fd5c R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1f33ba5fa0 R15: 00007fff452cdf78