{"id":"CVE-2026-23178","state":"PUBLISHED","title":"HID: i2c-hid: fix potential buffer overflow in i2c_hid_get_report()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: i2c-hid: fix potential buffer overflow in i2c_hid_get_report()\n\n`i2c_hid_xfer` is used to read `recv_len + sizeof(__le16)` bytes of data\ninto `ihid->rawbuf`.\n\nThe former can come from the userspace in the hidraw driver and is only\nbounded by HID_MAX_BUFFER_SIZE(16384) by default (unless we also set\n`max_buffer_size` field of `struct hid_ll_driver` which we do not).\n\nThe latter has size determined at runtime by the maximum size of\ndifferent report types you could receive on any particular device and\ncan be a much smaller value.\n\nFix this by truncating `recv_len` to `ihid->bufsize - sizeof(__le16)`.\n\nThe impact is low since access to hidraw devices requires root.","publishedAt":"2026-02-14T16:27:10.108Z","updatedAt":"2026-10-19T18:25:34.295Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"85df713377ddc0482071c3e6b64c37bd1e48f1f1","status":"affected","lessThan":"f9c9ad89d845f88a1509e9d672f65d234425fde9","versionType":"git"},{"version":"85df713377ddc0482071c3e6b64c37bd1e48f1f1","status":"affected","lessThan":"cff3f619fd1cb40cdd89971df9001f075613d219","versionType":"git"},{"version":"85df713377ddc0482071c3e6b64c37bd1e48f1f1","status":"affected","lessThan":"786ec171788bdf9dda38789163f1b1fbb47f2d1e","versionType":"git"},{"version":"85df713377ddc0482071c3e6b64c37bd1e48f1f1","status":"affected","lessThan":"2124279f1f8c32c1646ce98e75a1a39b23b7db76","versionType":"git"},{"version":"85df713377ddc0482071c3e6b64c37bd1e48f1f1","status":"affected","lessThan":"2497ff38c530b1af0df5130ca9f5ab22c5e92f29","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/i2c-hid/i2c-hid-core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.18","versionType":"semver"},{"version":"6.1.163","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.124","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.70","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.10","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/i2c-hid/i2c-hid-core.c"]}],"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"],"weaknesses":["CWE-122"],"ingestedAt":"2026-10-29T20:11:21.040Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/23xxx/CVE-2026-23178.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-23178","state":"PUBLISHED","datePublished":"2026-02-14T16:27:10.108Z","dateUpdated":"2026-10-19T18:25:34.295Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-01-13T15:37:45.984Z"},"containers":{"cna":{"title":"HID: i2c-hid: fix potential buffer overflow in i2c_hid_get_report()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: i2c-hid: fix potential buffer overflow in i2c_hid_get_report()\n\n`i2c_hid_xfer` is used to read `recv_len + sizeof(__le16)` bytes of data\ninto `ihid->rawbuf`.\n\nThe former can come from the userspace in the hidraw driver and is only\nbounded by HID_MAX_BUFFER_SIZE(16384) by default (unless we also set\n`max_buffer_size` field of `struct hid_ll_driver` which we do not).\n\nThe latter has size determined at runtime by the maximum size of\ndifferent report types you could receive on any particular device and\ncan be a much smaller value.\n\nFix this by truncating `recv_len` to `ihid->bufsize - sizeof(__le16)`.\n\nThe impact is low since access to hidraw devices requires root."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"85df713377ddc0482071c3e6b64c37bd1e48f1f1","status":"affected","lessThan":"f9c9ad89d845f88a1509e9d672f65d234425fde9","versionType":"git"},{"version":"85df713377ddc0482071c3e6b64c37bd1e48f1f1","status":"affected","lessThan":"cff3f619fd1cb40cdd89971df9001f075613d219","versionType":"git"},{"version":"85df713377ddc0482071c3e6b64c37bd1e48f1f1","status":"affected","lessThan":"786ec171788bdf9dda38789163f1b1fbb47f2d1e","versionType":"git"},{"version":"85df713377ddc0482071c3e6b64c37bd1e48f1f1","status":"affected","lessThan":"2124279f1f8c32c1646ce98e75a1a39b23b7db76","versionType":"git"},{"version":"85df713377ddc0482071c3e6b64c37bd1e48f1f1","status":"affected","lessThan":"2497ff38c530b1af0df5130ca9f5ab22c5e92f29","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/i2c-hid/i2c-hid-core.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.18","versionType":"semver"},{"version":"6.1.163","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.124","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.70","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.10","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/i2c-hid/i2c-hid-core.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/f9c9ad89d845f88a1509e9d672f65d234425fde9"},{"url":"https://git.kernel.org/stable/c/cff3f619fd1cb40cdd89971df9001f075613d219"},{"url":"https://git.kernel.org/stable/c/786ec171788bdf9dda38789163f1b1fbb47f2d1e"},{"url":"https://git.kernel.org/stable/c/2124279f1f8c32c1646ce98e75a1a39b23b7db76"},{"url":"https://git.kernel.org/stable/c/2497ff38c530b1af0df5130ca9f5ab22c5e92f29"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is triggered through the hidraw ioctl interface (/dev/hidrawN), requiring local system access to open the device file and issue an ioctl. I2C-HID devices are locally attached hardware (touchpads, touchscreens).\nAC:L - The attacker simply opens a hidraw device and issues a HIDIOCGFEATURE/HIDIOCGINPUT ioctl with a large size parameter. No race condition, special memory layout, or non-default configuration is needed to trigger the overflow.\nPR:L - While hidraw devices default to 0600 root:root, on desktop Linux systems with systemd/logind, udev uaccess rules grant some hidraw device access to the physically logged-in user without root privileges. On shared workstations or kiosks, a non-root user could trigger this.\nUI:N - No user interaction is required. The attacker opens the hidraw device file and issues the ioctl directly.\nS:U - The vulnerability is in the kernel and the impact (heap corruption) affects the kernel itself. No security boundary crossing (like VM escape) occurs.\nC:H - This is a heap buffer overflow of up to ~16KB past the allocated buffer. Heap corruption of this magnitude can be leveraged to read adjacent kernel heap objects, potentially disclosing sensitive kernel memory.\nI:H - The out-of-bounds write corrupts adjacent kernel heap objects. While the overflow content comes from the I2C device rather than being directly attacker-controlled, a 16KB heap overflow can corrupt critical kernel data structures, potentially enabling code execution through heap grooming techniques.\nA:H - A heap buffer overflow of up to ~16KB will corrupt adjacent kernel heap objects, reliably causing kernel crashes (oops/panic) from corrupted metadata or invalid pointer dereferences."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:20:29.229Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.1.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.6.124"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.12.70"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.18.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.19"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-23178","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T15:06:40.043320Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-122","lang":"en","type":"CWE","description":"CWE-122 Heap-based Buffer Overflow"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T18:25:34.295Z"}}]}}}