From: Yaohan Li <shunsheng1218@gmail.com>
To: nicoyip.dev@gmail.com
Cc: marcel@holtmann.org, luiz.dentz@gmail.com,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6] Bluetooth: hci_conn: hold a reference for LE connection timeout
Date: Wed, 04 Nov 2026 05:20:03 -0000 [thread overview]
Message-ID: <179376960391.50454.8822263457423416137@gmail.com> (raw)
In-Reply-To: 20261002174658.3596771-1-nicoyip.dev@gmail.com
Hello Chengfeng,
We independently reproduced the LE connection timeout use-after-free
and tested your [PATCH v6] ("Bluetooth: hci_conn: hold a reference
for LE connection timeout") on a clean Linux v7.4-rc1 tree
(6628e7d4c6b2).
Test setup:
- QEMU/KVM, KASAN-enabled kernel, /dev/vhci virtual controller
- Management SET_ADVERTISING and L2CAP LE connection
- Kprobe-assisted timing injection at le_conn_timeout() entry,
50 ms park, with mgmt disconnect at discms=2015
Results:
- Unpatched v7.4-rc1: 42 slab-use-after-free reports,
with the first relevant frame in hci_conn_failed()
- Your v6 patch applied to the clean tree: 0 KASAN reports,
with 200 confirmed probe hits under the same timing setup
- Control run without injection: 0 KASAN reports
This is a test of your posted v6 reference-counting patch, not
merely our independently developed fix. The result supports the
lifetime fix under the tested interleaving; it does not establish
coverage of every Bluetooth shutdown path.
I also confirmed your analysis that a naive
cancel_delayed_work_sync() replacement is NOT safe: the mgmt
disconnect path holds hdev->lock while calling hci_conn_del,
which would deadlock against le_conn_timeout's hci_dev_lock
acquisition. Your reference-counting approach is the correct
solution.
Tested-by: Yaohan Li <shunsheng1218@gmail.com>
We can provide the full console logs, build configuration, and
reproducer details privately if useful. The investigation was
AI-assisted, and the patch application and test results were
reviewed by the human tester.
Best regards,
Yaohan Li
next reply other threads:[~2026-11-04 5:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 5:20 Yaohan Li [this message]
2026-11-04 8:24 ` Chengfeng Ye
-- strict thread matches above, loose matches on Subject: below --
2026-10-02 17:46 Chengfeng Ye
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=179376960391.50454.8822263457423416137@gmail.com \
--to=shunsheng1218@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=nicoyip.dev@gmail.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
all inboxes | Powered by JetHome®