syzbot


possible deadlock in nf_tables_dumpreset_obj

Status: upstream: reported on 2026/03/26 12:38
Reported-by: syzbot+be79ab22539c49b24f15@syzkaller.appspotmail.com
First crash: 55d, last: 10d
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.6 possible deadlock in nf_tables_dumpreset_obj 4 7 4d12h 54d 0/2 upstream: reported on 2026/03/27 14:23
upstream possible deadlock in nf_tables_dumpreset_obj netfilter 4 1 155d 151d 29/29 fixed on 2026/05/06 16:40

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.9.2731/15462 is trying to acquire lock:
ffff8880640da0b8 (&nft_net->commit_mutex){+.+.}-{3:3}, at: nf_tables_dumpreset_obj+0x6e/0x90 net/netfilter/nf_tables_api.c:7511

but task is already holding lock:
ffff888072ab3698 (nlk_cb_mutex-NETFILTER){+.+.}-{3:3}, at: __netlink_dump_start+0x11f/0x6f0 net/netlink/af_netlink.c:2305

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+0x12d/0xaf0 kernel/locking/mutex.c:747
       __netlink_dump_start+0x11f/0x6f0 net/netlink/af_netlink.c:2305
       netlink_dump_start include/linux/netlink.h:269 [inline]
       ip_set_dump+0x152/0x1e0 net/netfilter/ipset/ip_set_core.c:1719
       nfnetlink_rcv_msg+0xbec/0x12b0 net/netfilter/nfnetlink.c:302
       netlink_rcv_skb+0x1fb/0x450 net/netlink/af_netlink.c:2511
       nfnetlink_rcv+0x2b0/0x2480 net/netfilter/nfnetlink.c:659
       netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
       netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344
       netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1872
       sock_sendmsg_nosec net/socket.c:718 [inline]
       __sock_sendmsg net/socket.c:730 [inline]
       ____sys_sendmsg+0x5be/0x970 net/socket.c:2518
       ___sys_sendmsg+0x2a2/0x360 net/socket.c:2572
       __sys_sendmsg net/socket.c:2601 [inline]
       __do_sys_sendmsg net/socket.c:2610 [inline]
       __se_sys_sendmsg+0x1bb/0x2a0 net/socket.c:2608
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x4c/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+0x12d/0xaf0 kernel/locking/mutex.c:747
       ip_set_nfnl_get_byindex+0x63/0x230 net/netfilter/ipset/ip_set_core.c:911
       set_match_v1_checkentry+0x6d/0x220 net/netfilter/xt_set.c:139
       xt_check_match+0x4e6/0xc50 net/netfilter/x_tables.c:534
       __nft_match_init+0x663/0x890 net/netfilter/nft_compat.c:522
       nf_tables_newexpr net/netfilter/nf_tables_api.c:3065 [inline]
       nf_tables_newrule+0x1731/0x2810 net/netfilter/nf_tables_api.c:3792
       nfnetlink_rcv_batch net/netfilter/nfnetlink.c:519 [inline]
       nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:639 [inline]
       nfnetlink_rcv+0x1124/0x2480 net/netfilter/nfnetlink.c:657
       netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
       netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344
       netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1872
       sock_sendmsg_nosec net/socket.c:718 [inline]
       __sock_sendmsg net/socket.c:730 [inline]
       ____sys_sendmsg+0x5be/0x970 net/socket.c:2518
       ___sys_sendmsg+0x2a2/0x360 net/socket.c:2572
       __sys_sendmsg net/socket.c:2601 [inline]
       __do_sys_sendmsg net/socket.c:2610 [inline]
       __se_sys_sendmsg+0x1bb/0x2a0 net/socket.c:2608
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x4c/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:3090 [inline]
       check_prevs_add kernel/locking/lockdep.c:3209 [inline]
       validate_chain kernel/locking/lockdep.c:3825 [inline]
       __lock_acquire+0x2d07/0x7d10 kernel/locking/lockdep.c:5049
       lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5662
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x12d/0xaf0 kernel/locking/mutex.c:747
       nf_tables_dumpreset_obj+0x6e/0x90 net/netfilter/nf_tables_api.c:7511
       netlink_dump+0x6a3/0xd00 net/netlink/af_netlink.c:2236
       __netlink_dump_start+0x537/0x6f0 net/netlink/af_netlink.c:2338
       netlink_dump_start include/linux/netlink.h:269 [inline]
       nft_netlink_dump_start_rcu+0xdb/0x1a0 net/netfilter/nf_tables_api.c:1089
       nf_tables_getobj_reset+0x1cb/0x610 net/netfilter/nf_tables_api.c:7646
       nfnetlink_rcv_msg+0x8a0/0x12b0 net/netfilter/nfnetlink.c:290
       netlink_rcv_skb+0x1fb/0x450 net/netlink/af_netlink.c:2511
       nfnetlink_rcv+0x2b0/0x2480 net/netfilter/nfnetlink.c:659
       netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
       netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344
       netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1872
       sock_sendmsg_nosec net/socket.c:718 [inline]
       __sock_sendmsg net/socket.c:730 [inline]
       ____sys_sendmsg+0x5be/0x970 net/socket.c:2518
       ___sys_sendmsg+0x2a2/0x360 net/socket.c:2572
       __sys_sendmsg net/socket.c:2601 [inline]
       __do_sys_sendmsg net/socket.c:2610 [inline]
       __se_sys_sendmsg+0x1bb/0x2a0 net/socket.c:2608
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x4c/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.9.2731/15462:
 #0: ffff888072ab3698 (nlk_cb_mutex-NETFILTER){+.+.}-{3:3}, at: __netlink_dump_start+0x11f/0x6f0 net/netlink/af_netlink.c:2305

stack backtrace:
CPU: 0 PID: 15462 Comm: syz.9.2731 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2170
 check_prev_add kernel/locking/lockdep.c:3090 [inline]
 check_prevs_add kernel/locking/lockdep.c:3209 [inline]
 validate_chain kernel/locking/lockdep.c:3825 [inline]
 __lock_acquire+0x2d07/0x7d10 kernel/locking/lockdep.c:5049
 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5662
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x12d/0xaf0 kernel/locking/mutex.c:747
 nf_tables_dumpreset_obj+0x6e/0x90 net/netfilter/nf_tables_api.c:7511
 netlink_dump+0x6a3/0xd00 net/netlink/af_netlink.c:2236
 __netlink_dump_start+0x537/0x6f0 net/netlink/af_netlink.c:2338
 netlink_dump_start include/linux/netlink.h:269 [inline]
 nft_netlink_dump_start_rcu+0xdb/0x1a0 net/netfilter/nf_tables_api.c:1089
 nf_tables_getobj_reset+0x1cb/0x610 net/netfilter/nf_tables_api.c:7646
 nfnetlink_rcv_msg+0x8a0/0x12b0 net/netfilter/nfnetlink.c:290
 netlink_rcv_skb+0x1fb/0x450 net/netlink/af_netlink.c:2511
 nfnetlink_rcv+0x2b0/0x2480 net/netfilter/nfnetlink.c:659
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1872
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 ____sys_sendmsg+0x5be/0x970 net/socket.c:2518
 ___sys_sendmsg+0x2a2/0x360 net/socket.c:2572
 __sys_sendmsg net/socket.c:2601 [inline]
 __do_sys_sendmsg net/socket.c:2610 [inline]
 __se_sys_sendmsg+0x1bb/0x2a0 net/socket.c:2608
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f1e23d9cdd9
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:00007f1e24c7e028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f1e24016090 RCX: 00007f1e23d9cdd9
RDX: 000000002404000a RSI: 0000200000000180 RDI: 0000000000000003
RBP: 00007f1e23e32d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1e24016128 R14: 00007f1e24016090 R15: 00007fff932d5828
 </TASK>

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/10 15:27 linux-6.1.y ad16b162f21d 29233ece .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in nf_tables_dumpreset_obj
2026/04/24 07:32 linux-6.1.y 7c87defbd336 9cfb3ca7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in nf_tables_dumpreset_obj
2026/03/28 14:32 linux-6.1.y 1989cd3d56e2 b5ceaad2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in nf_tables_dumpreset_obj
2026/03/26 12:37 linux-6.1.y 1989cd3d56e2 766b6434 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in nf_tables_dumpreset_obj
2026/03/26 12:37 linux-6.1.y 1989cd3d56e2 766b6434 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in nf_tables_dumpreset_obj
2026/05/10 23:31 linux-6.1.y 128a674368bf 29233ece .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in nf_tables_dumpreset_obj
2026/05/09 09:08 linux-6.1.y 128a674368bf 29233ece .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in nf_tables_dumpreset_obj
* Struck through repros no longer work on HEAD.