syzbot


possible deadlock in ax25_setsockopt (2)

Status: upstream: reported on 2025/11/08 23:20
Reported-by: syzbot+7fdffa61d89ddb4e57dc@syzkaller.appspotmail.com
First crash: 116d, last: 34d
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in ax25_setsockopt hams 4 2 420d 428d 28/29 fixed on 2025/05/09 08:02
linux-5.15 possible deadlock in ax25_setsockopt 4 22 221d 346d 0/3 auto-obsoleted due to no activity on 2025/10/16 13:43

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.3.5555/24118 is trying to acquire lock:
ffffffff8d43c548 (rtnl_mutex){+.+.}-{3:3}, at: ax25_setsockopt+0x859/0xa60 net/ax25/af_ax25.c:676

but task is already holding lock:
ffff88807e4ac120 (sk_lock-AF_AX25){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1744 [inline]
ffff88807e4ac120 (sk_lock-AF_AX25){+.+.}-{0:0}, at: ax25_setsockopt+0x1db/0xa60 net/ax25/af_ax25.c:570

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sk_lock-AF_AX25){+.+.}-{0:0}:
       lock_sock_nested+0x44/0x100 net/core/sock.c:3259
       lock_sock include/net/sock.h:1744 [inline]
       ax25_kill_by_device net/ax25/af_ax25.c:99 [inline]
       ax25_device_event+0x217/0x4f0 net/ax25/af_ax25.c:142
       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+0x158/0x300 net/core/dev.c:8893
       dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929
       dev_ifsioc+0x130/0xd50 net/core/dev_ioctl.c:324
       dev_ioctl+0x545/0xe30 net/core/dev_ioctl.c:572
       sock_do_ioctl+0x245/0x320 net/socket.c:1161
       sock_ioctl+0x4d2/0x710 net/socket.c:1266
       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 (rtnl_mutex){+.+.}-{3:3}:
       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+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
       lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
       __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596
       __mutex_lock kernel/locking/mutex.c:729 [inline]
       mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
       ax25_setsockopt+0x859/0xa60 net/ax25/af_ax25.c:676
       __sys_setsockopt+0x2bf/0x3d0 net/socket.c:2212
       __do_sys_setsockopt net/socket.c:2223 [inline]
       __se_sys_setsockopt net/socket.c:2220 [inline]
       __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2220
       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:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sk_lock-AF_AX25);
                               lock(rtnl_mutex);
                               lock(sk_lock-AF_AX25);
  lock(rtnl_mutex);

 *** DEADLOCK ***

1 lock held by syz.3.5555/24118:
 #0: ffff88807e4ac120 (sk_lock-AF_AX25){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1744 [inline]
 #0: ffff88807e4ac120 (sk_lock-AF_AX25){+.+.}-{0:0}, at: ax25_setsockopt+0x1db/0xa60 net/ax25/af_ax25.c:570

stack backtrace:
CPU: 1 PID: 24118 Comm: syz.3.5555 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 check_noncircular+0x296/0x330 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+0x2c42/0x7d10 kernel/locking/lockdep.c:5012
 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
 __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 ax25_setsockopt+0x859/0xa60 net/ax25/af_ax25.c:676
 __sys_setsockopt+0x2bf/0x3d0 net/socket.c:2212
 __do_sys_setsockopt net/socket.c:2223 [inline]
 __se_sys_setsockopt net/socket.c:2220 [inline]
 __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2220
 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:0x7fceb485deb9
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:00007fceb2ab9028 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007fceb4ad8fa0 RCX: 00007fceb485deb9
RDX: 0000000000000019 RSI: 0000000000000101 RDI: 0000000000000004
RBP: 00007fceb48cbc1f R08: 0000000000000010 R09: 0000000000000000
R10: 0000200000000600 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fceb4ad9038 R14: 00007fceb4ad8fa0 R15: 00007ffe4043dd18
 </TASK>

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/29 16:49 linux-5.15.y 9eec9a14ee10 aeb6fdd5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ax25_setsockopt
2026/01/28 18:30 linux-5.15.y 9eec9a14ee10 004c195c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ax25_setsockopt
2026/01/28 18:25 linux-5.15.y 9eec9a14ee10 004c195c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ax25_setsockopt
2026/01/28 18:25 linux-5.15.y 9eec9a14ee10 004c195c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ax25_setsockopt
2026/01/22 02:16 linux-5.15.y 9eec9a14ee10 8fc37797 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ax25_setsockopt
2026/01/22 02:14 linux-5.15.y 9eec9a14ee10 8fc37797 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ax25_setsockopt
2026/01/16 01:26 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ax25_setsockopt
2025/11/08 23:19 linux-5.15.y cc5ec8769306 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ax25_setsockopt
2025/11/08 23:19 linux-5.15.y cc5ec8769306 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in ax25_setsockopt
* Struck through repros no longer work on HEAD.