Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH v5 0/2] Input: synaptics-rmi4 - fix two device-controlled out-of-bounds writes
@ 2026-10-11  8:37 Wei Jie Law
  2026-10-11  8:37 ` [PATCH v5 1/2] Input: synaptics-rmi4 - reject functions with more than 6 interrupt sources Wei Jie Law
  2026-10-11  8:37 ` [PATCH v5 2/2] Input: synaptics-rmi4 - reject a PDT that grows between scans Wei Jie Law
  0 siblings, 2 replies; 4+ messages in thread
From: Wei Jie Law @ 2026-10-11  8:37 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Andrew Duggan, Jiri Kosina, Benjamin Tissoires, linux-input,
	linux-kernel, stable

Two fixes for out-of-bounds writes in the RMI4 core that a device can
trigger through its Page Description Table.

1/2 rejects functions declaring 7 interrupt sources, a value the RMI4
specification reserves; the driver otherwise writes past fn->irq[].

2/2 rejects a PDT whose interrupt counts grow between the counting scan
and the function-creating scan; the driver otherwise sets bits past the
end of fn->irq_mask[].

Changes in v5:
 - 1/2: keep RMI_FN_MAX_IRQS at 6 and reject a count of 7 in
   rmi_scan_pdt_page(), after the RMI4_END_OF_PDT() check, instead of
   growing irq[] (Dmitry).  New subject.
 - 2/2: unchanged.

v4: https://lore.kernel.org/linux-input/20260825103123.12216-1-98lawweijie@gmail.com/

Wei Jie Law (2):
  Input: synaptics-rmi4 - reject functions with more than 6 interrupt
    sources
  Input: synaptics-rmi4 - reject a PDT that grows between scans

 drivers/input/rmi4/rmi_driver.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-11  8:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-11  8:37 [PATCH v5 0/2] Input: synaptics-rmi4 - fix two device-controlled out-of-bounds writes Wei Jie Law
2026-10-11  8:37 ` [PATCH v5 1/2] Input: synaptics-rmi4 - reject functions with more than 6 interrupt sources Wei Jie Law
2026-10-11  8:37 ` [PATCH v5 2/2] Input: synaptics-rmi4 - reject a PDT that grows between scans Wei Jie Law
2026-10-11  8:46   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox