================================================================== BUG: KASAN: use-after-free in __nft_trace_packet+0x137/0x150 net/netfilter/nf_tables_core.c:30 Read of size 2 at addr ffff88802ab51e40 by task ksoftirqd/0/14 CPU: 0 PID: 14 Comm: ksoftirqd/0 Not tainted 5.15.170-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 __nft_trace_packet+0x137/0x150 net/netfilter/nf_tables_core.c:30 nft_trace_verdict net/netfilter/nf_tables_core.c:110 [inline] nft_do_chain+0x1453/0x16b0 net/netfilter/nf_tables_core.c:256 nft_do_chain_inet+0x3f8/0x680 net/netfilter/nft_chain_filter.c:161 nf_hook_entry_hookfn include/linux/netfilter.h:142 [inline] nf_hook_slow+0xae/0x1e0 net/netfilter/core.c:584 nf_hook include/linux/netfilter.h:257 [inline] NF_HOOK+0x26b/0x410 include/linux/netfilter.h:300 NF_HOOK+0x364/0x410 include/linux/netfilter.h:302 __netif_receive_skb_one_core net/core/dev.c:5489 [inline] __netif_receive_skb+0x1c6/0x530 net/core/dev.c:5603 process_backlog+0x363/0x7f0 net/core/dev.c:6480 __napi_poll+0xc7/0x440 net/core/dev.c:7039 napi_poll net/core/dev.c:7106 [inline] net_rx_action+0x617/0xda0 net/core/dev.c:7196 handle_softirqs+0x3a7/0x930 kernel/softirq.c:558 run_ksoftirqd+0xc6/0x120 kernel/softirq.c:925 smpboot_thread_fn+0x51b/0x9d0 kernel/smpboot.c:164 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 14: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x8e/0xc0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x53/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] kmem_cache_alloc_node+0x121/0x2c0 mm/slub.c:3256 __alloc_skb+0xdd/0x590 net/core/skbuff.c:415 alloc_skb include/linux/skbuff.h:1162 [inline] synproxy_send_client_synack+0x1b6/0xf20 net/netfilter/nf_synproxy_core.c:482 nft_synproxy_eval_v4+0x3c6/0x610 net/netfilter/nft_synproxy.c:59 nft_synproxy_do_eval+0x359/0xa60 net/netfilter/nft_synproxy.c:141 expr_call_ops_eval net/netfilter/nf_tables_core.c:198 [inline] nft_do_chain+0x467/0x16b0 net/netfilter/nf_tables_core.c:238 nft_do_chain_inet+0x3f8/0x680 net/netfilter/nft_chain_filter.c:161 nf_hook_entry_hookfn include/linux/netfilter.h:142 [inline] nf_hook_slow+0xae/0x1e0 net/netfilter/core.c:584 nf_hook include/linux/netfilter.h:257 [inline] NF_HOOK+0x26b/0x410 include/linux/netfilter.h:300 NF_HOOK+0x364/0x410 include/linux/netfilter.h:302 __netif_receive_skb_one_core net/core/dev.c:5489 [inline] __netif_receive_skb+0x1c6/0x530 net/core/dev.c:5603 process_backlog+0x363/0x7f0 net/core/dev.c:6480 __napi_poll+0xc7/0x440 net/core/dev.c:7039 napi_poll net/core/dev.c:7106 [inline] net_rx_action+0x617/0xda0 net/core/dev.c:7196 handle_softirqs+0x3a7/0x930 kernel/softirq.c:558 run_ksoftirqd+0xc6/0x120 kernel/softirq.c:925 smpboot_thread_fn+0x51b/0x9d0 kernel/smpboot.c:164 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Freed by task 14: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kmem_cache_free+0x91/0x1f0 mm/slub.c:3515 nft_synproxy_eval_v4+0x3ce/0x610 net/netfilter/nft_synproxy.c:60 nft_synproxy_do_eval+0x359/0xa60 net/netfilter/nft_synproxy.c:141 expr_call_ops_eval net/netfilter/nf_tables_core.c:198 [inline] nft_do_chain+0x467/0x16b0 net/netfilter/nf_tables_core.c:238 nft_do_chain_inet+0x3f8/0x680 net/netfilter/nft_chain_filter.c:161 nf_hook_entry_hookfn include/linux/netfilter.h:142 [inline] nf_hook_slow+0xae/0x1e0 net/netfilter/core.c:584 nf_hook include/linux/netfilter.h:257 [inline] NF_HOOK+0x26b/0x410 include/linux/netfilter.h:300 NF_HOOK+0x364/0x410 include/linux/netfilter.h:302 __netif_receive_skb_one_core net/core/dev.c:5489 [inline] __netif_receive_skb+0x1c6/0x530 net/core/dev.c:5603 process_backlog+0x363/0x7f0 net/core/dev.c:6480 __napi_poll+0xc7/0x440 net/core/dev.c:7039 napi_poll net/core/dev.c:7106 [inline] net_rx_action+0x617/0xda0 net/core/dev.c:7196 handle_softirqs+0x3a7/0x930 kernel/softirq.c:558 run_ksoftirqd+0xc6/0x120 kernel/softirq.c:925 smpboot_thread_fn+0x51b/0x9d0 kernel/smpboot.c:164 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff88802ab51dc0 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 128 bytes inside of 232-byte region [ffff88802ab51dc0, ffff88802ab51ea8) The buggy address belongs to the page: page:ffffea0000aad440 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2ab51 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 0000000000000000 dead000000000122 ffff888144bf1140 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 14, ts 117276334509, free_ts 111959197179 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] kmem_cache_alloc_node+0x1ba/0x2c0 mm/slub.c:3256 __alloc_skb+0xdd/0x590 net/core/skbuff.c:415 alloc_skb include/linux/skbuff.h:1162 [inline] synproxy_send_client_synack+0x1b6/0xf20 net/netfilter/nf_synproxy_core.c:482 nft_synproxy_eval_v4+0x3c6/0x610 net/netfilter/nft_synproxy.c:59 nft_synproxy_do_eval+0x359/0xa60 net/netfilter/nft_synproxy.c:141 expr_call_ops_eval net/netfilter/nf_tables_core.c:198 [inline] nft_do_chain+0x467/0x16b0 net/netfilter/nf_tables_core.c:238 nft_do_chain_inet+0x3f8/0x680 net/netfilter/nft_chain_filter.c:161 nf_hook_entry_hookfn include/linux/netfilter.h:142 [inline] nf_hook_slow+0xae/0x1e0 net/netfilter/core.c:584 nf_hook include/linux/netfilter.h:257 [inline] NF_HOOK+0x26b/0x410 include/linux/netfilter.h:300 NF_HOOK+0x364/0x410 include/linux/netfilter.h:302 __netif_receive_skb_one_core net/core/dev.c:5489 [inline] __netif_receive_skb+0x1c6/0x530 net/core/dev.c:5603 process_backlog+0x363/0x7f0 net/core/dev.c:6480 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 kasan_depopulate_vmalloc_pte+0x66/0x80 mm/kasan/shadow.c:375 apply_to_pte_range mm/memory.c:2562 [inline] apply_to_pmd_range mm/memory.c:2606 [inline] apply_to_pud_range mm/memory.c:2642 [inline] apply_to_p4d_range mm/memory.c:2678 [inline] __apply_to_page_range+0x9bf/0xcc0 mm/memory.c:2712 kasan_release_vmalloc+0x96/0xb0 mm/kasan/shadow.c:485 __purge_vmap_area_lazy+0x15ae/0x1740 mm/vmalloc.c:1704 _vm_unmap_aliases+0x453/0x4e0 mm/vmalloc.c:2107 vm_remove_mappings mm/vmalloc.c:2584 [inline] __vunmap+0x72e/0xa20 mm/vmalloc.c:2611 bpf_jit_binary_free kernel/bpf/core.c:914 [inline] bpf_jit_free+0x92/0x180 kernel/bpf/core.c:927 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff88802ab51d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ffff88802ab51d80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff88802ab51e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802ab51e80: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff88802ab51f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================