From: Li Qiang <liqiang01@kylinos.cn>
To: linux-bluetooth@vger.kernel.org
Cc: marcel@holtmann.org, luiz.dentz@gmail.com,
linux-kernel@vger.kernel.org, Li Qiang <liqiang01@kylinos.cn>
Subject: [PATCH 0/5] Bluetooth: harden packet and transport parsing
Date: Thu, 16 Jul 2026 16:47:27 +0800 [thread overview]
Message-ID: <cover.1784191283.git.liqiang01@kylinos.cn> (raw)
This series hardens Bluetooth packet receive paths and the HCI UART
transmit path against malformed lengths and invalid callback return
values.
The affected code accesses protocol fields before confirming that the
complete headers are present, or trusts a received length while
appending to an skb. The HCI UART write worker also assumes that a tty
driver always returns a valid written-byte count. These assumptions can
lead to out-of-bounds accesses or invalid skb manipulation when data is
truncated or a lower-level driver reports an invalid result.
Validate packet headers and declared data ranges before dereferencing
or copying them. Reject tty write return values outside the skb length,
and reset the QCA memdump state when a collection is discarded.
The affected Bluetooth objects were built with the required Bluetooth
configuration dependencies enabled. The series also passes
git diff --check and checkpatch on the generated patches.
Li Qiang (5):
Bluetooth: bfusb: validate received block boundaries
Bluetooth: btmrvl: validate event packet lengths
Bluetooth: hci_bcsp: validate received packet lengths
Bluetooth: hci_ldisc: reject invalid tty write lengths
Bluetooth: hci_qca: validate controller memdump frames
drivers/bluetooth/bfusb.c | 37 +++++++++++++++++++--
drivers/bluetooth/btmrvl_main.c | 10 ++++++
drivers/bluetooth/hci_bcsp.c | 5 ++-
drivers/bluetooth/hci_ldisc.c | 6 ++++
drivers/bluetooth/hci_qca.c | 58 +++++++++++++++++++++++----------
5 files changed, 95 insertions(+), 21 deletions(-)
base-commit: 123b934b63a0bb3f7aa016f640b992406acd4047
--
2.43.0
next reply other threads:[~2026-07-16 8:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 8:47 Li Qiang [this message]
2026-07-16 8:47 ` [PATCH 1/5] Bluetooth: bfusb: validate received block boundaries Li Qiang
2026-07-16 10:29 ` Bluetooth: harden packet and transport parsing bluez.test.bot
2026-07-16 8:47 ` [PATCH 2/5] Bluetooth: btmrvl: validate event packet lengths Li Qiang
2026-07-16 8:47 ` [PATCH 3/5] Bluetooth: hci_bcsp: validate received " Li Qiang
2026-07-16 8:47 ` [PATCH 4/5] Bluetooth: hci_ldisc: reject invalid tty write lengths Li Qiang
2026-07-16 8:47 ` [PATCH 5/5] Bluetooth: hci_qca: validate controller memdump frames Li Qiang
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=cover.1784191283.git.liqiang01@kylinos.cn \
--to=liqiang01@kylinos.cn \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
/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