[v5.15] possible deadlock in ax25_device_event

3 views
Skip to first unread message

syzbot

unread,
Feb 22, 2025, 7:49:29 PM2/22/25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c16c81c81336 Linux 5.15.178
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17b347a4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d302c69e93fb6774
dashboard link: https://syzkaller.appspot.com/bug?extid=2fe6437a4558c0a468dd
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/267e46ee7273/disk-c16c81c8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/944e289206cf/vmlinux-c16c81c8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f8cadf62458e/bzImage-c16c81c8.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+2fe643...@syzkaller.appspotmail.com

======================================================
WARNING: possible circular locking dependency detected
5.15.178-syzkaller #0 Not tainted
------------------------------------------------------
syz.0.4574/20947 is trying to acquire lock:
ffff88807d0f4120 (sk_lock-AF_AX25){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1684 [inline]
ffff88807d0f4120 (sk_lock-AF_AX25){+.+.}-{0:0}, at: ax25_kill_by_device net/ax25/af_ax25.c:99 [inline]
ffff88807d0f4120 (sk_lock-AF_AX25){+.+.}-{0:0}, at: ax25_device_event+0x234/0x500 net/ax25/af_ax25.c:142

but task is already holding lock:
ffffffff8dc42788 (rtnl_mutex){+.+.}-{3:3}, at: dev_ioctl+0x598/0xf60 net/core/dev_ioctl.c:611

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (rtnl_mutex){+.+.}-{3:3}:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__mutex_lock_common+0x1da/0x25a0 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+0xa3a/0xe70 net/ax25/af_ax25.c:676
__sys_setsockopt+0x57e/0x990 net/socket.c:2203
__do_sys_setsockopt net/socket.c:2214 [inline]
__se_sys_setsockopt net/socket.c:2211 [inline]
__x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2211
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0

-> #0 (sk_lock-AF_AX25){+.+.}-{0:0}:
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
lock_sock_nested+0x44/0x100 net/core/sock.c:3253
lock_sock include/net/sock.h:1684 [inline]
ax25_kill_by_device net/ax25/af_ax25.c:99 [inline]
ax25_device_event+0x234/0x500 net/ax25/af_ax25.c:142
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
dev_close_many+0x37c/0x530 net/core/dev.c:1619
dev_close+0x1b3/0x2b0 net/core/dev.c:1641
bpq_device_event+0x3c3/0x9d0 drivers/net/hamradio/bpqether.c:548
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
dev_close_many+0x37c/0x530 net/core/dev.c:1619
dev_close+0x1b3/0x2b0 net/core/dev.c:1641
bond_setup_by_slave+0x66/0x390 drivers/net/bonding/bond_main.c:1471
bond_enslave+0x7b1/0x3c20 drivers/net/bonding/bond_main.c:1855
bond_do_ioctl+0x2a1/0xb40 drivers/net/bonding/bond_main.c:4238
bond_siocdevprivate+0x169/0x410
dev_siocdevprivate net/core/dev_ioctl.c:285 [inline]
dev_ifsioc+0xc75/0x10c0 net/core/dev_ioctl.c:403
dev_ioctl+0x5ab/0xf60 net/core/dev_ioctl.c:612
sock_ioctl+0x68f/0x770 net/socket.c:1184
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 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(rtnl_mutex);
lock(sk_lock-AF_AX25);
lock(rtnl_mutex);
lock(sk_lock-AF_AX25);

*** DEADLOCK ***

1 lock held by syz.0.4574/20947:
#0: ffffffff8dc42788 (rtnl_mutex){+.+.}-{3:3}, at: dev_ioctl+0x598/0xf60 net/core/dev_ioctl.c:611

stack backtrace:
CPU: 0 PID: 20947 Comm: syz.0.4574 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
check_noncircular+0x2f8/0x3b0 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+0x1649/0x5930 kernel/locking/lockdep.c:3788
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
lock_sock_nested+0x44/0x100 net/core/sock.c:3253
lock_sock include/net/sock.h:1684 [inline]
ax25_kill_by_device net/ax25/af_ax25.c:99 [inline]
ax25_device_event+0x234/0x500 net/ax25/af_ax25.c:142
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
dev_close_many+0x37c/0x530 net/core/dev.c:1619
dev_close+0x1b3/0x2b0 net/core/dev.c:1641
bpq_device_event+0x3c3/0x9d0 drivers/net/hamradio/bpqether.c:548
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
dev_close_many+0x37c/0x530 net/core/dev.c:1619
dev_close+0x1b3/0x2b0 net/core/dev.c:1641
bond_setup_by_slave+0x66/0x390 drivers/net/bonding/bond_main.c:1471
bond_enslave+0x7b1/0x3c20 drivers/net/bonding/bond_main.c:1855
bond_do_ioctl+0x2a1/0xb40 drivers/net/bonding/bond_main.c:4238
bond_siocdevprivate+0x169/0x410
dev_siocdevprivate net/core/dev_ioctl.c:285 [inline]
dev_ifsioc+0xc75/0x10c0 net/core/dev_ioctl.c:403
dev_ioctl+0x5ab/0xf60 net/core/dev_ioctl.c:612
sock_ioctl+0x68f/0x770 net/socket.c:1184
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fbccc61e169
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:00007fbcca487038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fbccc836fa0 RCX: 00007fbccc61e169
RDX: 0000400000000180 RSI: 00000000000089f0 RDI: 0000000000000006
RBP: 00007fbccc69f2a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fbccc836fa0 R15: 00007fffdc817598
</TASK>
8021q: adding VLAN 0 to HW filter on device bond0
bond0: (slave rose0): Enslaving as an active interface with an up link


---
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

syzbot

unread,
Aug 3, 2025, 2:51:35 PM8/3/25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: c79648372d02 Linux 5.15.189
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14635aa2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=9e47345638b85bd0
dashboard link: https://syzkaller.appspot.com/bug?extid=2fe6437a4558c0a468dd
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=135b7834580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14ab7cf0580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7ab49562317a/disk-c7964837.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e847ec1e38d3/vmlinux-c7964837.xz
kernel image: https://storage.googleapis.com/syzbot-assets/263158c6371c/Image-c7964837.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+2fe643...@syzkaller.appspotmail.com

device bpq0 entered promiscuous mode
IPv6: ADDRCONF(NETDEV_CHANGE): bpq0: link becomes ready
======================================================
WARNING: possible circular locking dependency detected
5.15.189-syzkaller #0 Not tainted
------------------------------------------------------
syz.0.17/4170 is trying to acquire lock:
ffff0000d7c0d120 (sk_lock-AF_AX25){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1694 [inline]
ffff0000d7c0d120 (sk_lock-AF_AX25){+.+.}-{0:0}, at: ax25_kill_by_device net/ax25/af_ax25.c:99 [inline]
ffff0000d7c0d120 (sk_lock-AF_AX25){+.+.}-{0:0}, at: ax25_device_event+0x20c/0x590 net/ax25/af_ax25.c:142

but task is already holding lock:
ffff80001629c1e8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:72

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (rtnl_mutex){+.+.}-{3:3}:
__mutex_lock_common+0x194/0x1edc kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0xac/0x11c kernel/locking/mutex.c:743
rtnl_lock+0x20/0x2c net/core/rtnetlink.c:72
ax25_setsockopt+0x870/0xa5c net/ax25/af_ax25.c:676
__sys_setsockopt+0x260/0x36c net/socket.c:2203
__do_sys_setsockopt net/socket.c:2214 [inline]
__se_sys_setsockopt net/socket.c:2211 [inline]
__arm64_sys_setsockopt+0xb8/0xd4 net/socket.c:2211
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

-> #0 (sk_lock-AF_AX25){+.+.}-{0:0}:
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+0x2928/0x651c kernel/locking/lockdep.c:5012
lock_acquire+0x1f4/0x620 kernel/locking/lockdep.c:5623
lock_sock_nested+0xd8/0x1d4 net/core/sock.c:3251
lock_sock include/net/sock.h:1694 [inline]
ax25_kill_by_device net/ax25/af_ax25.c:99 [inline]
ax25_device_event+0x20c/0x590 net/ax25/af_ax25.c:142
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2049 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
dev_close_many+0x2cc/0x440 net/core/dev.c:1650
dev_close+0x148/0x1f8 net/core/dev.c:1672
bpq_device_event+0x318/0x824 drivers/net/hamradio/bpqether.c:548
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2049 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
dev_close_many+0x2cc/0x440 net/core/dev.c:1650
dev_close+0x148/0x1f8 net/core/dev.c:1672
bond_setup_by_slave+0x70/0x318 drivers/net/bonding/bond_main.c:1471
bond_enslave+0x624/0x3014 drivers/net/bonding/bond_main.c:1855
bond_do_ioctl+0x6ec/0xb3c drivers/net/bonding/bond_main.c:4238
bond_siocdevprivate+0x18c/0x1dc drivers/net/bonding/bond_main.c:-1
dev_siocdevprivate net/core/dev_ioctl.c:285 [inline]
dev_ifsioc+0xa30/0xef4 net/core/dev_ioctl.c:403
dev_ioctl+0x550/0xc94 net/core/dev_ioctl.c:612
sock_ioctl+0x7e0/0x87c net/socket.c:1184
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

other info that might help us debug this:

Possible unsafe locking scenario:

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

*** DEADLOCK ***

1 lock held by syz.0.17/4170:
#0: ffff80001629c1e8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:72

stack backtrace:
CPU: 0 PID: 4170 Comm: syz.0.17 Not tainted 5.15.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call trace:
dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack+0x30/0x40 lib/dump_stack.c:88
dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106
dump_stack+0x1c/0x5c lib/dump_stack.c:113
print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2011
check_noncircular+0x240/0x2d4 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+0x2928/0x651c kernel/locking/lockdep.c:5012
lock_acquire+0x1f4/0x620 kernel/locking/lockdep.c:5623
lock_sock_nested+0xd8/0x1d4 net/core/sock.c:3251
lock_sock include/net/sock.h:1694 [inline]
ax25_kill_by_device net/ax25/af_ax25.c:99 [inline]
ax25_device_event+0x20c/0x590 net/ax25/af_ax25.c:142
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2049 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
dev_close_many+0x2cc/0x440 net/core/dev.c:1650
dev_close+0x148/0x1f8 net/core/dev.c:1672
bpq_device_event+0x318/0x824 drivers/net/hamradio/bpqether.c:548
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2049 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
dev_close_many+0x2cc/0x440 net/core/dev.c:1650
dev_close+0x148/0x1f8 net/core/dev.c:1672
bond_setup_by_slave+0x70/0x318 drivers/net/bonding/bond_main.c:1471
bond_enslave+0x624/0x3014 drivers/net/bonding/bond_main.c:1855
bond_do_ioctl+0x6ec/0xb3c drivers/net/bonding/bond_main.c:4238
bond_siocdevprivate+0x18c/0x1dc drivers/net/bonding/bond_main.c:-1
dev_siocdevprivate net/core/dev_ioctl.c:285 [inline]
dev_ifsioc+0xa30/0xef4 net/core/dev_ioctl.c:403
dev_ioctl+0x550/0xc94 net/core/dev_ioctl.c:612
sock_ioctl+0x7e0/0x87c net/socket.c:1184
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
8021q: adding VLAN 0 to HW filter on device bond0
bond0: (slave rose0): Enslaving as an active interface with an up link


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
Reply all
Reply to author
Forward
0 new messages