All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-64277: Input: synaptics-rmi4 - bound the F3A keymap to the GPIO count
@ 2026-07-25  8:48 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-07-25  8:48 UTC (permalink / raw)
  To: linux-cve-announce; +Cc: Greg Kroah-Hartman

From: Greg Kroah-Hartman <gregkh@kernel.org>

Description
===========

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

Input: synaptics-rmi4 - bound the F3A keymap to the GPIO count

rmi_f3a_initialize() takes the GPIO count from the device query register
(f3a->gpio_count = buf & RMI_F3A_GPIO_COUNT, range 0..127).
rmi_f3a_map_gpios() then allocates gpio_key_map with
min(gpio_count, TRACKSTICK_RANGE_END) == at most 6 entries, but
rmi_f3a_attention() iterates the full gpio_count and dereferences
gpio_key_map[i], and input->keycodemax is set to the full gpio_count
while input->keycode points at the 6-entry allocation.

A device that reports gpio_count > 6 therefore causes an out-of-bounds
read of gpio_key_map[] on every attention interrupt, and out-of-bounds
accesses through the input core's default keymap ioctls: EVIOCGKEYCODE
reads past the buffer (leaking adjacent slab memory to user space) and
EVIOCSKEYCODE writes a caller-controlled value past it, for any process
able to open the evdev node, since input_default_getkeycode() and
input_default_setkeycode() only bound the index against keycodemax.

Size the keymap for the full gpio_count. The mapping loop is unchanged:
it still assigns only the first min(gpio_count, TRACKSTICK_RANGE_END)
entries; the remaining slots stay KEY_RESERVED (devm_kcalloc zero-fills)
and are skipped when reporting.

The Linux kernel CVE team has assigned CVE-2026-64277 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 5.10 with commit 9e4c596bfd004f447a652205163234dfd4aafa69 and fixed in 5.10.261 with commit 502ad7caaa1a445b734c827fa256e5311df67e3d
	Issue introduced in 5.10 with commit 9e4c596bfd004f447a652205163234dfd4aafa69 and fixed in 5.15.212 with commit 3480e24bc4e178aaa009edb25b6ee12df199e210
	Issue introduced in 5.10 with commit 9e4c596bfd004f447a652205163234dfd4aafa69 and fixed in 6.1.178 with commit 35ed74d32d8260bdfb14a94caf402bf0866bdeec
	Issue introduced in 5.10 with commit 9e4c596bfd004f447a652205163234dfd4aafa69 and fixed in 6.6.145 with commit ba57f430328534501962d60d651e385ffd7af9ca
	Issue introduced in 5.10 with commit 9e4c596bfd004f447a652205163234dfd4aafa69 and fixed in 6.12.96 with commit 850117b637bcb1dcc14be0cf09ac819a8707b42c
	Issue introduced in 5.10 with commit 9e4c596bfd004f447a652205163234dfd4aafa69 and fixed in 6.18.39 with commit 8db211aed83733073b0814adaeeab61d4521474e
	Issue introduced in 5.10 with commit 9e4c596bfd004f447a652205163234dfd4aafa69 and fixed in 7.1.4 with commit 64fb0e1161ccc6b9e48b8df61f07d3c34c01ec42
	Issue introduced in 5.10 with commit 9e4c596bfd004f447a652205163234dfd4aafa69 and fixed in 7.2-rc1 with commit 57c10915f2c16c90e0d46ad00876bf39ece40fc2

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-64277
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	drivers/input/rmi4/rmi_f3a.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/502ad7caaa1a445b734c827fa256e5311df67e3d
	https://git.kernel.org/stable/c/3480e24bc4e178aaa009edb25b6ee12df199e210
	https://git.kernel.org/stable/c/35ed74d32d8260bdfb14a94caf402bf0866bdeec
	https://git.kernel.org/stable/c/ba57f430328534501962d60d651e385ffd7af9ca
	https://git.kernel.org/stable/c/850117b637bcb1dcc14be0cf09ac819a8707b42c
	https://git.kernel.org/stable/c/8db211aed83733073b0814adaeeab61d4521474e
	https://git.kernel.org/stable/c/64fb0e1161ccc6b9e48b8df61f07d3c34c01ec42
	https://git.kernel.org/stable/c/57c10915f2c16c90e0d46ad00876bf39ece40fc2

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-25  8:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-25  8:48 CVE-2026-64277: Input: synaptics-rmi4 - bound the F3A keymap to the GPIO count Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.