mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Bluetooth: validate retained LE ISO command lengths
@ 2026-11-02 11:58 Yifan Zhang
  2026-11-02 11:58 ` [PATCH 1/2] Bluetooth: validate retained LE Create CIS command length Yifan Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yifan Zhang @ 2026-11-02 11:58 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, linux-bluetooth
  Cc: Pauli Virtanen, linux-kernel

Two LE ISO event handlers use flexible-array data from the retained command
skb without checking how much command data is present.  A malformed command
can therefore make either handler read beyond the skb when the controller
returns its status or completion event.

Add a saved-command helper that also returns the parameter length, then
use it to validate LE Create CIS and LE Set CIG Parameters commands before
their CIS arrays are accessed.

Yifan Zhang (2):
  Bluetooth: validate retained LE Create CIS command length
  Bluetooth: validate retained LE Set CIG Parameters command length

 include/net/bluetooth/hci_core.h |  2 ++
 net/bluetooth/hci_core.c         | 18 ++++++++++++++----
 net/bluetooth/hci_event.c        | 14 +++++++++++---
 3 files changed, 27 insertions(+), 7 deletions(-)

-- 
2.39.5 (Apple Git-154)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-02 22:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 11:58 [PATCH 0/2] Bluetooth: validate retained LE ISO command lengths Yifan Zhang
2026-11-02 11:58 ` [PATCH 1/2] Bluetooth: validate retained LE Create CIS command length Yifan Zhang
2026-11-02 11:58 ` [PATCH 2/2] Bluetooth: validate retained LE Set CIG Parameters " Yifan Zhang
2026-11-02 22:20 ` [PATCH 0/2] Bluetooth: validate retained LE ISO command lengths patchwork-bot+bluetooth

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®