KASAN: use-after-free Read in ipt_do_table (3)

Status: premoderation: reported on 2026/09/24 00:31
Reported-by: syzbot+114a4d802e9efb9ccf29@syzkaller.appspotmail.com
First crash: 50d, last: 18d
▶ ▼ Similar bugs (12)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 KASAN: use-after-free Read in ipt_do_table 19 1 2471d 2471d 0/1 auto-closed as invalid on 2020/06/06 05:50
android-5-10 KASAN: use-after-free Read in ipt_do_table 19 4 297d 347d 0/2 auto-obsoleted due to no activity on 2026/04/19 06:45
android-6-1 KASAN: use-after-free Read in ipt_do_table (2) 19 2 12d 42d 0/2 premoderation: reported on 2026/10/01 15:11
android-5-15 KASAN: use-after-free Read in ipt_do_table 19 1 391d 391d 0/2 auto-obsoleted due to no activity on 2026/01/15 08:55
android-5-15 KASAN: use-after-free Read in ipt_do_table (2) 19 2 155d 166d 0/2 auto-obsoleted due to no activity on 2026/09/08 07:46
upstream KASAN: use-after-free Read in ipt_do_table netfilter 19 syz error error 16 1517d 1665d 0/29 closed as invalid on 2022/11/17 17:58
android-5-15 KASAN: use-after-free Read in ipt_do_table (3) 19 3 4d09h 33d 0/2 premoderation: reported on 2026/10/10 06:04
android-5-10 KASAN: use-after-free Read in ipt_do_table (2) 19 3 181d 198d 0/2 auto-obsoleted due to no activity on 2026/08/13 15:22
android-6-1 KASAN: use-after-free Read in ipt_do_table 19 1 382d 382d 0/2 auto-obsoleted due to no activity on 2026/01/24 06:12
upstream BUG: unable to handle kernel paging request in ipt_do_table netfilter 8 1 1942d 1938d 0/29 auto-closed as invalid on 2021/10/17 23:06
linux-4.19 general protection fault in ipt_do_table 2 1 2049d 2049d 0/1 auto-closed as invalid on 2021/08/01 14:21
upstream KASAN: slab-use-after-free Read in ipt_do_table netfilter 19 1 375d 375d 0/29 closed as invalid on 2026/01/07 12:42

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in ifname_compare_aligned include/linux/netfilter/x_tables.h:411 [inline]
BUG: KASAN: use-after-free in ip_packet_match net/ipv4/netfilter/ip_tables.c:64 [inline]
BUG: KASAN: use-after-free in ipt_do_table+0x68d/0x1480 net/ipv4/netfilter/ip_tables.c:284
Read of size 8 at addr ffff8881063a8000 by task syz.0.66/567

CPU: 1 PID: 567 Comm: syz.0.66 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0x100/0x140 mm/kasan/report.c:452
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
 ifname_compare_aligned include/linux/netfilter/x_tables.h:411 [inline]
 ip_packet_match net/ipv4/netfilter/ip_tables.c:64 [inline]
 ipt_do_table+0x68d/0x1480 net/ipv4/netfilter/ip_tables.c:284
 iptable_mangle_hook+0x200/0x540 net/ipv4/netfilter/iptable_mangle.c:82
 nf_hook_entry_hookfn include/linux/netfilter.h:137 [inline]
 nf_hook_slow+0xbc/0x1f0 net/netfilter/core.c:584
 nf_hook include/linux/netfilter.h:254 [inline]
 NF_HOOK_COND include/linux/netfilter.h:287 [inline]
 ip_mc_output+0x622/0x8e0 net/ipv4/ip_output.c:424
 dst_output include/net/dst.h:451 [inline]
 ip_local_out net/ipv4/ip_output.c:126 [inline]
 ip_send_skb+0xb2/0x140 net/ipv4/ip_output.c:1602
 udp_send_skb+0x8e6/0x10f0 net/ipv4/udp.c:977
 udp_sendmsg+0x17a6/0x2140 net/ipv4/udp.c:1265
 inet_sendmsg+0xa5/0xc0 net/ipv4/af_inet.c:830
 sock_sendmsg_nosec net/socket.c:652 [inline]
 __sock_sendmsg net/socket.c:664 [inline]
 ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2377
 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2431
 __sys_sendmmsg+0x2ab/0x4c0 net/socket.c:2517
 __do_sys_sendmmsg net/socket.c:2546 [inline]
 __se_sys_sendmmsg net/socket.c:2543 [inline]
 __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2543
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f99a0620559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f999f078028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f99a08a6fa0 RCX: 00007f99a0620559
RDX: 000000000800001d RSI: 0000200000007fc0 RDI: 0000000000000006
RBP: 00007f99a06b7b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000300 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f99a08a7038 R14: 00007f99a08a6fa0 R15: 00007ffeebe5d8f8

