CVE-2026-64367

HID: hid-goodix-spi: validate report size to prevent stack buffer overflow

Published Jul 25, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

HID: hid-goodix-spi: validate report size to prevent stack buffer overflow

goodix_hid_set_raw_report() builds a protocol frame in a 128-byte stack
buffer (tmp_buf), writing an 11-12 byte header followed by the
caller-supplied report data. The HID core caps report size at
HID_MAX_BUFFER_SIZE (16384) by default, while the driver does not set
hid_ll_driver.max_buffer_size and performs no bounds checking before
copying the payload:

memcpy(tmp_buf + tx_len, buf, len);

A hidraw SET_REPORT ioctl with a report larger than ~116 bytes
overflows the stack buffer.

Add a size check after constructing the header, rejecting reports that
would exceed the buffer capacity.

Discovered by Atuin - Automated Vulnerability Discovery Engine.

Analysis

AI-generated

Technical impact

A stack buffer overflow in the Linux kernel’s hid-goodix-spi driver occurs when it copies user‑supplied HID report data into a 128‑byte stack buffer without validating the payload size. If an attacker sends a report larger than about 116 bytes via the hidraw SET_REPORT ioctl, the overflow can corrupt the kernel stack, potentially allowing execution of arbitrary code with kernel privileges. This flaw is a classic buffer‑overflow weakness that can compromise the entire system and is included in the kernel driver, making its impact widespread if exploited.

Affected Systems

All Linux kernel releases that ship with the hid-goodix-spi driver are affected, as the issue is located within the driver’s core code. The vulnerability is not tied to a specific kernel version in the provided data, so it applies to any kernel using this driver until the patch is applied.

Risk and Exploitability

The CVSS score of 7.8 indicates a high severity, while the EPSS score indicates a very low probability of exploitation (<1%). The flaw is not listed in the CISA KEV catalog. Nevertheless, because the flaw can lead to kernel‑level code execution, the potential impact is high. The likely attack vector is a malicious or compromised HID device that sends a large report over USB. Exploitation requires the device to trigger the offending ioctl, which can be achieved by a user with local access or by remotely installing a malicious HID device.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply an updated Linux kernel that includes the patched hid-goodix-spi driver, which adds a size check to prevent the overflow.
  • If a kernel update is not immediately possible, disable the hid-goodix-spi driver or remove the HID device from the system to eliminate the attack surface.
  • As an additional precaution, restrict HID device access on the host using tools such as UsbGuard or kernel udev rules so that only trusted devices can invoke the hidraw interface.

Generated by OpenCVE AI on September 4, 2026 at 23:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4724-1 linux-6.12 new package
Ubuntu USN Ubuntu USN USN-8726-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8727-1 Linux kernel (OEM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8760-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-2 Linux kernel (Raspberry Pi) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-3 Linux kernel (IBM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8800-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8760-2 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8726-4 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-787
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Weaknesses CWE-120
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: HID: hid-goodix-spi: validate report size to prevent stack buffer overflow goodix_hid_set_raw_report() builds a protocol frame in a 128-byte stack buffer (tmp_buf), writing an 11-12 byte header followed by the caller-supplied report data. The HID core caps report size at HID_MAX_BUFFER_SIZE (16384) by default, while the driver does not set hid_ll_driver.max_buffer_size and performs no bounds checking before copying the payload: memcpy(tmp_buf + tx_len, buf, len); A hidraw SET_REPORT ioctl with a report larger than ~116 bytes overflows the stack buffer. Add a size check after constructing the header, rejecting reports that would exceed the buffer capacity. Discovered by Atuin - Automated Vulnerability Discovery Engine.
Title HID: hid-goodix-spi: validate report size to prevent stack buffer overflow
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-120

    Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

  • CWE-787

    Out-of-bounds Write

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Aug 17, 2026, 4:54 AM
Reserved
Jul 19, 2026, 3:36 PM
Status
Analyzed
Published
Jul 25, 2026, 10:17 AM
Modified
Sep 4, 2026, 8:41 PM
Severity
Moderate
Public date
Jul 25, 2026, 12:00 AM