syzbot


KASAN: use-after-free Read in nf_hook_entry_head

Status: upstream: reported syz repro on 2026/02/19 10:03
Subsystems: netfilter
[Documentation on labels]
Reported-by: syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com
First crash: 47d, last: 18h35m
Cause bisection: failed (error log, bisect log)
  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly netfilter report (Feb 2026) 0 (1) 2026/02/26 12:58
[syzbot] [netfilter?] KASAN: use-after-free Read in nf_hook_entry_head 0 (1) 2026/02/19 10:03
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in nf_hook_entry_head netfilter 19 32 54d 136d 0/29 closed as invalid on 2026/01/09 17:04

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in read_pnet include/net/net_namespace.h:419 [inline]
BUG: KASAN: use-after-free in dev_net include/linux/netdevice.h:2741 [inline]
BUG: KASAN: use-after-free in nf_hook_entry_head+0x1f1/0x2c0 net/netfilter/core.c:319
Read of size 8 at addr ffff888032e14108 by task syz.0.66/6168

CPU: 0 UID: 0 PID: 6168 Comm: syz.0.66 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xba/0x230 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 read_pnet include/net/net_namespace.h:419 [inline]
 dev_net include/linux/netdevice.h:2741 [inline]
 nf_hook_entry_head+0x1f1/0x2c0 net/netfilter/core.c:319
 __nf_unregister_net_hook+0x74/0x6f0 net/netfilter/core.c:491
 nft_unregister_flowtable_ops net/netfilter/nf_tables_api.c:8895 [inline]
 __nft_unregister_flowtable_net_hooks net/netfilter/nf_tables_api.c:8910 [inline]
 __nft_release_hook net/netfilter/nf_tables_api.c:11899 [inline]
 nft_rcv_nl_event+0x7b8/0xdb0 net/netfilter/nf_tables_api.c:12012
 notifier_call_chain+0x1be/0x400 kernel/notifier.c:85
 blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380
 netlink_release+0x123b/0x1ad0 net/netlink/af_netlink.c:761
 __sock_release net/socket.c:662 [inline]
 sock_close+0xc3/0x240 net/socket.c:1455
 __fput+0x44f/0xa70 fs/file_table.c:469
 task_work_run+0x1d9/0x270 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
 exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline]
 do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8089f9c629
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:00007ffc68d13888 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007ffc68d13970 RCX: 00007f8089f9c629
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 0000000000056a96 R08: 0000000000000001 R09: 0000000000000000
R10: 0000001b31720000 R11: 0000000000000246 R12: 00007ffc68d139b0
R13: 00007f808a21609c R14: 0000000000056acc R15: 00007f808a216090
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888032e15800 pfn:0x32e14
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0000474a08 ffff8880b8640c40 0000000000000000
raw: ffff888032e15800 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 0x446dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_COMP), pid 6170, tgid 6168 (syz.0.66), ts 355009530930, free_ts 355060855103
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889
 prep_new_page mm/page_alloc.c:1897 [inline]
 get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250
 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2484
 ___kmalloc_large_node+0x4e/0x150 mm/slub.c:5160
 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:5191
 __do_kmalloc_node mm/slub.c:5207 [inline]
 __kvmalloc_node_noprof+0x7b/0x8a0 mm/slub.c:6711
 alloc_netdev_mqs+0xa6/0x11b0 net/core/dev.c:12017
 tun_set_iff+0x532/0xf00 drivers/net/tun.c:2778
 __tun_chr_ioctl+0x7bb/0x1e10 drivers/net/tun.c:3088
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 6168 tgid 6168 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1433 [inline]
 __free_frozen_pages+0xc2b/0xdb0 mm/page_alloc.c:2978
 device_release+0x9e/0x1d0 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+0x228/0x560 lib/kobject.c:737
 netdev_run_todo+0xc75/0xde0 net/core/dev.c:11718
 tun_detach drivers/net/tun.c:640 [inline]
 tun_chr_close+0x13c/0x1c0 drivers/net/tun.c:3436
 __fput+0x44f/0xa70 fs/file_table.c:469
 task_work_run+0x1d9/0x270 kernel/task_work.c:233
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 __exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
 exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline]
 do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff888032e14000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888032e14080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888032e14100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff888032e14180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888032e14200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (34):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/25 16:22 bpf 8feedae96f87 df2e85d4 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/19 13:42 bpf 1e5c00912695 746545b8 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/25 12:03 bpf-next c89b50cc6b9f 787dfb7c .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/23 03:19 bpf-next 9cd168a2720b 6e7b5511 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/19 09:37 bpf-next 4c51f90d45dc 746545b8 .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/26 13:11 upstream d9d32e5bd5a4 e0f78d93 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: use-after-free Read in nf_hook_entry_head
2026/02/18 20:50 upstream 2961f841b025 77d4d919 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/16 17:40 upstream 0f2acd3148e0 5d52cba5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/15 05:58 upstream ca4ee40bf13d 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/09 16:22 upstream 05f7e89ab973 df949cd9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: use-after-free Read in nf_hook_entry_head
2026/01/17 19:05 upstream d3eeb99bbc99 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 KASAN: use-after-free Read in nf_hook_entry_head
2026/01/10 22:14 upstream b6151c4e60e5 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 KASAN: use-after-free Read in nf_hook_entry_head
2026/02/26 21:13 bpf-next f620af11c27b ffa54287 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/25 20:13 bpf-next f620af11c27b df2e85d4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/25 11:22 bpf-next c89b50cc6b9f 787dfb7c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/22 22:18 bpf-next 9cd168a2720b 6e7b5511 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/20 12:43 bpf-next 9cd168a2720b 17d780d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/19 07:43 bpf-next 4c51f90d45dc 746545b8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/18 04:59 bpf-next 4c51f90d45dc 39751c21 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/16 11:27 net-next 37a93dd5c49b 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/01 05:29 net-next a22f57757f7e 35764559 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: use-after-free Read in nf_hook_entry_head
2026/02/16 04:55 linux-next 635c467cc14e 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: use-after-free Read in nf_hook_entry_head
2026/02/26 01:27 upstream d9d32e5bd5a4 e0f78d93 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/02/25 22:28 upstream d9d32e5bd5a4 df2e85d4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/02/23 09:22 upstream aaf96df9593b 6e7b5511 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/02/20 11:06 upstream 8bf22c33e7a1 17d780d6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/02/14 20:34 upstream 770aaedb461a 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/02/14 01:15 upstream cd7a5651db26 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/02/08 22:39 upstream e98f34af6116 4c131dc4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/01/12 18:24 upstream 0f61b1860cc3 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/01/28 10:38 net e9acda52fd2e 3029c699 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/02/23 06:40 net-next 8bf22c33e7a1 6e7b5511 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/01/26 04:00 net-next eac026ff97a9 55756628 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in nf_hook_entry_head
2026/01/20 04:59 net-next d321d505edb6 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce KASAN: slab-use-after-free Read in nf_hook_entry_head
* Struck through repros no longer work on HEAD.