====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.731/6940 is trying to acquire lock: ffff80001c990478 (nfnl_subsys_ipset){+.+.}-{3:3}, at: nfnl_lock+0x50/0x78 net/netfilter/nfnetlink.c:98 but task is already holding lock: ffff0000c305acb8 (&nft_net->commit_mutex){+.+.}-{3:3}, at: nf_tables_valid_genid+0x44/0x120 net/netfilter/nf_tables_api.c:10265 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&nft_net->commit_mutex){+.+.}-{3:3}: __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 nf_tables_dumpreset_obj+0x78/0xa8 net/netfilter/nf_tables_api.c:7544 netlink_dump+0x538/0xaf8 net/netlink/af_netlink.c:2241 __netlink_dump_start+0x478/0x694 net/netlink/af_netlink.c:2343 netlink_dump_start include/linux/netlink.h:269 [inline] nft_netlink_dump_start_rcu+0xec/0x1a8 net/netfilter/nf_tables_api.c:1096 nf_tables_getobj_reset+0x188/0x524 net/netfilter/nf_tables_api.c:7679 nfnetlink_rcv_msg+0x710/0xf88 net/netfilter/nfnetlink.c:290 netlink_rcv_skb+0x220/0x3ec net/netlink/af_netlink.c:2516 nfnetlink_rcv+0x210/0x1c54 net/netfilter/nfnetlink.c:659 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5fc/0x80c net/netlink/af_netlink.c:1344 netlink_sendmsg+0x6f0/0x9d8 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] ____sys_sendmsg+0x588/0x90c net/socket.c:2519 ___sys_sendmsg net/socket.c:2573 [inline] __sys_sendmsg+0x288/0x374 net/socket.c:2602 __do_sys_sendmsg net/socket.c:2611 [inline] __se_sys_sendmsg net/socket.c:2609 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2609 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #1 (nlk_cb_mutex-NETFILTER){+.+.}-{3:3}: __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 __netlink_dump_start+0x104/0x694 net/netlink/af_netlink.c:2310 netlink_dump_start include/linux/netlink.h:269 [inline] ip_set_dump+0x134/0x1bc net/netfilter/ipset/ip_set_core.c:1719 nfnetlink_rcv_msg+0xaac/0xf88 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x220/0x3ec net/netlink/af_netlink.c:2516 nfnetlink_rcv+0x210/0x1c54 net/netfilter/nfnetlink.c:659 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5fc/0x80c net/netlink/af_netlink.c:1344 netlink_sendmsg+0x6f0/0x9d8 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] ____sys_sendmsg+0x588/0x90c net/socket.c:2519 ___sys_sendmsg net/socket.c:2573 [inline] __sys_sendmsg+0x288/0x374 net/socket.c:2602 __do_sys_sendmsg net/socket.c:2611 [inline] __se_sys_sendmsg net/socket.c:2609 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2609 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #0 (nfnl_subsys_ipset){+.+.}-{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+0x27c8/0x6610 kernel/locking/lockdep.c:5049 lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5662 __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 nfnl_lock+0x50/0x78 net/netfilter/nfnetlink.c:98 ip_set_nfnl_get_byindex+0x7c/0x248 net/netfilter/ipset/ip_set_core.c:911 set_match_v1_checkentry+0x74/0x224 net/netfilter/xt_set.c:139 xt_check_match+0x3d8/0xa54 net/netfilter/x_tables.c:534 __nft_match_init+0x50c/0x6dc net/netfilter/nft_compat.c:522 nft_match_init+0x38/0x4c net/netfilter/nft_compat.c:529 nf_tables_newexpr net/netfilter/nf_tables_api.c:3072 [inline] nf_tables_newrule+0x11b8/0x1be4 net/netfilter/nf_tables_api.c:3805 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:519 [inline] nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:639 [inline] nfnetlink_rcv+0xc7c/0x1c54 net/netfilter/nfnetlink.c:657 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5fc/0x80c net/netlink/af_netlink.c:1344 netlink_sendmsg+0x6f0/0x9d8 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] ____sys_sendmsg+0x588/0x90c net/socket.c:2519 ___sys_sendmsg net/socket.c:2573 [inline] __sys_sendmsg+0x288/0x374 net/socket.c:2602 __do_sys_sendmsg net/socket.c:2611 [inline] __se_sys_sendmsg net/socket.c:2609 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2609 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 other info that might help us debug this: Chain exists of: nfnl_subsys_ipset --> nlk_cb_mutex-NETFILTER --> &nft_net->commit_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&nft_net->commit_mutex); lock(nlk_cb_mutex-NETFILTER); lock(&nft_net->commit_mutex); lock(nfnl_subsys_ipset); *** DEADLOCK *** 1 lock held by syz.0.731/6940: #0: ffff0000c305acb8 (&nft_net->commit_mutex){+.+.}-{3:3}, at: nf_tables_valid_genid+0x44/0x120 net/netfilter/nf_tables_api.c:10265 stack backtrace: CPU: 0 PID: 6940 Comm: syz.0.731 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/02/2026 Call trace: dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2048 check_noncircular+0x264/0x2f8 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+0x27c8/0x6610 kernel/locking/lockdep.c:5049 lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5662 __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 nfnl_lock+0x50/0x78 net/netfilter/nfnetlink.c:98 ip_set_nfnl_get_byindex+0x7c/0x248 net/netfilter/ipset/ip_set_core.c:911 set_match_v1_checkentry+0x74/0x224 net/netfilter/xt_set.c:139 xt_check_match+0x3d8/0xa54 net/netfilter/x_tables.c:534 __nft_match_init+0x50c/0x6dc net/netfilter/nft_compat.c:522 nft_match_init+0x38/0x4c net/netfilter/nft_compat.c:529 nf_tables_newexpr net/netfilter/nf_tables_api.c:3072 [inline] nf_tables_newrule+0x11b8/0x1be4 net/netfilter/nf_tables_api.c:3805 nfnetlink_rcv_batch net/netfilter/nfnetlink.c:519 [inline] nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:639 [inline] nfnetlink_rcv+0xc7c/0x1c54 net/netfilter/nfnetlink.c:657 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5fc/0x80c net/netlink/af_netlink.c:1344 netlink_sendmsg+0x6f0/0x9d8 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] ____sys_sendmsg+0x588/0x90c net/socket.c:2519 ___sys_sendmsg net/socket.c:2573 [inline] __sys_sendmsg+0x288/0x374 net/socket.c:2602 __do_sys_sendmsg net/socket.c:2611 [inline] __se_sys_sendmsg net/socket.c:2609 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2609 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 Cannot find set identified by id 0 to match