[v5.15] inconsistent lock state in valid_state (3)

0 views
Skip to first unread message

syzbot

unread,
Apr 20, 2026, 6:51:38 PM (5 days ago) Apr 20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b9d57c40a767 Linux 5.15.203
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10e55702580000
kernel config: https://syzkaller.appspot.com/x/.config?x=353ae28c40b35af5
dashboard link: https://syzkaller.appspot.com/bug?extid=c8eb6060abf5a2a7b274
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/34313629ba4f/disk-b9d57c40.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/402f526e5a98/vmlinux-b9d57c40.xz
kernel image: https://storage.googleapis.com/syzbot-assets/45f7694e9617/bzImage-b9d57c40.xz

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

================================
WARNING: inconsistent lock state
syzkaller #0 Not tainted
--------------------------------
inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
ksoftirqd/0/14 [HC0[0]:SC1[1]:HE1:SE0] takes:
ffff88807a832620 (slock-AF_PHONET/1){+.?.}-{2:2}, at: __sk_receive_skb+0x17b/0x980 net/core/sock.c:517
{SOFTIRQ-ON-W} state was registered at:
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
_raw_spin_lock_nested+0x2e/0x40 kernel/locking/spinlock.c:368
__sk_receive_skb+0x17b/0x980 net/core/sock.c:517
sk_backlog_rcv include/net/sock.h:1080 [inline]
__release_sock+0x1e1/0x450 net/core/sock.c:2731
release_sock+0x5b/0x1b0 net/core/sock.c:3274
pep_sock_accept+0xc73/0x1190 net/phonet/pep.c:878
pn_socket_accept+0x126/0x360 net/phonet/socket.c:304
do_accept+0x509/0x6f0 net/socket.c:1809
__sys_accept4_file net/socket.c:1852 [inline]
__sys_accept4+0x103/0x170 net/socket.c:1882
__do_sys_accept4 net/socket.c:1894 [inline]
__se_sys_accept4 net/socket.c:1891 [inline]
__x64_sys_accept4+0x96/0xb0 net/socket.c:1891
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
irq event stamp: 2734782
hardirqs last enabled at (2734782): [<ffffffff87e65cb4>] process_backlog+0x644/0x790 net/core/dev.c:6568
hardirqs last disabled at (2734781): [<ffffffff87e65af6>] process_backlog+0x486/0x790 net/core/dev.c:6550
softirqs last enabled at (2734734): [<ffffffff81497864>] run_ksoftirqd+0xa4/0x100 kernel/softirq.c:943
softirqs last disabled at (2734739): [<ffffffff81497864>] run_ksoftirqd+0xa4/0x100 kernel/softirq.c:943

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(slock-AF_PHONET/1);
<Interrupt>
lock(slock-AF_PHONET/1);

*** DEADLOCK ***

3 locks held by ksoftirqd/0/14:
#0: ffffffff8c31eb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x9/0x30 include/linux/rcupdate.h:313
#1: ffff88807a8338e0 (slock-AF_PHONET){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:364 [inline]
#1: ffff88807a8338e0 (slock-AF_PHONET){+.-.}-{2:2}, at: __sk_receive_skb+0x18a/0x980 net/core/sock.c:519
#2: ffff88807a833960 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: sk_receive_skb include/net/sock.h:2001 [inline]
#2: ffff88807a833960 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: phonet_rcv+0x7e4/0xc70 net/phonet/af_phonet.c:405

stack backtrace:
CPU: 0 PID: 14 Comm: ksoftirqd/0 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
valid_state+0x13b/0x1d0 kernel/locking/lockdep.c:3932
mark_lock_irq+0xa9/0x900 kernel/locking/lockdep.c:4135
mark_lock+0x208/0x320 kernel/locking/lockdep.c:4591
mark_usage kernel/locking/lockdep.c:-1 [inline]
__lock_acquire+0xc64/0x7d10 kernel/locking/lockdep.c:4966
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
_raw_spin_lock_nested+0x2e/0x40 kernel/locking/spinlock.c:368
__sk_receive_skb+0x17b/0x980 net/core/sock.c:517
sk_backlog_rcv include/net/sock.h:1080 [inline]
__sk_receive_skb+0x42c/0x980 net/core/sock.c:526
sk_receive_skb include/net/sock.h:2001 [inline]
phonet_rcv+0x7e4/0xc70 net/phonet/af_phonet.c:405
__netif_receive_skb_one_core net/core/dev.c:5551 [inline]
__netif_receive_skb+0xcc/0x290 net/core/dev.c:5665
process_backlog+0x370/0x790 net/core/dev.c:6542
__napi_poll+0xc0/0x430 net/core/dev.c:7101
napi_poll net/core/dev.c:7168 [inline]
net_rx_action+0x4d4/0xa10 net/core/dev.c:7258
handle_softirqs+0x339/0x830 kernel/softirq.c:576
run_ksoftirqd+0xa4/0x100 kernel/softirq.c:943
smpboot_thread_fn+0x4f6/0x970 kernel/smpboot.c:164
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
</TASK>


---
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,
Apr 20, 2026, 11:00:28 PM (5 days ago) Apr 20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: b9d57c40a767 Linux 5.15.203
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=175a2cce580000
kernel config: https://syzkaller.appspot.com/x/.config?x=353ae28c40b35af5
dashboard link: https://syzkaller.appspot.com/bug?extid=c8eb6060abf5a2a7b274
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12ab91ba580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14729f16580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/34313629ba4f/disk-b9d57c40.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/402f526e5a98/vmlinux-b9d57c40.xz
kernel image: https://storage.googleapis.com/syzbot-assets/45f7694e9617/bzImage-b9d57c40.xz

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

================================
WARNING: inconsistent lock state
syzkaller #0 Not tainted
--------------------------------
inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
syz.0.25/4374 [HC0[0]:SC0[0]:HE1:SE1] takes:
ffff88807f0e4560 (slock-AF_PHONET/1){+.?.}-{2:2}, at: __sk_receive_skb+0x17b/0x980 net/core/sock.c:517
{IN-SOFTIRQ-W} state was registered at:
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
_raw_spin_lock_nested+0x2e/0x40 kernel/locking/spinlock.c:368
__sk_receive_skb+0x17b/0x980 net/core/sock.c:517
sk_backlog_rcv include/net/sock.h:1080 [inline]
__sk_receive_skb+0x42c/0x980 net/core/sock.c:526
sk_receive_skb include/net/sock.h:2001 [inline]
phonet_rcv+0x7e4/0xc70 net/phonet/af_phonet.c:405
__netif_receive_skb_one_core net/core/dev.c:5551 [inline]
__netif_receive_skb+0xcc/0x290 net/core/dev.c:5665
process_backlog+0x370/0x790 net/core/dev.c:6542
__napi_poll+0xc0/0x430 net/core/dev.c:7101
napi_poll net/core/dev.c:7168 [inline]
net_rx_action+0x4d4/0xa10 net/core/dev.c:7258
handle_softirqs+0x339/0x830 kernel/softirq.c:576
run_ksoftirqd+0xa4/0x100 kernel/softirq.c:943
smpboot_thread_fn+0x4f6/0x970 kernel/smpboot.c:164
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
irq event stamp: 61
hardirqs last enabled at (61): [<ffffffff81494d76>] __local_bh_enable_ip+0x136/0x1c0 kernel/softirq.c:406
hardirqs last disabled at (59): [<ffffffff81494d17>] __local_bh_enable_ip+0xd7/0x1c0 kernel/softirq.c:383
softirqs last enabled at (60): [<ffffffff87dbff48>] spin_unlock_bh include/linux/spinlock.h:409 [inline]
softirqs last enabled at (60): [<ffffffff87dbff48>] __release_sock+0xa8/0x450 net/core/sock.c:2724
softirqs last disabled at (58): [<ffffffff87db2f5b>] spin_lock_bh include/linux/spinlock.h:369 [inline]
softirqs last disabled at (58): [<ffffffff87db2f5b>] release_sock+0x2b/0x1b0 net/core/sock.c:3272

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(slock-AF_PHONET/1);
<Interrupt>
lock(slock-AF_PHONET/1);

*** DEADLOCK ***

1 lock held by syz.0.25/4374:
#0: ffff88807b60a6a0 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1744 [inline]
#0: ffff88807b60a6a0 (sk_lock-AF_PHONET){+.+.}-{0:0}, at: pep_sock_accept+0xb5/0x1190 net/phonet/pep.c:779

stack backtrace:
CPU: 0 PID: 4374 Comm: syz.0.25 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
valid_state+0x13b/0x1d0 kernel/locking/lockdep.c:3932
mark_lock_irq+0xa9/0x900 kernel/locking/lockdep.c:4135
mark_lock+0x208/0x320 kernel/locking/lockdep.c:4591
mark_usage kernel/locking/lockdep.c:-1 [inline]
__lock_acquire+0xd47/0x7d10 kernel/locking/lockdep.c:4966
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
_raw_spin_lock_nested+0x2e/0x40 kernel/locking/spinlock.c:368
__sk_receive_skb+0x17b/0x980 net/core/sock.c:517
sk_backlog_rcv include/net/sock.h:1080 [inline]
__release_sock+0x1e1/0x450 net/core/sock.c:2731
release_sock+0x5b/0x1b0 net/core/sock.c:3274
pep_sock_accept+0xc73/0x1190 net/phonet/pep.c:878
pn_socket_accept+0x126/0x360 net/phonet/socket.c:304
do_accept+0x509/0x6f0 net/socket.c:1809
__sys_accept4_file net/socket.c:1852 [inline]
__sys_accept4+0x103/0x170 net/socket.c:1882
__do_sys_accept4 net/socket.c:1894 [inline]
__se_sys_accept4 net/socket.c:1891 [inline]
__x64_sys_accept4+0x96/0xb0 net/socket.c:1891
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:0x7f70192b8819
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:00007f70188f9028 EFLAGS: 00000246 ORIG_RAX: 0000000000000120
RAX: ffffffffffffffda RBX: 00007f7019532090 RCX: 00007f70192b8819
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007f701934ec91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000080000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7019532128 R14: 00007f7019532090 R15: 00007ffcf52f7108
</TASK>


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