-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed as not planned
Closed as not planned
Bluetooth: HCI: Handle truncated packets in hci_le_big_complete and hci_le_big_sync_established#80597
Bug
Copy link
Labels
Stalearea: Bluetootharea: Bluetooth HCIBluetooth HCI DriverBluetooth HCI Driverarea: Bluetooth ISOBluetooth LE Isochronous ChannelsBluetooth LE Isochronous ChannelsbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
In the function hci_le_big_complete and hci_le_big_sync_established,
SYS_SLIST_FOR_EACH_CONTAINER(&big->bis_channels, bis, node) {
const uint16_t handle = evt->handle[i++];
struct bt_conn *iso_conn = bis->iso;
iso_conn->handle = sys_le16_to_cpu(handle);
store_bis_broadcaster_info(evt, &iso_conn->iso.info);
bt_conn_set_state(iso_conn, BT_CONN_CONNECTED);
}
It appears that there’s no handling for cases where the evt message might be truncated.
I believe that check should be added to verify that the number of evt->handle entries matches the number of bis_channels.
It doesn't seem to be a security issue, but improving it would help prevent bugs.
Metadata
Metadata
Assignees
Labels
Stalearea: Bluetootharea: Bluetooth HCIBluetooth HCI DriverBluetooth HCI Driverarea: Bluetooth ISOBluetooth LE Isochronous ChannelsBluetooth LE Isochronous ChannelsbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug