syzbot


WARNING in __nf_unregister_net_hook (2)

Status: fixed on 2020/09/16 22:51
Subsystems: netfilter
[Documentation on labels]
Reported-by: syzbot+2570f2c036e3da5db176@syzkaller.appspotmail.com
Fix commit: 1e9451cbda45 netfilter: nf_tables: fix nat hook table deletion
First crash: 1382d, last: 1382d
Cause bisection: introduced by (bisect log) :
commit db8ab38880e06dedbfc879e75f5b0ddc495f4eb6
Author: Florian Westphal <fw@strlen.de>
Date: Thu Feb 28 11:02:52 2019 +0000

  netfilter: nf_tables: merge ipv4 and ipv6 nat chain types

Crash: WARNING in __nf_unregister_net_hook (log)
Repro: C syz .config
  
Discussions (8)
Title Replies (including bot) Last reply
[PATCH 4.19 124/323] netfilter: nf_tables: fix nat hook table deletion 1 (1) 2023/08/09 10:39
[PATCH 5.4 179/313] netfilter: nf_tables: fix nat hook table deletion 1 (1) 2023/07/25 10:45
[PATCH -stable,4.19 01/10] netfilter: nf_tables: fix nat hook table deletion 1 (1) 2023/07/05 16:55
[PATCH -stable,5.4 01/10] netfilter: nf_tables: fix nat hook table deletion 1 (1) 2023/07/05 16:54
[PATCH 5.7 000/179] 5.7.11-rc1 review 187 (187) 2020/07/29 08:22
[PATCH 0/2] Netfilter/IPVS fixes for net 4 (4) 2020/07/24 00:22
[PATCH nf] netfilter: nf_tables: fix nat hook table deletion 2 (2) 2020/07/15 18:48
WARNING in __nf_unregister_net_hook (2) 0 (1) 2020/07/14 03:56
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in __nf_unregister_net_hook (4) netfilter C error 66 780d 1110d 20/26 fixed on 2022/03/08 16:11
upstream WARNING in __nf_unregister_net_hook netfilter 1 1462d 1457d 0/26 auto-closed as invalid on 2020/06/22 17:41
upstream WARNING in __nf_unregister_net_hook (6) netfilter C error 2 73d 190d 26/26 fixed on 2024/03/26 17:39
upstream WARNING in __nf_unregister_net_hook (5) netfilter 183 693d 777d 0/26 auto-closed as invalid on 2022/07/31 13:33
upstream WARNING in __nf_unregister_net_hook (3) netfilter 1 1315d 1315d 0/26 auto-closed as invalid on 2020/12/16 11:13

Sample crash report:
------------[ cut here ]------------
hook not found, pf 2 num 0
WARNING: CPU: 0 PID: 6775 at net/netfilter/core.c:413 __nf_unregister_net_hook+0x3e6/0x4a0 net/netfilter/core.c:413
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 6775 Comm: syz-executor554 Not tainted 5.8.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1f0/0x31e lib/dump_stack.c:118
 panic+0x264/0x7a0 kernel/panic.c:231
 __warn+0x227/0x250 kernel/panic.c:600
 report_bug+0x1b1/0x2e0 lib/bug.c:198
 handle_bug+0x42/0x80 arch/x86/kernel/traps.c:235
 exc_invalid_op+0x16/0x40 arch/x86/kernel/traps.c:255
 asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:542
RIP: 0010:__nf_unregister_net_hook+0x3e6/0x4a0 net/netfilter/core.c:413
Code: 49 30 c3 02 01 48 8b 44 24 20 42 8a 04 28 84 c0 0f 85 ad 00 00 00 41 8b 14 24 48 c7 c7 78 ad 08 89 89 de 31 c0 e8 6a 5a a0 fa <0f> 0b e9 04 ff ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 0f 8c 44 fc
RSP: 0018:ffffc90001277718 EFLAGS: 00010246
RAX: 08b629c459c08900 RBX: 0000000000000002 RCX: ffff8880941721c0
RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000282
RBP: ffffffff895b8008 R08: dffffc0000000000 R09: fffffbfff16338a7
R10: fffffbfff16338a7 R11: 0000000000000000 R12: ffff888094f5461c
R13: dffffc0000000000 R14: 0000000000000050 R15: ffffffff895b7040
 nft_unregister_basechain_hooks net/netfilter/nf_tables_api.c:206 [inline]
 nft_table_disable net/netfilter/nf_tables_api.c:835 [inline]
 nf_tables_table_disable net/netfilter/nf_tables_api.c:868 [inline]
 nf_tables_commit+0x32d3/0x4d70 net/netfilter/nf_tables_api.c:7550
 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:486 [inline]
 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:544 [inline]
 nfnetlink_rcv+0x14a5/0x1e50 net/netfilter/nfnetlink.c:562
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0x786/0x940 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0xa57/0xd70 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 ____sys_sendmsg+0x519/0x800 net/socket.c:2352
 ___sys_sendmsg net/socket.c:2406 [inline]
 __sys_sendmsg+0x2b1/0x360 net/socket.c:2439
 do_syscall_64+0x73/0xe0 arch/x86/entry/common.c:384
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x440709
Code: Bad RIP value.
RSP: 002b:00007fff97b1aa78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440709
RDX: 0000000000000000 RSI: 000000002000c2c0 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000003 R11: 0000000000000246 R12: 0000000000401f10
R13: 0000000000401fa0 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/12 14:06 upstream 0aea6d5c5be3 115e1930 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/07/12 11:25 upstream 0aea6d5c5be3 115e1930 .config console log report syz C ci-upstream-kasan-gce-root
2020/07/12 11:00 upstream 0aea6d5c5be3 115e1930 .config console log report syz C ci-upstream-kasan-gce
2020/07/12 10:50 upstream 0aea6d5c5be3 115e1930 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/07/12 12:58 upstream 0aea6d5c5be3 115e1930 .config console log report syz C ci-upstream-kasan-gce-386
2020/07/12 11:33 net-old 1df0d8960499 115e1930 .config console log report syz C ci-upstream-net-this-kasan-gce
2020/07/12 10:08 net-next-old 71930d61025e 115e1930 .config console log report syz C ci-upstream-net-kasan-gce
2020/07/12 17:10 linux-next d31958b30ea3 115e1930 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/07/12 09:57 net-next-old 71930d61025e 115e1930 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.