Bluetooth: hci_event: Fix OOB read and infinite loop in hci_le_create_big_complete_evt
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
b475c1109251e30ec21fb574d72a1c71a4ab0039| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hci_event: Fix OOB read and infinite loop in hci_le_create_big_complete_evt
hci_le_create_big_complete_evt() iterates over BT_BOUND connections for a BIG handle using a while loop, accessing ev->bis_handle[i++] on each iteration. However, there is no check that i stays within ev->num_bis before the array access.
When a controller sends a LE_Create_BIG_Complete event with fewer bis_handle entries than there are BT_BOUND connections for that BIG, or with num_bis=0, the loop reads beyond the valid bis_handle[] flex array into adjacent heap memory. Since the out-of-bounds values typically exceed HCI_CONN_HANDLE_MAX (0x0EFF), hci_conn_set_handle() rejects them and the connection remains in BT_BOUND state. The same connection is then found again by hci_conn_hash_lookup_big_state(), creating an infinite loop with hci_dev_lock held.
Fix this by terminating the BIG if in case not all BIS could be setup properly.
From the CVE record · Linux
The Linux kernel's Bluetooth hci_le_create_big_complete_evt() can read beyond the valid bis_handle array. If a controller sends a LE_Create_BIG_Complete event with fewer BIS handles than bound connections for that BIG, or with num_bis=0, the handler can enter an infinite loop while holding hci_dev_lock.
Engineers running Linux kernels with the affected Bluetooth handler should check their kernel versions against the vendor advisory; affected versions were not provided.