]> git.ipfire.org Git - thirdparty/linux.git/commit
Input: rmi4 - tolerate short register descriptor structure
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 26 Jun 2026 23:33:21 +0000 (16:33 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 27 Jun 2026 05:23:40 +0000 (22:23 -0700)
commit2d6d33e45dd4fb768758d5f6e747deadcd66b9fc
treeb310fe7c191e42fc1c0eeac59fbb2aff64f48edd
parentd85589879f19ad8514c508709865f064be761df5
Input: rmi4 - tolerate short register descriptor structure

Some touchpads (e.g. ThinkPad T14 Gen 1) have buggy firmware that reports
a register descriptor structure size that is too small for the number of
registers it claims to have in the presence map. The remaining bytes in
the structure are 0, which with the new strict bounds checking causes the
parser to fail with -EIO, aborting the device probe.

Tolerate such short reads by dropping the remaining (unparseable or
0-size) registers from the list instead of failing the probe,
preventing the driver from trying to use them.

Fixes: 0adb483fbf2d ("Input: rmi4 - refactor register descriptor parsing")
Reported-by: Barry K. Nathan <barryn@pobox.com>
Tested-by: Barry K. Nathan <barryn@pobox.com>
Cc: stable@vger.kernel.org
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_driver.c