diff options
| author | Yifan Zhang <yfzhang23@stu.pku.edu.cn> | 2026-11-02 19:58:37 +0800 |
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2026-11-02 17:09:03 -0500 |
| commit | 1eb52f35fc8fb06ab7f2973fff29cba81f96b947 (patch) | |
| tree | c2e847bfc78c955f52a942c52c6da030f7b89a84 /include/uapi | |
| parent | a7c5c18b7cc30dcd2a9ae5a0fb38378d3998417e (diff) | |
Bluetooth: validate retained LE Create CIS command length
hci_cs_le_create_cis() retrieves the parameters of the previously sent
command without their length. It then trusts num_cis and walks the
flexible cis[] array when a controller reports a failed command.
A five-byte HCI command containing only num_cis can therefore make the
handler read beyond the command skb. KASAN reports:
BUG: KASAN: slab-out-of-bounds in hci_cs_le_create_cis
Read of size 2
hci_cs_le_create_cis
hci_cmd_status_evt
hci_event_packet
Add a length-returning saved-command helper and require the fixed header
and complete CIS array before walking it.
The reproducer no longer triggers a KASAN report with this change.
Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections")
Closes: https://lore.kernel.org/linux-bluetooth/179317462624.87574.6271582002629080499@stu.pku.edu.cn/
Signed-off-by: Yifan Zhang <yfzhang23@stu.pku.edu.cn>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions
