From: syzbot <syzbot+cdae834448ec8c3602fe@syzkaller.appspotmail.com>
To: eadavis@qq.com, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_sock_new_connection_cb
Date: Tue, 25 Nov 2025 04:50:03 -0800 [thread overview]
Message-ID: <6925a5fb.a70a0220.d98e3.00a7.GAE@google.com> (raw)
In-Reply-To: <tencent_C56C949648E87AEC7ECDB079DA6E1C2DF10A@qq.com>
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in bt_accept_dequeue
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.3.20/6474 is trying to acquire lock:
ffff888028ff2358 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1679 [inline]
ffff888028ff2358 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: bt_accept_dequeue+0x100/0x5b0 net/bluetooth/af_bluetooth.c:279
but task is already holding lock:
ffff88803b4e8358 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1679 [inline]
ffff88803b4e8358 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: l2cap_sock_release+0x5f/0x230 net/bluetooth/l2cap_sock.c:1425
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP);
lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP);
*** DEADLOCK ***
May be due to missing lock nesting notation
2 locks held by syz.3.20/6474:
#0: ffff88803d4c70f8 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:980 [inline]
#0: ffff88803d4c70f8 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: __sock_release net/socket.c:661 [inline]
#0: ffff88803d4c70f8 (&sb->s_type->i_mutex_key#10){+.+.}-{4:4}, at: sock_close+0x9b/0x240 net/socket.c:1455
#1: ffff88803b4e8358 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1679 [inline]
#1: ffff88803b4e8358 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: l2cap_sock_release+0x5f/0x230 net/bluetooth/l2cap_sock.c:1425
stack backtrace:
CPU: 0 UID: 0 PID: 6474 Comm: syz.3.20 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_deadlock_bug+0x28b/0x2a0 kernel/locking/lockdep.c:3041
check_deadlock kernel/locking/lockdep.c:3093 [inline]
validate_chain+0x1a3f/0x2140 kernel/locking/lockdep.c:3895
__lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
lock_sock_nested+0x3e/0x130 net/core/sock.c:3720
lock_sock include/net/sock.h:1679 [inline]
bt_accept_dequeue+0x100/0x5b0 net/bluetooth/af_bluetooth.c:279
l2cap_sock_cleanup_listen+0x2f/0x3e0 net/bluetooth/l2cap_sock.c:1454
l2cap_sock_release+0x67/0x230 net/bluetooth/l2cap_sock.c:1426
__sock_release net/socket.c:662 [inline]
sock_close+0xc3/0x240 net/socket.c:1455
__fput+0x45b/0xa80 fs/file_table.c:468
task_work_run+0x1d4/0x260 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xe9/0x130 kernel/entry/common.c:43
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x2bd/0xfa0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe17a36f749
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:00007fff3eea6588 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007fe17a5c7da0 RCX: 00007fe17a36f749
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007fe17a5c7da0 R08: 0000000000000000 R09: 000000143eea687f
R10: 000000000003fd20 R11: 0000000000000246 R12: 000000000002a91f
R13: 00007fff3eea6680 R14: ffffffffffffffff R15: 00007fff3eea66a0
</TASK>
Tested on:
commit: ac3fd01e Linux 6.18-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12c97612580000
kernel config: https://syzkaller.appspot.com/x/.config?x=38a0c4cddc846161
dashboard link: https://syzkaller.appspot.com/bug?extid=cdae834448ec8c3602fe
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=100f4f42580000
next prev parent reply other threads:[~2025-11-25 12:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 8:46 [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_sock_new_connection_cb syzbot
2025-11-24 4:01 ` syzbot
2025-11-25 12:13 ` Edward Adam Davis
2025-11-25 12:50 ` syzbot [this message]
2025-11-25 13:07 ` Edward Adam Davis
2025-11-25 13:46 ` syzbot
2025-11-25 13:55 ` Edward Adam Davis
2025-11-25 14:54 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6925a5fb.a70a0220.d98e3.00a7.GAE@google.com \
--to=syzbot+cdae834448ec8c3602fe@syzkaller.appspotmail.com \
--cc=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox