Bluetooth: mgmt: fix race in read_unconf_index_list()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 73d1df2a7a1036a1f000e5f0ece6ade3e082b854 · < 416546cd6a54e9b68f2b91bc680b1ee17dcd77a1| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: mgmt: fix race in read_unconf_index_list()
read_unconf_index_list() counts unconfigured controllers before allocating its response, then checks the device flags again while filling it.
hci_dev_list_lock stabilizes list membership, but it does not serialize the per-device flags. During asynchronous controller setup, the worker can set HCI_UNCONFIGURED and clear HCI_SETUP between the two passes. A controller omitted from the allocation count can then become eligible for the fill pass, causing an out-of-bounds write to rp->index[].
Allocate space for every device on hci_dev_list. Since list membership cannot change while hci_dev_list_lock is held, the response remains large enough regardless of flag transitions. The reported count and response length still include only eligible unconfigured controllers.
From the CVE record · Linux
The Linux kernel Bluetooth management function read_unconf_index_list() can write beyond its response buffer if controller flags change between counting and filling the response during asynchronous setup. This race can cause an out-of-bounds write; the input does not specify attacker access, authentication, or user-interaction requirements.
Administrators running the Linux kernel should check their installations; affected versions are not specified.