CVE-2026-90000
Publication date:
16/09/2026
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
HID: rmi: fix OOB access with undersized RMI reports<br />
<br />
The hid-rmi driver sizes its writeReport/readReport buffer purely from<br />
the report descriptor supplied by the device, with no minimum bound:<br />
<br />
data->input_report_size = hid_report_len(input_report);<br />
data->output_report_size = hid_report_len(output_report);<br />
alloc_size = data->output_report_size + data->input_report_size;<br />
data->writeReport = devm_kzalloc(&hdev->dev, alloc_size, GFP_KERNEL);<br />
data->readReport = data->writeReport + data->output_report_size;<br />
<br />
but then reads and writes fixed offsets into it. A device declaring a<br />
1-byte output and a 1-byte input report makes hid_report_len() return 2<br />
for each, so alloc_size is 4, while rmi_set_page() -- reached<br />
unconditionally at probe time through rmi_input_configured() -- stores<br />
writeReport[4] and rmi_hid_read_block() stores writeReport[0..5]. Since<br />
readReport lives at writeReport + output_report_size, those stores also<br />
corrupt the window the next reply is parsed out of.<br />
<br />
The read path is worse: the copy length comes from readReport[1], which<br />
the device fills in and can be up to 255, and the copy starts at<br />
&readReport[2] with no regard for input_report_size, so it runs past the<br />
end of the allocation into adjacent slab objects. This does not even<br />
need a lying device -- rmi_f01_probe() issues a fixed 21-byte register<br />
read, so any device declaring an input report smaller than 23 bytes<br />
reads out of bounds even when it answers truthfully. Those bytes become<br />
the register values the RMI core acts on: rmi_f01_probe() prints them to<br />
the kernel log as the product id and exports them through the mode 0444<br />
sysfs attribute of the same name, and rmi_driver_set_irq_bits() sends<br />
them back to the device as the interrupt mask, so an undersized report<br />
descriptor leaks heap contents both to unprivileged userspace and to the<br />
device itself.<br />
<br />
The write path has no bound either: rmi_hid_write_block() copies an<br />
unbounded len to &writeReport[4], and the largest caller a device can<br />
drive at probe time is rmi_driver_set_irq_bits(), whose length is<br />
derived from the interrupt source counts the device declares in its Page<br />
Description Table.<br />
<br />
Finally, the read loop cannot terminate on a zero-length reply: such a<br />
reply copies nothing and advances neither bytes_read nor bytes_needed,<br />
and because a reply did arrive the one second wait_event_timeout() does<br />
not fire either, so a device answering 0 forever keeps the loop running<br />
inside the probe worker with page_mutex held. khungtaskd does not<br />
notice, because every reply wakes the task.<br />
<br />
Reject reports too small for what the driver builds -- 6 output bytes<br />
for the write reports and 3 input bytes for the read handshake -- at<br />
probe time, clamp the write and the read copy to the report sizes the<br />
device declared, and treat a zero-length reply as an error. A device<br />
refused this way is started as an ordinary HID device, like one that<br />
does not carry the RMI report ids at all.<br />
<br />
RMI_DEVICE must not be left set in device_flags on that path, because<br />
rmi_input_configured() would then run the RMI setup and reach<br />
rmi_set_page(), which writes the writeReport buffer the refusal just<br />
skipped allocating. The bit can arrive set: rmi_probe() copies<br />
id->driver_data into device_flags before the report checks, and a bind<br />
through the new_id sysfs attribute can supply driver_data with<br />
RMI_DEVICE (BIT(0)) set. Strip the bit where driver_data is copied, so<br />
RMI_DEVICE keeps meaning exactly "this probe validated the reports"; the<br />
three jumps to start that predate this patch are covered as well.<br />
<br />
The error path also clears RMI_READ_DATA_PENDING on its way out, because<br />
that flag is what the wait at the top of the loop tests: leaving it set<br />
would make every later wait_event_timeout() return immediately on the<br />
stale reply and kill the read path for the rest of the device&#39;s life.<br />
<br />
Clamping does not regress working hardware: the read loop already<br />
handles<br />
---truncated---
Severity CVSS v4.0: Pending analysis
Last modification:
19/10/2026