Hello,
syzbot found the following issue on:
HEAD commit: f2ddafa93a25 Linux 6.1.166
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=126e0b52580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=b1adc0bfde2d8a4a
dashboard link:
https://syzkaller.appspot.com/bug?extid=b99e2080b1a0b7d2cc99
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/28fc2cbac5cf/disk-f2ddafa9.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/b17a5a214fbc/vmlinux-f2ddafa9.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/c2564b1203e5/Image-f2ddafa9.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+b99e20...@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.1.2335/12232 is trying to acquire lock:
ffff0000e0312698 (nlk_cb_mutex-NETFILTER){+.+.}-{3:3}, at: __netlink_dump_start+0x104/0x698 net/netlink/af_netlink.c:2305
but task is already holding lock:
ffff80001c86b0b8 (nfnl_subsys_ipset){+.+.}-{3:3}, at: nfnl_lock net/netfilter/nfnetlink.c:98 [inline]
ffff80001c86b0b8 (nfnl_subsys_ipset){+.+.}-{3:3}, at: nfnetlink_rcv_msg+0x880/0xfac net/netfilter/nfnetlink.c:295
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (nfnl_subsys_ipset){+.+.}-{3:3}:
__mutex_lock_common+0x190/0x1f60 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/0x258 net/netfilter/ipset/ip_set_core.c:911
set_match_v1_checkentry+0x70/0x228 net/netfilter/xt_set.c:139
xt_check_match+0x36c/0x948 net/netfilter/x_tables.c:523
__nft_match_init+0x508/0x6d8 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:3065 [inline]
nf_tables_newrule+0x1174/0x1b70 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+0xc7c/0x1bfc net/netfilter/nfnetlink.c:657
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x60c/0x814 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x6f4/0x9c0 net/netlink/af_netlink.c:1872
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
____sys_sendmsg+0x5c8/0x938 net/socket.c:2518
___sys_sendmsg net/socket.c:2572 [inline]
__sys_sendmsg+0x288/0x374 net/socket.c:2601
__do_sys_sendmsg net/socket.c:2610 [inline]
__se_sys_sendmsg net/socket.c:2608 [inline]
__arm64_sys_sendmsg+0x80/0x94 net/socket.c:2608
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x130 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 (&nft_net->commit_mutex){+.+.}-{3:3}:
__mutex_lock_common+0x190/0x1f60 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:7511
netlink_dump+0x570/0xb18 net/netlink/af_netlink.c:2236
__netlink_dump_start+0x47c/0x698 net/netlink/af_netlink.c:2338
netlink_dump_start include/linux/netlink.h:269 [inline]
nft_netlink_dump_start_rcu+0xec/0x1a8 net/netfilter/nf_tables_api.c:1089
nf_tables_getobj_reset+0x188/0x534 net/netfilter/nf_tables_api.c:7646
nfnetlink_rcv_msg+0x6d4/0xfac net/netfilter/nfnetlink.c:290
netlink_rcv_skb+0x218/0x3e8 net/netlink/af_netlink.c:2511
nfnetlink_rcv+0x214/0x1bfc net/netfilter/nfnetlink.c:659
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x60c/0x814 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x6f4/0x9c0 net/netlink/af_netlink.c:1872
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
____sys_sendmsg+0x5c8/0x938 net/socket.c:2518
___sys_sendmsg net/socket.c:2572 [inline]
__sys_sendmsg+0x288/0x374 net/socket.c:2601
__do_sys_sendmsg net/socket.c:2610 [inline]
__se_sys_sendmsg net/socket.c:2608 [inline]
__arm64_sys_sendmsg+0x80/0x94 net/socket.c:2608
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x130 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 (nlk_cb_mutex-NETFILTER){+.+.}-{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+0x2880/0x6800 kernel/locking/lockdep.c:5049
lock_acquire+0x20c/0x63c kernel/locking/lockdep.c:5662
__mutex_lock_common+0x190/0x1f60 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/0x698 net/netlink/af_netlink.c:2305
netlink_dump_start include/linux/netlink.h:269 [inline]
ip_set_dump+0x130/0x1b8 net/netfilter/ipset/ip_set_core.c:1719
nfnetlink_rcv_msg+0xad0/0xfac net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x218/0x3e8 net/netlink/af_netlink.c:2511
nfnetlink_rcv+0x214/0x1bfc net/netfilter/nfnetlink.c:659
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x60c/0x814 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x6f4/0x9c0 net/netlink/af_netlink.c:1872
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
____sys_sendmsg+0x5c8/0x938 net/socket.c:2518
___sys_sendmsg net/socket.c:2572 [inline]
__sys_sendmsg+0x288/0x374 net/socket.c:2601
__do_sys_sendmsg net/socket.c:2610 [inline]
__se_sys_sendmsg net/socket.c:2608 [inline]
__arm64_sys_sendmsg+0x80/0x94 net/socket.c:2608
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x130 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:
nlk_cb_mutex-NETFILTER --> &nft_net->commit_mutex --> nfnl_subsys_ipset
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(nfnl_subsys_ipset);
lock(&nft_net->commit_mutex);
lock(nfnl_subsys_ipset);
lock(nlk_cb_mutex-NETFILTER);
*** DEADLOCK ***
1 lock held by syz.1.2335/12232:
#0: ffff80001c86b0b8 (nfnl_subsys_ipset){+.+.}-{3:3}, at: nfnl_lock net/netfilter/nfnetlink.c:98 [inline]
#0: ffff80001c86b0b8 (nfnl_subsys_ipset){+.+.}-{3:3}, at: nfnetlink_rcv_msg+0x880/0xfac net/netfilter/nfnetlink.c:295
stack backtrace:
CPU: 1 PID: 12232 Comm: syz.1.2335 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/26/2026
Call trace:
dump_backtrace+0x1c0/0x1ec 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+0x2880/0x6800 kernel/locking/lockdep.c:5049
lock_acquire+0x20c/0x63c kernel/locking/lockdep.c:5662
__mutex_lock_common+0x190/0x1f60 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/0x698 net/netlink/af_netlink.c:2305
netlink_dump_start include/linux/netlink.h:269 [inline]
ip_set_dump+0x130/0x1b8 net/netfilter/ipset/ip_set_core.c:1719
nfnetlink_rcv_msg+0xad0/0xfac net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x218/0x3e8 net/netlink/af_netlink.c:2511
nfnetlink_rcv+0x214/0x1bfc net/netfilter/nfnetlink.c:659
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x60c/0x814 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x6f4/0x9c0 net/netlink/af_netlink.c:1872
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
____sys_sendmsg+0x5c8/0x938 net/socket.c:2518
___sys_sendmsg net/socket.c:2572 [inline]
__sys_sendmsg+0x288/0x374 net/socket.c:2601
__do_sys_sendmsg net/socket.c:2610 [inline]
__se_sys_sendmsg net/socket.c:2608 [inline]
__arm64_sys_sendmsg+0x80/0x94 net/socket.c:2608
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x130 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
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup