CVE-2026-90000
largeHeap out-of-bounds read/write in Linux kernel hid-rmi driver via undersized RMI reports
The Linux kernel's hid-rmi driver (Synaptics RMI4 over HID) sizes its report buffers purely from the HID report descriptor the device declares, with no minimum bound, and then writes fixed offsets and device-controlled copy lengths into them, producing heap out-of-bounds writes, out-of-bounds reads past the allocation into adjacent slab objects, and a probe loop that never terminates when a device answers with zero-length replies. Triggering requires only a device bound to hid-rmi with undersized reports: even an honest device declaring an input report smaller than 23 bytes makes the fixed 21-byte F01 register read run out of bounds, while a malicious or compromised HID device (touchpad, dock, USB adapter) with lying descriptors fully controls the overflow lengths. An attacker gains kernel heap corruption (potential local privilege escalation), leakage of heap bytes to unprivileged userspace via the world-readable (mode 0444) sysfs product id attribute and to the device itself via the interrupt mask, or a denial of service by wedging the probe worker while it holds page_mutex. Affected are Linux systems where hid-rmi binds, chiefly machines with Synaptics RMI4-over-HID touchpads or touchscreens; the CVSSv3.1 score is 8.8 (AV:A/AC:L/PR:N/UI:N/C:H/I:H/A:H), reflecting an attacker with adjacent access to the connected HID device. No in-the-wild exploitation, public PoC, or CISA KEV listing is known; the fix rejects too-small reports at probe time (minimum 6 output / 3 input bytes), clamps the read and write copies, treats zero-length replies as errors, and falls rejected devices back to ordinary HID operation.
What to do: Update to a kernel containing the upstream hid-rmi fix (minimum 6 output / 3 input report bytes at probe, clamped read/write copies, zero-length replies treated as errors); the fixed release numbers are not given in the source data, so track your distribution's kernel advisory or backport the commit. Until patched, avoid untrusted USB/HID peripherals and check kernel logs for hid-rmi binding to unexpected devices; on patched systems an undersized RMI device simply falls back to plain HID operation.
| Linux kernel - HID rmi driver (drivers/hid/hid-rmi.c) | — |
| Synaptics RMI4 touchpads/touchscreens connected over HID (devices bound to hid-rmi); any HID device declaring the RMI report IDs c | no specific version range; any such device declaring an input report smaller than 23 bytes triggers the out-of-bounds read even when it responds truthfully |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
In the Linux kernel, the following vulnerability has been resolved: HID: rmi: fix OOB access with undersized RMI reports The hid-rmi driver sizes its writeReport/readReport buffer purely from the report descriptor supplied by the device, with no minimum bound: data->input_report_size = hid_report_len(input_report); data->output_report_size = hid_report_len(output_report); alloc_size = data->output_report_size + data->input_report_size; data->writeReport = devm_kzalloc(&hdev->dev, alloc_size, GFP_KERNEL); data->readReport = data->writeReport + data->output_report_size; but then reads and writes fixed offsets into it. A device declaring a 1-byte output and a 1-byte input report makes hid_report_len() return 2 for each, so alloc_size is 4, while rmi_set_page() -- reached unconditionally at probe time through rmi_input_configured() -- stores writeReport[4] and rmi_hid_read_block() stores writeReport[0..5]. Since readReport lives at writeReport + output_report_size, those stores also corrupt the window the next reply is parsed out of. The read path is worse: the copy length comes from readReport[1], which the device fills in and can be up to 255, and the copy starts at &readReport[2] with no regard for input_report_size, so it runs past the end of the allocation into adjacent slab objects. This does not even need a lying device -- rmi_f01_probe() issues a fixed 21-byte register read, so any device declaring an input report smaller than 23 bytes reads out of bounds even when it answers truthfully. Those bytes become the register values the RMI core acts on: rmi_f01_probe() prints them to the kernel log as the product id and exports them through the mode 0444 sysfs attribute of the same name, and rmi_driver_set_irq_bits() sends them back to the device as the interrupt mask, so an undersized report descriptor leaks heap contents both to unprivileged userspace and to the device itself. The write path has no bound either: rmi_hid_write_block() copies an unbounded len to &writeReport[4], and the largest caller a device can drive at probe time is rmi_driver_set_irq_bits(), whose length is derived from the interrupt source counts the device declares in its Page Description Table. Finally, the read loop cannot terminate on a zero-length reply: such a reply copies nothing and advances neither bytes_read nor bytes_needed, and because a reply did arrive the one second wait_event_timeout() does not fire either, so a device answering 0 forever keeps the loop running inside the probe worker with page_mutex held. khungtaskd does not notice, because every reply wakes the task. Reject reports too small for what the driver builds -- 6 output bytes for the write reports and 3 input bytes for the read handshake -- at probe time, clamp the write and the read copy to the report sizes the device declared, and treat a zero-length reply as an error. A device refused this way is started as an ordinary HID device, like one that does not carry the RMI report ids at all. RMI_DEVICE must not be left set in device_flags on that path, because rmi_input_configured() would then run the RMI setup and reach rmi_set_page(), which writes the writeReport buffer the refusal just skipped allocating. The bit can arrive set: rmi_probe() copies id->driver_data into device_flags before the report checks, and a bind through the new_id sysfs attribute can supply driver_data with RMI_DEVICE (BIT(0)) set. Strip the bit where driver_data is copied, so RMI_DEVICE keeps meaning exactly "this probe validated the reports"; the three jumps to start that predate this patch are covered as well. The error path also clears RMI_READ_DATA_PENDING on its way out, because that flag is what the wait at the top of the loop tests: leaving it set would make every later wait_event_timeout() return immediately on the stale reply and kill the read path for the rest of the device's life. Clamping does not regress working hardware: the read loop already handles ---truncated---
- Vector
- CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.