syzbot


WARNING in __nf_unregister_net_hook (8)

Status: upstream: reported on 2025/03/31 16:26
Subsystems: netfilter
[Documentation on labels]
Reported-by: syzbot+53ed3a6440173ddbf499@syzkaller.appspotmail.com
Fix commit: 688c15017d5c netfilter: nf_tables: don't unregister hook when table is dormant
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu-native-arm64-kvm ci-qemu2-arm32 ci-qemu2-riscv64]
First crash: 23d, last: 11d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH net 2/3] netfilter: nf_tables: don't unregister hook when table is dormant 1 (1) 2025/04/03 11:57
[PATCH nf,v2] netfilter: nf_tables: don't unregister hook when table is dormant 1 (1) 2025/04/02 11:34
[PATCH nf] netfilter: nf_tables: don't unregister hook when table is dormant 3 (3) 2025/04/02 10:49
[syzbot] [netfilter?] WARNING in __nf_unregister_net_hook (8) 0 (1) 2025/03/31 16:26
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in __nf_unregister_net_hook (4) netfilter C error 66 1144d 1474d 20/28 fixed on 2022/03/08 16:11
upstream WARNING in __nf_unregister_net_hook netfilter 1 1826d 1822d 0/28 auto-closed as invalid on 2020/06/22 17:41
upstream WARNING in __nf_unregister_net_hook (6) netfilter C error 2 437d 554d 25/28 fixed on 2024/03/26 17:39
upstream WARNING in __nf_unregister_net_hook (7) netfilter 2 196d 196d 0/28 auto-obsoleted due to no activity on 2025/01/17 09:21
upstream WARNING in __nf_unregister_net_hook (5) netfilter 183 1057d 1141d 0/28 auto-closed as invalid on 2022/07/31 13:33
upstream WARNING in __nf_unregister_net_hook (2) netfilter C done 9 1746d 1745d 15/28 fixed on 2020/09/16 22:51
upstream WARNING in __nf_unregister_net_hook (3) netfilter 1 1679d 1679d 0/28 auto-closed as invalid on 2020/12/16 11:13

Sample crash report:
RDX: 0000000000000000 RSI: 0000200000000080 RDI: 0000000000000003
RBP: 00007fa126d94090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007fa1261a5fa0 R15: 00007fa1262cfa28
 </TASK>
------------[ cut here ]------------
WARNING: CPU: 0 PID: 10727 at net/netfilter/core.c:501 __nf_unregister_net_hook+0x683/0x810 net/netfilter/core.c:501
Modules linked in:
CPU: 0 UID: 0 PID: 10727 Comm: syz.4.1505 Not tainted 6.14.0-syzkaller-10892-g4e82c87058f4 #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:__nf_unregister_net_hook+0x683/0x810 net/netfilter/core.c:501
Code: 41 5d 41 5e 41 5f 5d e9 cb f8 74 f7 e8 06 9d 8f f7 48 83 c4 38 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc e8 ee 9c 8f f7 90 <0f> 0b 90 48 c7 c7 60 16 16 90 48 83 c4 38 5b 41 5c 41 5d 41 5e 41
RSP: 0018:ffffc900038cee10 EFLAGS: 00010293
RAX: ffffffff8a33e022 RBX: 0000000000000000 RCX: ffff88802b90bc00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff8a33da61 R09: 1ffffffff20be9ce
R10: dffffc0000000000 R11: fffffbfff20be9cf R12: ffff888035670000
R13: ffff8880333ce480 R14: dffffc0000000000 R15: ffff8880573fa710
FS:  00007fa126d946c0(0000) GS:ffff888124fb1000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000f20030 CR3: 00000000511d4000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 nf_tables_updchain+0x108e/0x1e00 net/netfilter/nf_tables_api.c:2917
 nf_tables_newchain+0x10f6/0x3390 net/netfilter/nf_tables_api.c:3039
 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:524 [inline]
 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:647 [inline]
 nfnetlink_rcv+0x12eb/0x28f0 net/netfilter/nfnetlink.c:665
 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline]
 netlink_unicast+0x7f8/0x9a0 net/netlink/af_netlink.c:1339
 netlink_sendmsg+0x8c3/0xcd0 net/netlink/af_netlink.c:1883
 sock_sendmsg_nosec net/socket.c:712 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:727
 ____sys_sendmsg+0x523/0x860 net/socket.c:2566
 ___sys_sendmsg net/socket.c:2620 [inline]
 __sys_sendmsg+0x271/0x360 net/socket.c:2652
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa125f8d169
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:00007fa126d94038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fa1261a5fa0 RCX: 00007fa125f8d169
RDX: 0000000000000000 RSI: 0000200000000080 RDI: 0000000000000003
RBP: 00007fa126d94090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007fa1261a5fa0 R15: 00007fa1262cfa28
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/31 16:10 upstream 4e82c87058f4 d3999433 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in __nf_unregister_net_hook
2025/04/12 13:40 net-next faeefc173be4 0bd6db41 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING in __nf_unregister_net_hook
* Struck through repros no longer work on HEAD.