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: 14d, last: 5d10h
▶ ▼ Similar bugs (11)
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 2435d 2435d 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 262d 311d 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 1 7d03h 7d03h 0/2 premoderation: reported on 2026/10/01 15:11
android-5-15 KASAN: use-after-free Read in ipt_do_table 19 1 356d 356d 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 120d 131d 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 1481d 1630d 0/29 closed as invalid on 2022/11/17 17:58
android-5-10 KASAN: use-after-free Read in ipt_do_table (2) 19 3 146d 163d 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 347d 347d 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 1906d 1902d 0/29 auto-closed as invalid on 2021/10/17 23:06
linux-4.19 general protection fault in ipt_do_table 2 1 2014d 2014d 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 339d 339d 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 ffff8881073f4000 by task syz.4.350/1434

CPU: 1 PID: 1434 Comm: syz.4.350 Tainted: G        W         syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/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:1598
 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:0x7f2250b58159
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:00007f224f5b1028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f2250ddffa0 RCX: 00007f2250b58159
RDX: 000000000800001d RSI: 0000200000007fc0 RDI: 0000000000000005
RBP: 00007f2250bef06b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000300 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f2250de0038 R14: 00007f2250ddffa0 R15: 00007ffc7f823078

The buggy address belongs to the page:
page:ffffea00041cfd00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1073f4
flags: 0x4000000000000000()
raw: 4000000000000000 ffffea00041cfd48 ffffea0004c62ec8 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x102a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_HARDWALL), pid 281, ts 71911083758, free_ts 71911086184
 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_pages include/linux/gfp.h:544 [inline]
 __alloc_pages_node include/linux/gfp.h:557 [inline]
 alloc_pages_node include/linux/gfp.h:571 [inline]
 alloc_pages include/linux/gfp.h:590 [inline]
 __stack_depot_save+0x3bf/0x4c0 lib/stackdepot.c:327
 kasan_save_stack mm/kasan/common.c:39 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:430 [inline]
 __kasan_slab_alloc+0xc9/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
 radix_tree_node_alloc+0x18e/0x380 lib/radix-tree.c:251
 __radix_tree_create lib/radix-tree.c:622 [inline]
 radix_tree_insert+0x1cc/0x5e0 lib/radix-tree.c:710
 ioc_create_icq+0x1b6/0x4d0 block/blk-ioc.c:398
 blk_mq_sched_assign_ioc+0xb4/0x120 block/blk-mq-sched.c:39
 blk_mq_rq_ctx_init+0x790/0xae0 block/blk-mq.c:341
 __blk_mq_alloc_request+0x47e/0x4f0 block/blk-mq.c:403
 blk_mq_submit_bio+0x388/0x1820 block/blk-mq.c:2249
 __submit_bio_noacct_mq block/blk-core.c:1020 [inline]
 submit_bio_noacct+0xb6e/0xe50 block/blk-core.c:1053
 submit_bio+0x342/0x710 block/blk-core.c:1123
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_pages_ok+0x80b/0x830 mm/page_alloc.c:1629
 free_the_page mm/page_alloc.c:5445 [inline]
 __free_pages+0xd8/0x390 mm/page_alloc.c:5454
 free_pages+0x82/0x90 mm/page_alloc.c:5465
 __stack_depot_save+0x492/0x4c0 lib/stackdepot.c:359
 kasan_save_stack mm/kasan/common.c:39 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:430 [inline]
 __kasan_slab_alloc+0xc9/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
 radix_tree_node_alloc+0x18e/0x380 lib/radix-tree.c:251
 __radix_tree_create lib/radix-tree.c:622 [inline]
 radix_tree_insert+0x1cc/0x5e0 lib/radix-tree.c:710
 ioc_create_icq+0x1b6/0x4d0 block/blk-ioc.c:398
 blk_mq_sched_assign_ioc+0xb4/0x120 block/blk-mq-sched.c:39
 blk_mq_rq_ctx_init+0x790/0xae0 block/blk-mq.c:341
 __blk_mq_alloc_request+0x47e/0x4f0 block/blk-mq.c:403
 blk_mq_submit_bio+0x388/0x1820 block/blk-mq.c:2249
 __submit_bio_noacct_mq block/blk-core.c:1020 [inline]
 submit_bio_noacct+0xb6e/0xe50 block/blk-core.c:1053
 submit_bio+0x342/0x710 block/blk-core.c:1123

Memory state around the buggy address:
 ffff8881073f3f00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
 ffff8881073f3f80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe
>ffff8881073f4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff8881073f4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881073f4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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
* Struck through repros no longer work on HEAD.