Bluetooth: HIDP: fix missing length checks in hidp_input_report()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < b83dcacd2ec7fcc5a48be215f82d573759f87ec2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: HIDP: fix missing length checks in hidp_input_report()
hidp_input_report() reads keyboard and mouse payload data from an skb without first verifying that skb->len contains enough data.
hidp_recv_intr_frame() pulls the 1-byte HIDP header before dispatching to hidp_input_report(). If a paired device sends a truncated packet, the handler reads beyond the valid skb data, resulting in an out-of-bounds read of skb data. The OOB bytes may be interpreted as phantom key presses or spurious mouse movement.
Replace the open-coded length tracking and pointer arithmetic with skb_pull_data() calls. skb_pull_data() returns NULL if the requested bytes are not present, eliminating the need for a manual size variable and the separate skb->len guard.
From the CVE record · Linux
The Linux kernel’s Bluetooth HIDP input report handler does not check that a packet contains enough keyboard or mouse data. A paired device can send a truncated packet that causes an out-of-bounds read, potentially producing phantom key presses or spurious mouse movement.
Engineers running Linux kernels with Bluetooth HIDP should check whether their kernel includes the fix; affected versions were not specified.