]> git.ipfire.org Git - thirdparty/linux.git/commit
Input: synaptics-rmi4 - block s_input when F54 queue is busy
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 26 Jun 2026 05:17:54 +0000 (22:17 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 5 Aug 2026 04:20:12 +0000 (21:20 -0700)
commitfbfd76746adc16d64be29ff113f673b70bc3f5c2
treee5560c4cd3fea898ab44e013f1cd9d9535d98ba2
parent49c5adc2b7d6e43c5cf033e1c86fdb9c16ababb1
Input: synaptics-rmi4 - block s_input when F54 queue is busy

Changing the input (diagnostic report type) mid-stream changes the
report size. Since V4L2 buffers are allocated based on the size at
stream start, changing the input while streaming could lead to a
heap buffer overflow if the new size is larger than the allocated
buffers.

Prevent this by blocking VIDIOC_S_INPUT with -EBUSY if the V4L2 queue
is busy (streaming).

Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics")
Cc: stable@vger.kernel.org
Assisted-by: Antigravity:gemini-3.5-flash
Reviewed-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Link: https://patch.msgid.link/20260626051802.4033172-5-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_f54.c