syzbot


KASAN: slab-use-after-free Read in ipt_do_table

Status: closed as invalid on 2026/01/07 12:42
Subsystems: netfilter
[Documentation on labels]
First crash: 81d, last: 81d
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel paging request in ipt_do_table netfilter 8 1 1648d 1644d 0/29 auto-closed as invalid on 2021/10/17 23:06
android-5-10 KASAN: use-after-free Read in ipt_do_table 19 4 4d00h 53d 0/2 premoderation: reported on 2025/11/30 21:53
android-5-15 KASAN: use-after-free Read in ipt_do_table 19 1 97d 97d 0/2 auto-obsoleted due to no activity on 2026/01/15 08:55
linux-4.19 general protection fault in ipt_do_table 2 1 1755d 1755d 0/1 auto-closed as invalid on 2021/08/01 14:21
upstream KASAN: use-after-free Read in ipt_do_table netfilter 19 syz error error 16 1223d 1371d 0/29 closed as invalid on 2022/11/17 17:58
android-6-1 KASAN: use-after-free Read in ipt_do_table 19 1 89d 89d 0/2 premoderation: reported on 2025/10/26 06:09

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in ifname_compare_aligned include/linux/netfilter/x_tables.h:402 [inline]
BUG: KASAN: slab-use-after-free in ip_packet_match net/ipv4/netfilter/ip_tables.c:62 [inline]
BUG: KASAN: slab-use-after-free in ipt_do_table+0x6e3/0x1640 net/ipv4/netfilter/ip_tables.c:283
Read of size 8 at addr ffff888045160120 by task syz.3.15271/14507

CPU: 1 UID: 0 PID: 14507 Comm: syz.3.15271 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xca/0x240 mm/kasan/report.c:482
 kasan_report+0x118/0x150 mm/kasan/report.c:595
 ifname_compare_aligned include/linux/netfilter/x_tables.h:402 [inline]
 ip_packet_match net/ipv4/netfilter/ip_tables.c:62 [inline]
 ipt_do_table+0x6e3/0x1640 net/ipv4/netfilter/ip_tables.c:283
 nf_hook_entry_hookfn include/linux/netfilter.h:158 [inline]
 nf_hook_slow+0xc5/0x220 net/netfilter/core.c:623
 nf_hook+0x217/0x380 include/linux/netfilter.h:273
 NF_HOOK_COND include/linux/netfilter.h:306 [inline]
 ip_mc_output+0x42d/0x590 net/ipv4/ip_output.c:422
 ip_local_out net/ipv4/ip_output.c:131 [inline]
 ip_send_skb+0x74/0x100 net/ipv4/ip_output.c:1508
 udp_send_skb+0xaf1/0x14c0 net/ipv4/udp.c:1195
 udp_sendmsg+0x195a/0x2170 net/ipv4/udp.c:1484
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg+0x19c/0x270 net/socket.c:742
 ____sys_sendmsg+0x52d/0x830 net/socket.c:2630
 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2684
 __sys_sendmmsg+0x227/0x430 net/socket.c:2773
 __do_sys_sendmmsg net/socket.c:2800 [inline]
 __se_sys_sendmmsg net/socket.c:2797 [inline]
 __x64_sys_sendmmsg+0xa0/0xc0 net/socket.c:2797
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f44d758efc9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f44d834d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f44d77e6090 RCX: 00007f44d758efc9
RDX: 000000000800001d RSI: 0000200000007fc0 RDI: 0000000000000004
RBP: 00007f44d7611f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f44d77e6128 R14: 00007f44d77e6090 R15: 00007f44d790fa28
 </TASK>

Allocated by task 5815:
 kasan_save_stack mm/kasan/common.c:56 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
 unpoison_slab_object mm/kasan/common.c:342 [inline]
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:368
 kasan_slab_alloc include/linux/kasan.h:252 [inline]
 slab_post_alloc_hook mm/slub.c:4970 [inline]
 slab_alloc_node mm/slub.c:5280 [inline]
 kmem_cache_alloc_node_noprof+0x433/0x710 mm/slub.c:5332
 kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:579
 __alloc_skb+0x142/0x2d0 net/core/skbuff.c:670
 alloc_skb_fclone include/linux/skbuff.h:1433 [inline]
 tcp_stream_alloc_skb+0x3d/0x340 net/ipv4/tcp.c:912
 tcp_sendmsg_locked+0x1c7f/0x5540 net/ipv4/tcp.c:1218
 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1413
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg+0x19c/0x270 net/socket.c:742
 sock_write_iter+0x279/0x360 net/socket.c:1195
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x5c9/0xb30 fs/read_write.c:686
 ksys_write+0x145/0x250 fs/read_write.c:738
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 0:
 kasan_save_stack mm/kasan/common.c:56 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
 __kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:587
 kasan_save_free_info mm/kasan/kasan.h:406 [inline]
 poison_slab_object mm/kasan/common.c:252 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284
 kasan_slab_free include/linux/kasan.h:234 [inline]
 slab_free_hook mm/slub.c:2539 [inline]
 slab_free mm/slub.c:6630 [inline]
 kmem_cache_free+0x19b/0x690 mm/slub.c:6740
 skb_release_data+0x62d/0x7c0 net/core/skbuff.c:1087
 skb_release_all net/core/skbuff.c:1152 [inline]
 __kfree_skb+0x55/0x70 net/core/skbuff.c:1166
 tcp_clean_rtx_queue net/ipv4/tcp_input.c:3478 [inline]
 tcp_ack+0x2266/0x6950 net/ipv4/tcp_input.c:4103
 tcp_rcv_established+0x148b/0x2670 net/ipv4/tcp_input.c:6348
 tcp_v4_do_rcv+0xa90/0x1430 net/ipv4/tcp_ipv4.c:1931
 tcp_v4_rcv+0x2675/0x2f20 net/ipv4/tcp_ipv4.c:2374
 ip_protocol_deliver_rcu+0x221/0x440 net/ipv4/ip_input.c:205
 ip_local_deliver_finish+0x3bb/0x6f0 net/ipv4/ip_input.c:239
 NF_HOOK+0x30c/0x3a0 include/linux/netfilter.h:318
 dst_input include/net/dst.h:474 [inline]
 ip_sublist_rcv_finish+0x221/0x2a0 net/ipv4/ip_input.c:584
 ip_list_rcv_finish net/ipv4/ip_input.c:636 [inline]
 ip_sublist_rcv+0x74c/0xa10 net/ipv4/ip_input.c:644
 ip_list_rcv+0x3e2/0x430 net/ipv4/ip_input.c:678
 __netif_receive_skb_list_ptype net/core/dev.c:6122 [inline]
 __netif_receive_skb_list_core+0x7d2/0x800 net/core/dev.c:6169
 __netif_receive_skb_list net/core/dev.c:6221 [inline]
 netif_receive_skb_list_internal+0x96f/0xcb0 net/core/dev.c:6312
 gro_normal_list include/net/gro.h:524 [inline]
 gro_flush_normal include/net/gro.h:532 [inline]
 napi_complete_done+0x2f2/0x7c0 net/core/dev.c:6681
 virtqueue_napi_complete drivers/net/virtio_net.c:766 [inline]
 virtnet_poll+0x23cb/0x2db0 drivers/net/virtio_net.c:3122
 __napi_poll+0xc7/0x360 net/core/dev.c:7594
 napi_poll net/core/dev.c:7657 [inline]
 net_rx_action+0x5f7/0xdf0 net/core/dev.c:7784
 handle_softirqs+0x286/0x870 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:723
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
 common_interrupt+0xbb/0xe0 arch/x86/kernel/irq.c:318
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:688

The buggy address belongs to the object at ffff888045160000
 which belongs to the cache skbuff_small_head of size 704
The buggy address is located 288 bytes inside of
 freed 704-byte region [ffff888045160000, ffff8880451602c0)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x45160
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801deebc80 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080130013 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801deebc80 dead000000000122 0000000000000000
head: 0000000000000000 0000000080130013 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0001145801 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5815, tgid 5815 (syz-executor), ts 3054512594156, free_ts 3054486452588
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850
 prep_new_page mm/page_alloc.c:1858 [inline]
 get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3884
 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
 alloc_slab_page mm/slub.c:3055 [inline]
 allocate_slab+0x96/0x350 mm/slub.c:3228
 new_slab mm/slub.c:3282 [inline]
 ___slab_alloc+0xe94/0x18a0 mm/slub.c:4651
 __slab_alloc+0x65/0x100 mm/slub.c:4770
 __slab_alloc_node mm/slub.c:4846 [inline]
 slab_alloc_node mm/slub.c:5268 [inline]
 kmem_cache_alloc_node_noprof+0x4c5/0x710 mm/slub.c:5332
 kmalloc_reserve+0xbd/0x290 net/core/skbuff.c:579
 __alloc_skb+0x142/0x2d0 net/core/skbuff.c:670
 alloc_skb_fclone include/linux/skbuff.h:1433 [inline]
 tcp_stream_alloc_skb+0x3d/0x340 net/ipv4/tcp.c:912
 tcp_sendmsg_locked+0x1c7f/0x5540 net/ipv4/tcp.c:1218
 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1413
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg+0x19c/0x270 net/socket.c:742
 sock_write_iter+0x279/0x360 net/socket.c:1195
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x5c9/0xb30 fs/read_write.c:686
page last free pid 14510 tgid 14504 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1394 [inline]
 __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2906
 free_large_kmalloc+0x13a/0x1f0 mm/slub.c:6763
 device_release+0x9c/0x1c0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x22b/0x480 lib/kobject.c:737
 netdev_run_todo+0xd2e/0xea0 net/core/dev.c:11601
 rtnl_unlock net/core/rtnetlink.c:157 [inline]
 rtnl_net_unlock include/linux/rtnetlink.h:135 [inline]
 rtnl_dellink+0x5aa/0x700 net/core/rtnetlink.c:3571
 rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6951
 netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2552
 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
 netlink_unicast+0x82f/0x9e0 net/netlink/af_netlink.c:1346
 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg+0x21c/0x270 net/socket.c:742
 ____sys_sendmsg+0x505/0x830 net/socket.c:2630
 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2684
 __sys_sendmsg net/socket.c:2716 [inline]
 __do_sys_sendmsg net/socket.c:2721 [inline]
 __se_sys_sendmsg net/socket.c:2719 [inline]
 __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2719
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff888045160000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888045160080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888045160100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                               ^
 ffff888045160180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888045160200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/03 01:12 upstream 6146a0f1dfae 2c50b6a9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in ipt_do_table
* Struck through repros no longer work on HEAD.