Skip to content

Commit 003f01c

Browse files
lynxeye-devdtor
authored andcommitted
Input: synaptics-rmi4 - fix video buffer size
The video buffer used by the queue is a vb2_v4l2_buffer, not a plain vb2_buffer. Using the wrong type causes the allocation of the buffer storage to be too small, causing a out of bounds write when __init_vb2_v4l2_buffer initializes the buffer. Signed-off-by: Lucas Stach <[email protected]> Fixes: 3a762db ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics") Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent b1a402e commit 003f01c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/rmi4/rmi_f54.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ static const struct vb2_ops rmi_f54_queue_ops = {
359359
static const struct vb2_queue rmi_f54_queue = {
360360
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
361361
.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ,
362-
.buf_struct_size = sizeof(struct vb2_buffer),
362+
.buf_struct_size = sizeof(struct vb2_v4l2_buffer),
363363
.ops = &rmi_f54_queue_ops,
364364
.mem_ops = &vb2_vmalloc_memops,
365365
.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,

0 commit comments

Comments
 (0)