Skip to content
Heist/ feed
Back to feed
HighFix available

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

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.163, 6.12.70, 6.18.10, 6.6.124
CVEs
CVE-2026-23178
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 19:08 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 14 Feb 2026, 16:27 UTC

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.

osv:CVE-2026-23178

Kernel

Fixed versions: 6.1.163, 6.6.124, 6.12.70, 6.18.10

Complete source record
{
  "id": "bc75c85926eacc3290b4d7175c4d4ce2b212e9da7fc7bfec2c833bc6d80ad114",
  "url": "https://osv.dev/vulnerability/CVE-2026-23178",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "HID: i2c-hid: fix potential buffer overflow in i2c_hid_get_report()",
    "summary": "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.",
    "evidence": "osv:CVE-2026-23178",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.163",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.124",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.70",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.10",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-23178",
      "aliases": [
        "CVE-2026-23178"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "85df713377ddc0482071c3e6b64c37bd1e48f1f1"
                },
                {
                  "fixed": "f9c9ad89d845f88a1509e9d672f65d234425fde9"
                },
                {
                  "fixed": "cff3f619fd1cb40cdd89971df9001f075613d219"
                },
                {
                  "fixed": "786ec171788bdf9dda38789163f1b1fbb47f2d1e"
                },
                {
                  "fixed": "2124279f1f8c32c1646ce98e75a1a39b23b7db76"
                },
                {
                  "fixed": "2497ff38c530b1af0df5130ca9f5ab22c5e92f29"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23178.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.18.0"
                },
                {
                  "fixed": "6.1.163"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.124"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.70"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.10"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23178.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.401407325Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/2124279f1f8c32c1646ce98e75a1a39b23b7db76",
        "https://git.kernel.org/stable/c/2497ff38c530b1af0df5130ca9f5ab22c5e92f29",
        "https://git.kernel.org/stable/c/786ec171788bdf9dda38789163f1b1fbb47f2d1e",
        "https://git.kernel.org/stable/c/cff3f619fd1cb40cdd89971df9001f075613d219",
        "https://git.kernel.org/stable/c/f9c9ad89d845f88a1509e9d672f65d234425fde9",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23178.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-23178",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23178.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-23178",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 498627,
  "published_at": "2026-02-14T16:27:10.108+00:00"
}