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

HID: pidff: fix OOB write when hid->inputs is empty

hid_pidff_init_with_quirks() derives its input_dev from

list_entry(hid->inputs.next, struct hid_input, list)

without first checking that hid->inputs is non-empty. The list member
of struct hid_input is at offset 0, so on an empty list list_entry()
yields &hid->inputs itself and the following hidinput->input load reads
an unrelated member of struct hid_device. dev is then a type-confused
pointer, and force-feedback init writes through it: each
set_bit(FF_*, dev->ffbit) stores 8 bytes at dev + 192, past the end of
the object dev actually aliases, and input_ff_create() adds further
writes of a heap pointer and two function pointers.

Until hid-universal-pidff the only caller was hid_pidff_init() from
usbhid, which runs under HID_CLAIMED_INPUT and therefore always has at
least one hid_input. universal_pidff_probe() starts the device with
HID_CONNECT_DEFAULT & ~HID_CONNECT_FF and then calls
hid_pidff_init_with_quirks() directly whenever the descriptor carries a
PID usage page, bypassing that gate. A report descriptor whose only
application collection is on HID_UP_PID leaves hid->inputs empty while
hid_connect() still succeeds through the hidraw claim, so probe reaches
the unguarded list_entry().

The write happens in the USB probe path, on the hotplug workqueue, so
plugging in a malicious device is enough to trigger it; no attacker
software and no logged-in user are required. KASAN reports an 8-byte
out-of-bounds write in hid_pidff_init_with_quirks() reached from
universal_pidff_probe().

Check for an empty list before deriving dev and return -ENODEV, as the
other HID force-feedback drivers already do. universal_pidff_probe()
propagates the error and unwinds.

Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com>
Published: 2026-09-04
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The HID force‑feedback driver (pidff) on Linux contains an out‑of‑bounds write path in the initialization function hid_pidff_init_with_quirks(). The routine derives a device structure pointer from an empty input list without validation, causing set_bit calls to overwrite memory beyond the object. The write occurs during device probe on the USB hotplug workqueue, with no need for user interaction. If triggered, the corruption can lead to arbitrary kernel memory overwrite, potentially granting an attacker privilege escalation or causing a kernel panic.

Affected Systems

The flaw resides in the Linux kernel's HID subsystem, affecting all kernel releases that include the pidff driver. Since the commit references indicate the issue was present until a patch was applied, any distribution running an unpatched kernel is vulnerable. The published references point to multiple kernel commits, indicating the fix was merged after the vulnerability was disclosed, but the specific version is not listed, so the safest assumption is that all kernels prior to the commit remain affected.

Risk and Exploitability

No EPSS score is published and the vulnerability is not listed in the CISA KEV catalog. Nevertheless, an attacker only needs to plug a malicious USB HID device that uses the PID usage page and an application collection without inputs, a scenario that can be executed by a local player with physical access. The resulting out‑of‑bounds write could crash the kernel or enable privilege escalation, giving the attacker full control of the system. Patch deployment is the only definitive protection.

Generated by OpenCVE AI on September 4, 2026 at 17:05 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the pidff OOB write fix (commit 2e0471bf3ab2a6b7 or later).
  • If a kernel update is not immediately possible, block or disable HID PID force‑feedback devices that use the PID usage page and no input collection, for example by configuring udev rules or USB device authorization to reject such devices.
  • After updating, monitor kernel logs for KASAN out‑of‑bounds warnings or kernel panics; investigate any such events to ensure the vulnerability is fully mitigated.

Generated by OpenCVE AI on September 4, 2026 at 17:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 17:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-789

Fri, 04 Sep 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: HID: pidff: fix OOB write when hid->inputs is empty hid_pidff_init_with_quirks() derives its input_dev from list_entry(hid->inputs.next, struct hid_input, list) without first checking that hid->inputs is non-empty. The list member of struct hid_input is at offset 0, so on an empty list list_entry() yields &hid->inputs itself and the following hidinput->input load reads an unrelated member of struct hid_device. dev is then a type-confused pointer, and force-feedback init writes through it: each set_bit(FF_*, dev->ffbit) stores 8 bytes at dev + 192, past the end of the object dev actually aliases, and input_ff_create() adds further writes of a heap pointer and two function pointers. Until hid-universal-pidff the only caller was hid_pidff_init() from usbhid, which runs under HID_CLAIMED_INPUT and therefore always has at least one hid_input. universal_pidff_probe() starts the device with HID_CONNECT_DEFAULT & ~HID_CONNECT_FF and then calls hid_pidff_init_with_quirks() directly whenever the descriptor carries a PID usage page, bypassing that gate. A report descriptor whose only application collection is on HID_UP_PID leaves hid->inputs empty while hid_connect() still succeeds through the hidraw claim, so probe reaches the unguarded list_entry(). The write happens in the USB probe path, on the hotplug workqueue, so plugging in a malicious device is enough to trigger it; no attacker software and no logged-in user are required. KASAN reports an 8-byte out-of-bounds write in hid_pidff_init_with_quirks() reached from universal_pidff_probe(). Check for an empty list before deriving dev and return -ENODEV, as the other HID force-feedback drivers already do. universal_pidff_probe() propagates the error and unwinds. Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com>
Title HID: pidff: fix OOB write when hid->inputs is empty
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-04T15:12:52.009Z

Reserved: 2026-08-26T14:34:25.792Z

Link: CVE-2026-80780

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-04T16:18:03.723

Modified: 2026-09-04T16:18:03.723

Link: CVE-2026-80780

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-04T20:00:06Z

Weaknesses
  • CWE-789

    Memory Allocation with Excessive Size Value