# CVE-2026-23178: HID: i2c-hid: fix potential buffer overflow in i2c_hid_get_report()

- 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.19%, higher than 9% of CVEs (2026-12-01)
- Published: 2026-02-14T16:27:10.108Z
- Modified: 2026-10-19T19:17:40.423Z
- Weaknesses: CWE-122
- 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: i2c-hid: fix potential buffer overflow in i2c_hid_get_report()

`i2c_hid_xfer` is used to read `recv_len + sizeof(__le16)` bytes of data
into `ihid->rawbuf`.

The former can come from the userspace in the hidraw driver and is only
bounded by HID_MAX_BUFFER_SIZE(16384) by default (unless we also set
`max_buffer_size` field of `struct hid_ll_driver` which we do not).

The latter has size determined at runtime by the maximum size of
different report types you could receive on any particular device and
can be a much smaller value.

Fix this by truncating `recv_len` to `ihid->bufsize - sizeof(__le16)`.

The impact is low since access to hidraw devices requires root.

(As written by CVE List.)

## Affected

- Linux Linux: from 85df713377ddc0482071c3e6b64c37bd1e48f1f1 before f9c9ad89d845f88a1509e9d672f65d234425fde9; from 85df713377ddc0482071c3e6b64c37bd1e48f1f1 before cff3f619fd1cb40cdd89971df9001f075613d219; from 85df713377ddc0482071c3e6b64c37bd1e48f1f1 before 786ec171788bdf9dda38789163f1b1fbb47f2d1e; from 85df713377ddc0482071c3e6b64c37bd1e48f1f1 before 2124279f1f8c32c1646ce98e75a1a39b23b7db76; from 85df713377ddc0482071c3e6b64c37bd1e48f1f1 before 2497ff38c530b1af0df5130ca9f5ab22c5e92f29; 5.18 (not affected: before 5.18; from 6.1.163 up to 6.1.*; from 6.6.124 up to 6.6.*; from 6.12.70 up to 6.12.*; from 6.18.10 up to 6.18.*; from 6.19 up to *)

## References

- <https://git.kernel.org/stable/c/f9c9ad89d845f88a1509e9d672f65d234425fde9>
- <https://git.kernel.org/stable/c/cff3f619fd1cb40cdd89971df9001f075613d219>
- <https://git.kernel.org/stable/c/786ec171788bdf9dda38789163f1b1fbb47f2d1e>
- <https://git.kernel.org/stable/c/2124279f1f8c32c1646ce98e75a1a39b23b7db76>
- <https://git.kernel.org/stable/c/2497ff38c530b1af0df5130ca9f5ab22c5e92f29>

## Sources

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

---

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