1
linux/drivers/media/test-drivers
Hans Verkuil 96d8569563 media: vivid: fix buffer overwrite when using > 32 buffers
The maximum number of buffers that can be requested was increased to
64 for the video capture queue. But video capture used a must_blank
array that was still sized for 32 (VIDEO_MAX_FRAME). This caused an
out-of-bounds write when using buffer indices >= 32.

Create a new define MAX_VID_CAP_BUFFERS that is used to access the
must_blank array and set max_num_buffers for the video capture queue.

This solves a crash reported by:

	https://bugzilla.kernel.org/show_bug.cgi?id=219258

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Fixes: cea70ed416 ("media: test-drivers: vivid: Increase max supported buffers for capture queues")
Cc: stable@vger.kernel.org
2024-10-28 09:14:12 +01:00
..
vicodec media: vicodec: allow en/decoder cmd w/o CAPTURE 2024-08-25 08:15:24 +02:00
vidtv media: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-08-09 07:56:37 +02:00
vimc media: vimc: scaler: Use subdev active state 2024-06-26 16:39:34 +02:00
visl media: v4l2: Add mem2mem helpers for REMOVE_BUFS ioctl 2024-03-25 12:00:44 +01:00
vivid media: vivid: fix buffer overwrite when using > 32 buffers 2024-10-28 09:14:12 +01:00
Kconfig media: drop CONFIG_MEDIA_CONTROLLER_REQUEST_API 2023-11-23 13:03:45 +01:00
Makefile
vim2m.c