# CVE-2026-31401: HID: bpf: prevent buffer overflow in hid_hw_request

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2026-04-03T15:16:04.903Z
- Modified: 2026-10-19T19:17:51.193Z
- Weaknesses: CWE-120, CWE-787
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 8bd0488b5ea58655ad6fdcbe0408ef49b16882b1 before d6efaa50af62fb0790dd1fd4e7e5506b46312510; from 8bd0488b5ea58655ad6fdcbe0408ef49b16882b1 before 73c5b5aea1c443239c8cb4191b4af7a4bd6fd7b1; from 8bd0488b5ea58655ad6fdcbe0408ef49b16882b1 before eb57dae20fdf6f3069cdc07821fa3bb46de381d7; from 8bd0488b5ea58655ad6fdcbe0408ef49b16882b1 before 2b658c1c442ec1cd9eec5ead98d68662c40fe645; 6.11 (not affected: before 6.11; from 6.12.78 up to 6.12.*; from 6.18.20 up to 6.18.*; from 6.19.10 up to 6.19.*; from 7.0 up to *)
- linux linux_kernel: from 6.11 before 6.12.78; from 6.13 before 6.18.20; from 6.19 before 6.19.10; 7.0

## References

- <https://git.kernel.org/stable/c/d6efaa50af62fb0790dd1fd4e7e5506b46312510> (patch)
- <https://git.kernel.org/stable/c/73c5b5aea1c443239c8cb4191b4af7a4bd6fd7b1> (patch)
- <https://git.kernel.org/stable/c/eb57dae20fdf6f3069cdc07821fa3bb46de381d7> (patch)
- <https://git.kernel.org/stable/c/2b658c1c442ec1cd9eec5ead98d68662c40fe645> (patch)

## Sources

- CVE List: [CVE-2026-31401](https://www.cve.org/CVERecord?id=CVE-2026-31401), CVE Terms of Use, modified 2026-10-19
- NVD: [CVE-2026-31401](https://nvd.nist.gov/vuln/detail/CVE-2026-31401), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2026-31401 · Whole record: https://cve.day/CVE-2026-31401.json · Rebuilt by cve.day 2026-11-25T22:59:17.905Z
