In the Linux kernel, the following vulnerability has been resolved: 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.
https://git.kernel.org/stable/c/fd56be1b68e9811f710cb0e23989c2bcb352570b
https://git.kernel.org/stable/c/8b9301941835e5415942ab3c666b9d09d9ccfbfc
https://git.kernel.org/stable/c/3448d02cd2ed08f2c42356a435ebfcd7e8313264
https://git.kernel.org/stable/c/1eb52f35fc8fb06ab7f2973fff29cba81f96b947