syzbot


possible deadlock in nr_del_node

Status: upstream: reported C repro on 2025/05/02 21:19
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+66b03f76f8433672c99b@syzkaller.appspotmail.com
First crash: 123d, last: 25d
Bug presence (1)
Date Name Commit Repro Result
2025/07/27 upstream (ToT) ec2df4364666 C [report] possible deadlock in nr_rt_device_down
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in nr_del_node 4 2 214d 245d 0/3 auto-obsoleted due to no activity on 2025/05/12 01:18
linux-6.1 possible deadlock in nr_del_node (2) 4 1 40d 40d 0/3 upstream: reported on 2025/07/25 10:33
linux-6.6 possible deadlock in nr_del_node 4 1 39d 39d 0/2 upstream: reported on 2025/07/25 18:54
Last patch testing requests (1)
Created Duration User Patch Repo Result
2025/08/09 13:29 12m retest repro linux-5.15.y report log

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
5.15.189-syzkaller #0 Not tainted
------------------------------------------------------
syz.1.759/5160 is trying to acquire lock:
ffffffff8d36d418 (nr_neigh_list_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline]
ffffffff8d36d418 (nr_neigh_list_lock){+...}-{2:2}, at: nr_remove_neigh net/netrom/nr_route.c:307 [inline]
ffffffff8d36d418 (nr_neigh_list_lock){+...}-{2:2}, at: nr_del_node+0x512/0x8d0 net/netrom/nr_route.c:342

but task is already holding lock:
ffff888024445870 (&nr_node->node_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline]
ffff888024445870 (&nr_node->node_lock){+...}-{2:2}, at: nr_node_lock include/net/netrom.h:151 [inline]
ffff888024445870 (&nr_node->node_lock){+...}-{2:2}, at: nr_del_node+0x152/0x8d0 net/netrom/nr_route.c:335

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&nr_node->node_lock){+...}-{2:2}:
       __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
       _raw_spin_lock_bh+0x32/0x50 kernel/locking/spinlock.c:178
       spin_lock_bh include/linux/spinlock.h:368 [inline]
       nr_node_lock include/net/netrom.h:151 [inline]
       nr_rt_device_down+0x126/0x710 net/netrom/nr_route.c:519
       nr_device_event+0x133/0x140 net/netrom/af_netrom.c:126
       notifier_call_chain kernel/notifier.c:83 [inline]
       raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
       call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
       call_netdevice_notifiers net/core/dev.c:2075 [inline]
       __dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
       dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929
       dev_ifsioc+0x147/0xe70 net/core/dev_ioctl.c:324
       dev_ioctl+0x55f/0xe50 net/core/dev_ioctl.c:587
       sock_do_ioctl+0x222/0x2f0 net/socket.c:1154
       sock_ioctl+0x4ed/0x6e0 net/socket.c:1257
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:874 [inline]
       __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #1 (nr_node_list_lock){+...}-{2:2}:
       __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
       _raw_spin_lock_bh+0x32/0x50 kernel/locking/spinlock.c:178
       spin_lock_bh include/linux/spinlock.h:368 [inline]
       nr_rt_device_down+0xa5/0x710 net/netrom/nr_route.c:517
       nr_device_event+0x133/0x140 net/netrom/af_netrom.c:126
       notifier_call_chain kernel/notifier.c:83 [inline]
       raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
       call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
       call_netdevice_notifiers net/core/dev.c:2075 [inline]
       __dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
       dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929
       dev_ifsioc+0x147/0xe70 net/core/dev_ioctl.c:324
       dev_ioctl+0x55f/0xe50 net/core/dev_ioctl.c:587
       sock_do_ioctl+0x222/0x2f0 net/socket.c:1154
       sock_ioctl+0x4ed/0x6e0 net/socket.c:1257
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:874 [inline]
       __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #0 (nr_neigh_list_lock){+...}-{2:2}:
       check_prev_add kernel/locking/lockdep.c:3053 [inline]
       check_prevs_add kernel/locking/lockdep.c:3172 [inline]
       validate_chain kernel/locking/lockdep.c:3788 [inline]
       __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012
       lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
       __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
       _raw_spin_lock_bh+0x32/0x50 kernel/locking/spinlock.c:178
       spin_lock_bh include/linux/spinlock.h:368 [inline]
       nr_remove_neigh net/netrom/nr_route.c:307 [inline]
       nr_del_node+0x512/0x8d0 net/netrom/nr_route.c:342
       nr_rt_ioctl+0x982/0xce0 net/netrom/nr_route.c:678
       sock_do_ioctl+0xd3/0x2f0 net/socket.c:1140
       sock_ioctl+0x4ed/0x6e0 net/socket.c:1257
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:874 [inline]
       __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x66/0xd0

other info that might help us debug this:

Chain exists of:
  nr_neigh_list_lock --> nr_node_list_lock --> &nr_node->node_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&nr_node->node_lock);
                               lock(nr_node_list_lock);
                               lock(&nr_node->node_lock);
  lock(nr_neigh_list_lock);

 *** DEADLOCK ***

2 locks held by syz.1.759/5160:
 #0: ffffffff8d36d478 (nr_node_list_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline]
 #0: ffffffff8d36d478 (nr_node_list_lock){+...}-{2:2}, at: nr_del_node+0xfc/0x8d0 net/netrom/nr_route.c:334
 #1: ffff888024445870 (&nr_node->node_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline]
 #1: ffff888024445870 (&nr_node->node_lock){+...}-{2:2}, at: nr_node_lock include/net/netrom.h:151 [inline]
 #1: ffff888024445870 (&nr_node->node_lock){+...}-{2:2}, at: nr_del_node+0x152/0x8d0 net/netrom/nr_route.c:335

stack backtrace:
CPU: 1 PID: 5160 Comm: syz.1.759 Not tainted 5.15.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
 check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2133
 check_prev_add kernel/locking/lockdep.c:3053 [inline]
 check_prevs_add kernel/locking/lockdep.c:3172 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012
 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
 _raw_spin_lock_bh+0x32/0x50 kernel/locking/spinlock.c:178
 spin_lock_bh include/linux/spinlock.h:368 [inline]
 nr_remove_neigh net/netrom/nr_route.c:307 [inline]
 nr_del_node+0x512/0x8d0 net/netrom/nr_route.c:342
 nr_rt_ioctl+0x982/0xce0 net/netrom/nr_route.c:678
 sock_do_ioctl+0xd3/0x2f0 net/socket.c:1140
 sock_ioctl+0x4ed/0x6e0 net/socket.c:1257
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f055ec269a9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffda3395a58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f055ee4dfa0 RCX: 00007f055ec269a9
RDX: 0000200000000680 RSI: 000000000000890c RDI: 0000000000000005
RBP: 00007f055eca8d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f055ee4dfa0 R14: 00007f055ee4dfa0 R15: 0000000000000003
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/26 10:18 linux-5.15.y c79648372d02 fb8f743d .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in nr_del_node
2025/07/26 06:53 linux-5.15.y c79648372d02 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in nr_del_node
2025/05/02 21:19 linux-5.15.y 16fdf2c7111b b0714e37 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 possible deadlock in nr_del_node
* Struck through repros no longer work on HEAD.