syzbot


possible deadlock in nf_tables_dumpreset_obj

Status: upstream: reported on 2026/03/27 14:23
Reported-by: syzbot+1fe896d404af69a0fd7d@syzkaller.appspotmail.com
First crash: 1d17h, last: 1d17h
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in nf_tables_dumpreset_obj 4 3 17h05m 2d18h 0/3 upstream: reported on 2026/03/26 12:38
upstream possible deadlock in nf_tables_dumpreset_obj netfilter 4 1 103d 99d 28/29 upstream: reported on 2025/12/20 00:58

Sample crash report:
netlink: 4 bytes leftover after parsing attributes in process `syz.0.4429'.
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.4429/19074 is trying to acquire lock:
ffff888050e096b8 (&nft_net->commit_mutex){+.+.}-{3:3}, at: nf_tables_dumpreset_obj+0x72/0xa0 net/netfilter/nf_tables_api.c:7994

but task is already holding lock:
ffff888057790690 (nlk_cb_mutex-NETFILTER){+.+.}-{3:3}, at: __netlink_dump_start+0xf4/0x810 net/netlink/af_netlink.c:2336

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (nlk_cb_mutex-NETFILTER){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747
       __netlink_dump_start+0xf4/0x810 net/netlink/af_netlink.c:2336
       netlink_dump_start include/linux/netlink.h:338 [inline]
       ip_set_dump+0x15c/0x1f0 net/netfilter/ipset/ip_set_core.c:1717
       nfnetlink_rcv_msg+0xbf0/0x12b0 net/netfilter/nfnetlink.c:302
       netlink_rcv_skb+0x241/0x4d0 net/netlink/af_netlink.c:2545
       nfnetlink_rcv+0x2c9/0x24a0 net/netfilter/nfnetlink.c:659
       netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
       netlink_unicast+0x751/0x8d0 net/netlink/af_netlink.c:1346
       netlink_sendmsg+0x8d0/0xbf0 net/netlink/af_netlink.c:1894
       sock_sendmsg_nosec net/socket.c:730 [inline]
       __sock_sendmsg net/socket.c:745 [inline]
       ____sys_sendmsg+0x5ba/0x960 net/socket.c:2594
       ___sys_sendmsg+0x2a6/0x360 net/socket.c:2648
       __sys_sendmsg net/socket.c:2677 [inline]
       __do_sys_sendmsg net/socket.c:2686 [inline]
       __se_sys_sendmsg+0x1c2/0x2b0 net/socket.c:2684
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #1 (nfnl_subsys_ipset){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747
       ip_set_nfnl_get_byindex+0x67/0x230 net/netfilter/ipset/ip_set_core.c:909
       set_match_v1_checkentry+0x71/0x230 net/netfilter/xt_set.c:139
       xt_check_match+0x429/0xaf0 net/netfilter/x_tables.c:523
       __nft_match_init+0x67a/0x8d0 net/netfilter/nft_compat.c:522
       nf_tables_newexpr net/netfilter/nf_tables_api.c:3307 [inline]
       nf_tables_newrule+0x176c/0x2880 net/netfilter/nf_tables_api.c:4140
       nfnetlink_rcv_batch net/netfilter/nfnetlink.c:519 [inline]
       nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:639 [inline]
       nfnetlink_rcv+0x113e/0x24a0 net/netfilter/nfnetlink.c:657
       netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
       netlink_unicast+0x751/0x8d0 net/netlink/af_netlink.c:1346
       netlink_sendmsg+0x8d0/0xbf0 net/netlink/af_netlink.c:1894
       sock_sendmsg_nosec net/socket.c:730 [inline]
       __sock_sendmsg net/socket.c:745 [inline]
       ____sys_sendmsg+0x5ba/0x960 net/socket.c:2594
       ___sys_sendmsg+0x2a6/0x360 net/socket.c:2648
       __sys_sendmsg net/socket.c:2677 [inline]
       __do_sys_sendmsg net/socket.c:2686 [inline]
       __se_sys_sendmsg+0x1c2/0x2b0 net/socket.c:2684
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (&nft_net->commit_mutex){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3869 [inline]
       __lock_acquire+0x2df1/0x7d40 kernel/locking/lockdep.c:5137
       lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747
       nf_tables_dumpreset_obj+0x72/0xa0 net/netfilter/nf_tables_api.c:7994
       netlink_dump+0x747/0xe50 net/netlink/af_netlink.c:2264
       __netlink_dump_start+0x5f1/0x810 net/netlink/af_netlink.c:2372
       netlink_dump_start include/linux/netlink.h:338 [inline]
       nft_netlink_dump_start_rcu+0xdb/0x1a0 net/netfilter/nf_tables_api.c:1124
       nf_tables_getobj_reset+0x1e1/0x630 net/netfilter/nf_tables_api.c:8129
       nfnetlink_rcv_msg+0x8a4/0x12b0 net/netfilter/nfnetlink.c:290
       netlink_rcv_skb+0x241/0x4d0 net/netlink/af_netlink.c:2545
       nfnetlink_rcv+0x2c9/0x24a0 net/netfilter/nfnetlink.c:659
       netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
       netlink_unicast+0x751/0x8d0 net/netlink/af_netlink.c:1346
       netlink_sendmsg+0x8d0/0xbf0 net/netlink/af_netlink.c:1894
       sock_sendmsg_nosec net/socket.c:730 [inline]
       __sock_sendmsg net/socket.c:745 [inline]
       ____sys_sendmsg+0x5ba/0x960 net/socket.c:2594
       ___sys_sendmsg+0x2a6/0x360 net/socket.c:2648
       __sys_sendmsg net/socket.c:2677 [inline]
       __do_sys_sendmsg net/socket.c:2686 [inline]
       __se_sys_sendmsg+0x1c2/0x2b0 net/socket.c:2684
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

Chain exists of:
  &nft_net->commit_mutex --> nfnl_subsys_ipset --> nlk_cb_mutex-NETFILTER

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(nlk_cb_mutex-NETFILTER);
                               lock(nfnl_subsys_ipset);
                               lock(nlk_cb_mutex-NETFILTER);
  lock(&nft_net->commit_mutex);

 *** DEADLOCK ***

1 lock held by syz.0.4429/19074:
 #0: ffff888057790690 (nlk_cb_mutex-NETFILTER){+.+.}-{3:3}, at: __netlink_dump_start+0xf4/0x810 net/netlink/af_netlink.c:2336

stack backtrace:
CPU: 1 PID: 19074 Comm: syz.0.4429 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3869 [inline]
 __lock_acquire+0x2df1/0x7d40 kernel/locking/lockdep.c:5137
 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747
 nf_tables_dumpreset_obj+0x72/0xa0 net/netfilter/nf_tables_api.c:7994
 netlink_dump+0x747/0xe50 net/netlink/af_netlink.c:2264
 __netlink_dump_start+0x5f1/0x810 net/netlink/af_netlink.c:2372
 netlink_dump_start include/linux/netlink.h:338 [inline]
 nft_netlink_dump_start_rcu+0xdb/0x1a0 net/netfilter/nf_tables_api.c:1124
 nf_tables_getobj_reset+0x1e1/0x630 net/netfilter/nf_tables_api.c:8129
 nfnetlink_rcv_msg+0x8a4/0x12b0 net/netfilter/nfnetlink.c:290
 netlink_rcv_skb+0x241/0x4d0 net/netlink/af_netlink.c:2545
 nfnetlink_rcv+0x2c9/0x24a0 net/netfilter/nfnetlink.c:659
 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
 netlink_unicast+0x751/0x8d0 net/netlink/af_netlink.c:1346
 netlink_sendmsg+0x8d0/0xbf0 net/netlink/af_netlink.c:1894
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 ____sys_sendmsg+0x5ba/0x960 net/socket.c:2594
 ___sys_sendmsg+0x2a6/0x360 net/socket.c:2648
 __sys_sendmsg net/socket.c:2677 [inline]
 __do_sys_sendmsg net/socket.c:2686 [inline]
 __se_sys_sendmsg+0x1c2/0x2b0 net/socket.c:2684
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fca2bb9c799
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:00007fca2ca13028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fca2be15fa0 RCX: 00007fca2bb9c799
RDX: 0000000024040808 RSI: 0000200000000180 RDI: 0000000000000003
RBP: 00007fca2bc32c99 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fca2be16038 R14: 00007fca2be15fa0 R15: 00007ffd39cc5b38
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/27 14:22 linux-6.6.y c09fbcd31ae6 74a13a23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan possible deadlock in nf_tables_dumpreset_obj
* Struck through repros no longer work on HEAD.