Bluetooth: hci: validate codec capability element length
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8961987f3f5fa2f2618e72304d013c8dd5e604a6 · < c38fbcdc407925c7088f7e5f11c1fff73d2d35a2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: hci: validate codec capability element length
Read Local Codec Capabilities returns a sequence of capability elements. Each element starts with a one-byte length followed by that many payload bytes.
hci_read_codec_capabilities() checks that the skb contains the length byte, but then validates only caps->len against the remaining skb length. A malformed controller response with one remaining byte and caps->len set to one passes that check even though the element needs two bytes. The parser then records a two-byte capability and copies one byte beyond the advertised response payload into the codec list.
Validate the full element size, including the length byte, before adding it to the accumulated capability length. This preserves all well-formed capability elements and drops only truncated controller responses.
From the CVE record · Linux
The Linux kernel’s Bluetooth HCI codec capability parser does not validate the full length of a capability element. A malformed controller response can cause it to copy one byte beyond the advertised response payload; the input does not establish an attack route, authentication requirement, or user-interaction requirement.
Engineers running Linux kernels with the affected Bluetooth HCI codec capability parser should check their kernel version; affected versions are not specified.