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

Published Feb 14, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

HID: i2c-hid: fix potential buffer overflow in i2chidgetreport()

i2chidxfer is used to read recvlen + sizeof(le16) bytes of data into ihid->rawbuf.

The former can come from the userspace in the hidraw driver and is only bounded by HIDMAXBUFFERSIZE(16384) by default (unless we also set maxbuffersize field of struct hidlldriver 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 recvlen to ihid->bufsize - sizeof(le16).

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

Affected Software

2 affected componentsFixes available
Linux Linux kernel (i2c-hid)
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1
  2. Compensating control

    In the Linux kernel HID i2c-hid implementation, truncate recv_len to ihid->bufsize - sizeof(__le16) before i2c_hid_xfer reads recv_len + sizeof(__le16) bytes into ihid->rawbuf.

Event History

Feb 14, 2026
CVE Published
via MITRE·04:27 PM
Data Sourced
via MITRE·04:27 PM
DescriptionSeverity
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

Who can exploit this issue in practice?

Exploitation requires access to a hidraw device, which requires root access. The described impact is therefore low for systems where untrusted users do not have root-level access.

2

What input triggers the overflow condition?

A userspace caller through the hidraw driver can supply recv_len up to the default HID_MAX_BUFFER_SIZE of 16384 bytes. For an affected I2C HID device, the allocated raw buffer may be smaller because its size is based on the device's maximum report sizes, allowing the requested read plus the two-byte length field to exceed that buffer.

3

What does the fix change?

The fix limits recv_len to ihid->bufsize minus sizeof(__le16), ensuring that the transfer length, including the length field, cannot exceed ihid->rawbuf.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203