Allocated by task 84:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:430 [inline]
 __kasan_slab_alloc+0xb7/0xe0 mm/kasan/common.c:463
 kasan_slab_alloc include/linux/kasan.h:244 [inline]
 slab_post_alloc_hook+0x5d/0x2f0 mm/slab.h:580
 slab_alloc_node mm/slub.c:2952 [inline]
 slab_alloc mm/slub.c:2960 [inline]
 kmem_cache_alloc+0x15a/0x2d0 mm/slub.c:2965
 kmem_cache_alloc_node include/linux/slab.h:426 [inline]
 __alloc_skb+0x9e/0x520 net/core/skbuff.c:200
 alloc_skb include/linux/skbuff.h:1126 [inline]
 alloc_skb_with_frags+0xa3/0x560 net/core/skbuff.c:6058
 sock_alloc_send_pskb+0x87f/0x9a0 net/core/sock.c:2392
 unix_dgram_sendmsg+0x6f3/0x18f0 net/unix/af_unix.c:1725
 sock_sendmsg_nosec net/socket.c:652 [inline]
 __sock_sendmsg net/socket.c:664 [inline]
 __sys_sendto+0x467/0x620 net/socket.c:2007
 __do_sys_sendto net/socket.c:2019 [inline]
 __se_sys_sendto net/socket.c:2015 [inline]
 __x64_sys_sendto+0xe5/0x100 net/socket.c:2015
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Freed by task 77:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
 kasan_slab_free include/linux/kasan.h:220 [inline]
 slab_free_hook mm/slub.c:1600 [inline]
 slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626
 slab_free mm/slub.c:3208 [inline]
 kmem_cache_free+0x100/0x2d0 mm/slub.c:3224
 kfree_skbmem+0x10c/0x180 net/core/skbuff.c:-1
 __kfree_skb net/core/skbuff.c:695 [inline]
 consume_skb+0xb3/0x1f0 net/core/skbuff.c:855
 skb_free_datagram+0x28/0xe0 net/core/datagram.c:325
 unix_dgram_recvmsg+0x9cc/0xd30 net/unix/af_unix.c:2233
 sock_recvmsg_nosec net/socket.c:906 [inline]
 sock_recvmsg net/socket.c:924 [inline]
 sock_read_iter+0x2c2/0x380 net/socket.c:997
 call_read_iter include/linux/fs.h:2066 [inline]
 new_sync_read fs/read_write.c:415 [inline]
 vfs_read+0x62a/0xa50 fs/read_write.c:496
 ksys_read+0x14a/0x260 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x7b/0x90 fs/read_write.c:642
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

The buggy address belongs to the object at ffff8881063a8000
 which belongs to the cache skbuff_head_cache of size 248
The buggy address is located 0 bytes inside of
 248-byte region [ffff8881063a8000, ffff8881063a80f8)
The buggy address belongs to the page:
page:ffffea000418ea00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063a8
flags: 0x4000000000000200(slab)
raw: 4000000000000200 dead000000000100 dead000000000122 ffff888107d93500
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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 84, ts 46549843662, free_ts 46504596159
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x176/0x190 mm/page_alloc.c:2462
 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1813 [inline]
 new_slab+0x84/0x3f0 mm/slub.c:1874
 new_slab_objects mm/slub.c:2632 [inline]
 ___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796
 __slab_alloc+0x63/0xa0 mm/slub.c:2836
 slab_alloc_node mm/slub.c:2918 [inline]
 slab_alloc mm/slub.c:2960 [inline]
 kmem_cache_alloc+0x1a4/0x2d0 mm/slub.c:2965
 kmem_cache_alloc_node include/linux/slab.h:426 [inline]
 __alloc_skb+0x9e/0x520 net/core/skbuff.c:200
 alloc_skb include/linux/skbuff.h:1126 [inline]
 alloc_skb_with_frags+0xa3/0x560 net/core/skbuff.c:6058
 sock_alloc_send_pskb+0x87f/0x9a0 net/core/sock.c:2392
 unix_dgram_sendmsg+0x6f3/0x18f0 net/unix/af_unix.c:1725
 sock_sendmsg_nosec net/socket.c:652 [inline]
 __sock_sendmsg net/socket.c:664 [inline]
 __sys_sendto+0x467/0x620 net/socket.c:2007
 __do_sys_sendto net/socket.c:2019 [inline]
 __se_sys_sendto net/socket.c:2015 [inline]
 __x64_sys_sendto+0xe5/0x100 net/socket.c:2015
 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:28 [inline]
 free_pages_prepare mm/page_alloc.c:1349 [inline]
 free_pcp_prepare mm/page_alloc.c:1421 [inline]
 free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336
 free_unref_page mm/page_alloc.c:3391 [inline]
 free_the_page mm/page_alloc.c:5443 [inline]
 __free_pages+0x146/0x390 mm/page_alloc.c:5454
 free_pages+0x82/0x90 mm/page_alloc.c:5465
 tlb_batch_list_free mm/mmu_gather.c:61 [inline]
 tlb_finish_mmu+0x258/0x310 mm/mmu_gather.c:329
 exit_mmap+0x329/0x590 mm/mmap.c:3387
 __mmput+0x92/0x2d0 kernel/fork.c:1153
 mmput+0x4e/0x150 kernel/fork.c:1176
 exit_mm kernel/exit.c:546 [inline]
 do_exit+0x9d8/0x24e0 kernel/exit.c:866
 do_group_exit+0x149/0x310 kernel/exit.c:993
 get_signal+0xfb1/0x1300 kernel/signal.c:2806
 arch_do_signal_or_restart+0xe7/0x11b0 arch/x86/kernel/signal.c:805
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop+0xa2/0xe0 kernel/entry/common.c:172
 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:202
 syscall_exit_to_user_mode+0x1d/0x40 kernel/entry/common.c:277
 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x61/0xcb

Memory state around the buggy address:
 ffff8881063a7f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8881063a7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881063a8000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff8881063a8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc
 ffff8881063a8100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/25 15:46 android13-5.10-lts f61a392235e0 1d9ca40b .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ipt_do_table
2026/10/03 07:46 android13-5.10-lts 8ddf8d57c49c 57bbd979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ipt_do_table
2026/09/25 06:06 android13-5.10-lts 452567d1985b f281d9d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ipt_do_table
2026/09/24 00:30 android13-5.10-lts 452567d1985b abce1216 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in ipt_do_table
2026/10/15 23:57 android13-5.10-lts f5932bf046b5 3f2522c6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: slab-out-of-bounds Read in ipt_do_table
* Struck through repros no longer work on HEAD.