HID: bpf: prevent buffer overflow in hid_hw_request
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
HID: bpf: prevent buffer overflow in hid_hw_request
right now the returned value is considered to be always valid. However, when playing with HID-BPF, the return value can be arbitrary big, because it's the return value of dispatch_hid_bpf_raw_requests(), which calls the struct_ops and we have no guarantees that the value makes sense.
From the CVE record · Linux
The Linux kernel's HID-BPF hid_hw_request trusts a return value that can be arbitrarily large, potentially causing a buffer overflow. This can occur when a HID-BPF struct_ops call returns an oversized value; the input does not specify the access or authentication an attacker would need.
Engineers running Linux kernels with HID-BPF should check their versions; affected versions are not specified.