Bluetooth: HIDP: validate numbered report payloads
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0ff1731a1ae51e8e48cd559d70db536281c47f8e · < 27cc0e603355c585f1e5da8398faa4d36d498188| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: HIDP: validate numbered report payloads
When hidp_get_raw_report() waits for a numbered report, hidp_process_data() compares the expected report number with skb->data[0]. A connected HIDP peer can reply with only a DATA transaction header, leaving the skb empty after the header is removed.
KMSAN reports an uninitialized-value use in hidp_session_run(), with the value originating in __alloc_skb() through vhci_write(). The transaction header checks remove the empty-frame reports, but this report remains until the payload check is added.
The comparison can also consume a peer-controlled byte beyond the declared L2CAP PDU. A DATA | FEATURE response followed by an extra 0x01 byte made the current code accept that byte as report ID 1 and complete HIDIOCGFEATURE with a zero-byte result. With this change the malformed response is rejected with -EIO, while a subsequent valid response still succeeds.
Require a payload byte before comparing a numbered report ID. Unnumbered reports continue to accept an empty payload.
From the CVE record · Linux
The Linux kernel’s Bluetooth HIDP code does not check that a numbered report has a payload byte before reading its report ID. A connected HIDP peer can send a header-only response that triggers an uninitialized-value read, or a malformed response that is accepted as a zero-byte feature report. The peer must be connected; the input does not specify additional authentication or user interaction.
Engineers running Linux kernels with Bluetooth HIDP should check their installations; affected versions are not specified.