BUG: Bad page state in process syz.0.342 pfn:43ae1 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x43ae1 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 0000000000000000 raw: ffffffffffffffff 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 6835, tgid 6834 (syz.0.342), ts 59493268503, free_ts 59443013219 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 page_pool_alloc_frag_netmem+0x21b/0x760 net/core/page_pool.c:1003 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+0x570/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Not tainted 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:43ae0 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888043ae6600 pfn:0x43ae0 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 0000000000000000 raw: ffff888043ae6600 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 6835, tgid 6834 (syz.0.342), ts 59493262236, free_ts 59443013219 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:41baf page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x7fa36c986 pfn:0x41baf flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 0000000000000000 raw: 00000007fa36c986 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 6835, tgid 6834 (syz.0.342), ts 59493256269, free_ts 59443028557 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:41bae page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x7fa36c985 pfn:0x41bae flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 0000000000000000 raw: 00000007fa36c985 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 6835, tgid 6834 (syz.0.342), ts 59493250117, free_ts 59443028557 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:41bad page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x41bad flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 0000000000000000 raw: ffffffffffffffff 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 6835, tgid 6834 (syz.0.342), ts 59493244086, free_ts 59443028557 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:41bac page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888041bafa80 pfn:0x41bac flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 0000000000000000 raw: ffff888041bafa80 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 6835, tgid 6834 (syz.0.342), ts 59493236642, free_ts 59443028557 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:41bab page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x7fa36c982 pfn:0x41bab flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 0000000000000000 raw: 00000007fa36c982 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 6835, tgid 6834 (syz.0.342), ts 59493229061, free_ts 59443028557 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:41baa page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x7fa36c981 pfn:0x41baa flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 0000000000000000 raw: 00000007fa36c981 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 6835, tgid 6834 (syz.0.342), ts 59493222312, free_ts 59443028557 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:41ba9 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffffffffffffffff pfn:0x41ba9 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 0000000000000000 raw: ffffffffffffffff 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2820(GFP_ATOMIC|__GFP_NOWARN), pid 6835, tgid 6834 (syz.0.342), ts 59493216365, free_ts 59443028557 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:41ba8 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888041bae000 pfn:0x41ba8 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 0000000000000000 raw: ffff888041bae000 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 6835, tgid 6834 (syz.0.342), ts 59493210130, free_ts 59443028557 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:3303f page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3303f flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 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 6835, tgid 6834 (syz.0.342), ts 59493203948, free_ts 59443039761 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8 BUG: Bad page state in process syz.0.342 pfn:3303e page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3303e flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000040 ffff888020c68000 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 6835, tgid 6834 (syz.0.342), ts 59493197771, free_ts 59443039761 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x135c/0x3920 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x263/0x23a0 mm/page_alloc.c:4970 __alloc_pages_noprof mm/page_alloc.c:5004 [inline] alloc_pages_bulk_noprof+0x703/0x13b0 mm/page_alloc.c:4924 alloc_pages_bulk_node_noprof include/linux/gfp.h:254 [inline] __page_pool_alloc_pages_slow+0x190/0xc20 net/core/page_pool.c:547 page_pool_alloc_netmems net/core/page_pool.c:598 [inline] page_pool_alloc_netmems+0xc4/0x190 net/core/page_pool.c:585 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+0x775/0xf00 net/core/skbuff.c:955 skb_cow_data_for_xdp+0x88/0xb0 net/core/skbuff.c:989 netif_skb_check_for_xdp net/core/dev.c:5241 [inline] netif_receive_generic_xdp net/core/dev.c:5280 [inline] do_xdp_generic+0x404/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 6835 tgid 6834 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x69d/0xff0 mm/page_alloc.c:2725 discard_slab mm/slub.c:2716 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3185 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] __do_kmalloc_node mm/slub.c:4326 [inline] __kmalloc_noprof+0x1d4/0x510 mm/slub.c:4339 kmalloc_noprof include/linux/slab.h:909 [inline] tomoyo_realpath_from_path+0xc2/0x6e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_number_perm+0x245/0x580 security/tomoyo/file.c:723 security_file_ioctl+0x9b/0x240 security/security.c:2913 __do_sys_ioctl fs/ioctl.c:900 [inline] __se_sys_ioctl fs/ioctl.c:892 [inline] __x64_sys_ioctl+0xb7/0x200 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: CPU: 1 UID: 0 PID: 6835 Comm: syz.0.342 Tainted: G B 6.15.0-rc5-syzkaller-00043-gd76bb1ebb558 #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+0xb3/0x1f0 mm/page_alloc.c:505 free_page_is_bad_report mm/page_alloc.c:938 [inline] free_page_is_bad mm/page_alloc.c:948 [inline] free_pages_prepare mm/page_alloc.c:1254 [inline] __free_frozen_pages+0x76e/0xff0 mm/page_alloc.c:2725 page_frag_free+0x255/0x2a0 mm/page_frag_cache.c:169 __xdp_return+0x359/0xa40 net/core/xdp.c:447 bpf_xdp_shrink_data net/core/filter.c:4163 [inline] bpf_xdp_frags_shrink_tail net/core/filter.c:4183 [inline] ____bpf_xdp_adjust_tail net/core/filter.c:4208 [inline] bpf_xdp_adjust_tail+0x9e0/0xf80 net/core/filter.c:4201 bpf_prog_f476d5219b92964a+0x1e/0x20 __bpf_prog_run include/linux/filter.h:718 [inline] bpf_prog_run_xdp include/net/xdp.h:653 [inline] bpf_prog_run_generic_xdp+0x626/0x1530 net/core/dev.c:5173 netif_receive_generic_xdp net/core/dev.c:5286 [inline] do_xdp_generic+0x719/0xe80 net/core/dev.c:5348 tun_get_user+0x1bc6/0x3b10 drivers/net/tun.c:1860 tun_chr_write_iter+0xdc/0x210 drivers/net/tun.c:1984 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x5ba/0x1180 fs/read_write.c:684 ksys_write+0x12a/0x240 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6e0a78d41f 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:00007f6e0b64a000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f6e0a9b5fa0 RCX: 00007f6e0a78d41f RDX: 000000000000fdef RSI: 0000200000000100 RDI: 00000000000000c8 RBP: 00007f6e0a810ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 000000000000fdef R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f6e0a9b5fa0 R15: 00007ffdaa750ce8