summaryrefslogtreecommitdiff
path: root/mm/tests/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorBryam Vargas <hexlabsecurity@proton.me>2026-06-14 00:36:12 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-06-25 17:46:20 -0700
commitd577e46785d45484b2ab7e7309c49b18764bf56c (patch)
tree8f686b72803bea66cbb88b1af7099d81d1aad409 /mm/tests/git@git.tavy.me:linux.git
parent57c10915f2c16c90e0d46ad00876bf39ece40fc2 (diff)
Input: synaptics-rmi4 - bound the F30 keymap to the GPIO/LED count
rmi_f30_map_gpios() allocates gpioled_key_map with min(gpioled_count, TRACKSTICK_RANGE_END) == at most 6 entries, but rmi_f30_attention() iterates the full f30->gpioled_count (device query register, range 0..31) and dereferences gpioled_key_map[i], and input->keycodemax is set to the full gpioled_count while input->keycode points at the 6-entry allocation. A device that reports gpioled_count > 6 with GPIO support enabled therefore causes an out-of-bounds read on the attention interrupt and out-of-bounds read/write through the EVIOCGKEYCODE/EVIOCSKEYCODE ioctls, which bound the index only against keycodemax. This is the same defect as the F3A handler, which was copied from F30. Size the keymap for the full gpioled_count; the mapping loop still assigns only the first min(gpioled_count, TRACKSTICK_RANGE_END) entries. Fixes: 3e64fcbdbd10 ("Input: synaptics-rmi4 - limit the range of what GPIOs are buttons") Cc: stable@vger.kernel.org Signed-off-by: Bryam Vargas <hexlabsecurity@proton.me> Link: https://patch.msgid.link/20260614-b4-disp-818d6bda-v1-2-cf39a3615085@proton.me Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'mm/tests/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions