From: syzbot <syzbot+c12e2f941af1feb5632c@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_connect (2)
Date: Sat, 07 Sep 2024 20:58:02 -0700 [thread overview]
Message-ID: <0000000000009b550d062193a529@google.com> (raw)
In-Reply-To: <tencent_716CE97A03B68449F760577CC6C6336E2305@qq.com>
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in l2cap_recv_frame
Bluetooth: Unknown BR/EDR signaling command 0x11
Bluetooth: Wrong link type (-22)
============================================
WARNING: possible recursive locking detected
6.11.0-rc6-syzkaller-00326-gd1f2d51b711a-dirty #0 Not tainted
--------------------------------------------
kworker/u9:1/4615 is trying to acquire lock:
ffff888062afc078 (&hdev->lock){+.+.}-{3:3}, at: l2cap_connect_req net/bluetooth/l2cap_core.c:4075 [inline]
ffff888062afc078 (&hdev->lock){+.+.}-{3:3}, at: l2cap_bredr_sig_cmd net/bluetooth/l2cap_core.c:4772 [inline]
ffff888062afc078 (&hdev->lock){+.+.}-{3:3}, at: l2cap_sig_channel net/bluetooth/l2cap_core.c:5543 [inline]
ffff888062afc078 (&hdev->lock){+.+.}-{3:3}, at: l2cap_recv_frame+0xe9d/0x8eb0 net/bluetooth/l2cap_core.c:6825
but task is already holding lock:
ffff888062afc078 (&hdev->lock){+.+.}-{3:3}, at: hci_acldata_packet net/bluetooth/hci_core.c:3783 [inline]
ffff888062afc078 (&hdev->lock){+.+.}-{3:3}, at: hci_rx_work+0x96b/0x1610 net/bluetooth/hci_core.c:4029
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&hdev->lock);
lock(&hdev->lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
3 locks held by kworker/u9:1/4615:
#0: ffff8880301df948 ((wq_completion)hci2#2){+.+.}-{0:0}, at: process_one_work+0x1277/0x1b40 kernel/workqueue.c:3206
#1: ffffc9000d83fd80 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x921/0x1b40 kernel/workqueue.c:3207
#2: ffff888062afc078 (&hdev->lock){+.+.}-{3:3}, at: hci_acldata_packet net/bluetooth/hci_core.c:3783 [inline]
#2: ffff888062afc078 (&hdev->lock){+.+.}-{3:3}, at: hci_rx_work+0x96b/0x1610 net/bluetooth/hci_core.c:4029
stack backtrace:
CPU: 0 UID: 0 PID: 4615 Comm: kworker/u9:1 Not tainted 6.11.0-rc6-syzkaller-00326-gd1f2d51b711a-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Workqueue: hci2 hci_rx_work
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:93 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119
check_deadlock kernel/locking/lockdep.c:3061 [inline]
validate_chain kernel/locking/lockdep.c:3855 [inline]
__lock_acquire+0x2167/0x3cb0 kernel/locking/lockdep.c:5142
lock_acquire kernel/locking/lockdep.c:5759 [inline]
lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724
__mutex_lock_common kernel/locking/mutex.c:608 [inline]
__mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752
l2cap_connect_req net/bluetooth/l2cap_core.c:4075 [inline]
l2cap_bredr_sig_cmd net/bluetooth/l2cap_core.c:4772 [inline]
l2cap_sig_channel net/bluetooth/l2cap_core.c:5543 [inline]
l2cap_recv_frame+0xe9d/0x8eb0 net/bluetooth/l2cap_core.c:6825
l2cap_recv_acldata+0x9b4/0xb70 net/bluetooth/l2cap_core.c:7514
hci_acldata_packet net/bluetooth/hci_core.c:3790 [inline]
hci_rx_work+0xaa1/0x1610 net/bluetooth/hci_core.c:4029
process_one_work+0x9c5/0x1b40 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xed0 kernel/workqueue.c:3389
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
</TASK>
Tested on:
commit: d1f2d51b Merge tag 'clk-fixes-for-linus' of git://git...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1656abc7980000
kernel config: https://syzkaller.appspot.com/x/.config?x=57042fe37c7ee7c2
dashboard link: https://syzkaller.appspot.com/bug?extid=c12e2f941af1feb5632c
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=165a0e00580000
next prev parent reply other threads:[~2024-09-08 3:58 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 20:23 [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_connect (2) syzbot
2024-09-07 14:42 ` syzbot
2024-09-08 0:01 ` Hillf Danton
2024-09-08 0:24 ` syzbot
2024-09-08 1:28 ` Edward Adam Davis
2024-09-08 1:51 ` syzbot
2024-09-08 2:06 ` Edward Adam Davis
2024-09-08 2:29 ` syzbot
2024-09-08 2:41 ` Edward Adam Davis
2024-09-08 3:06 ` syzbot
2024-09-08 3:15 ` Edward Adam Davis
2024-09-08 3:58 ` syzbot [this message]
2024-09-08 3:25 ` Hillf Danton
2024-09-08 4:07 ` syzbot
2024-09-08 4:07 ` Edward Adam Davis
2024-09-08 4:37 ` syzbot
2024-09-08 7:22 ` [PATCH] Bluetooth/l2cap: Fix uaf in l2cap_connect Edward Adam Davis
2024-09-10 20:56 ` Luiz Augusto von Dentz
2024-09-20 15:07 ` Luiz Augusto von Dentz
2024-09-21 1:40 ` Edward Adam Davis
2024-09-21 10:56 ` Hillf Danton
2024-09-23 14:32 ` Luiz Augusto von Dentz
2024-09-23 14:37 ` Aleksandr Nogikh
2024-09-23 15:20 ` Luiz Augusto von Dentz
2024-09-23 15:28 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_connect (2) syzbot
2024-09-23 15:38 ` [PATCH] Bluetooth/l2cap: Fix uaf in l2cap_connect Aleksandr Nogikh
2024-09-23 15:48 ` Luiz Augusto von Dentz
2024-09-23 16:21 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_connect (2) syzbot
2024-09-08 8:32 ` Hillf Danton
2024-09-08 8:52 ` syzbot
2024-09-08 11:15 ` Hillf Danton
2024-09-08 11:33 ` syzbot
2024-09-08 12:50 ` Hillf Danton
2024-09-08 13:10 ` syzbot
2024-09-08 13:37 ` Hillf Danton
2024-09-08 13:58 ` syzbot
2024-09-09 11:06 ` Hillf Danton
2024-09-09 11:31 ` syzbot
2024-09-11 11:29 ` Hillf Danton
2024-09-11 11:59 ` syzbot
2024-09-12 11:49 ` Hillf Danton
2024-09-12 14:51 ` syzbot
2024-09-10 18:43 ` syzbot
2024-09-23 16:13 ` [syzbot] Re: [PATCH] Bluetooth/l2cap: Fix uaf in l2cap_connect syzbot
[not found] <CABBYNZ+Fj1bDqSG7PkF5OFEx_OWkgm2gEm8640odaQX5EBGxPg@mail.gmail.com>
2024-09-23 16:45 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in l2cap_connect (2) 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=0000000000009b550d062193a529@google.com \
--to=syzbot+c12e2f941af1feb5632c@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