1
linux/drivers/media/test-drivers/vivid
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
..
Kconfig media: drop CONFIG_MEDIA_CONTROLLER_REQUEST_API 2023-11-23 13:03:45 +01:00
Makefile
vivid-cec.c media: vivid: add <Vendor Command With ID> support 2024-08-05 09:39:19 +02:00
vivid-cec.h
vivid-core.c media: vivid: fix buffer overwrite when using > 32 buffers 2024-10-28 09:14:12 +01:00
vivid-core.h media: vivid: fix buffer overwrite when using > 32 buffers 2024-10-28 09:14:12 +01:00
vivid-ctrls.c media: vivid: fix buffer overwrite when using > 32 buffers 2024-10-28 09:14:12 +01:00
vivid-ctrls.h
vivid-kthread-cap.c media: vivid: loopback based on 'Connected To' controls 2024-06-28 08:00:29 +02:00
vivid-kthread-cap.h
vivid-kthread-out.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
vivid-kthread-out.h
vivid-kthread-touch.c
vivid-kthread-touch.h
vivid-meta-cap.c media: test-drivers: Stop direct calls to queue num_buffers field 2023-11-23 12:31:54 +01:00
vivid-meta-cap.h
vivid-meta-out.c media: test-drivers: Set REQBUFS minimum number of buffers 2024-03-25 12:00:44 +01:00
vivid-meta-out.h
vivid-osd.c media/vivid: Use fbdev I/O helpers 2023-08-04 15:54:34 +02:00
vivid-osd.h
vivid-radio-common.c
vivid-radio-common.h
vivid-radio-rx.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
vivid-radio-rx.h
vivid-radio-tx.c
vivid-radio-tx.h
vivid-rds-gen.c media: vivid: avoid integer overflow 2023-09-27 10:47:22 +02:00
vivid-rds-gen.h
vivid-sdr-cap.c media: vivid: fix CREATE_BUFS support in queue_setup() 2024-06-26 17:28:31 +02:00
vivid-sdr-cap.h
vivid-touch-cap.c media: vivid: fix CREATE_BUFS support in queue_setup() 2024-06-26 17:28:31 +02:00
vivid-touch-cap.h
vivid-vbi-cap.c media: vivid: loopback based on 'Connected To' controls 2024-06-28 08:00:29 +02:00
vivid-vbi-cap.h
vivid-vbi-gen.c media: vivid: remove redundant assignment to variable checksum 2022-10-24 19:03:54 +02:00
vivid-vbi-gen.h
vivid-vbi-out.c media: vivid: fix CREATE_BUFS support in queue_setup() 2024-06-26 17:28:31 +02:00
vivid-vbi-out.h
vivid-vid-cap.c media: vivid: fix buffer overwrite when using > 32 buffers 2024-10-28 09:14:12 +01:00
vivid-vid-cap.h media: vivid: loopback based on 'Connected To' controls 2024-06-28 08:00:29 +02:00
vivid-vid-common.c media: vivid: loopback based on 'Connected To' controls 2024-06-28 08:00:29 +02:00
vivid-vid-common.h media: vivid: loopback based on 'Connected To' controls 2024-06-28 08:00:29 +02:00
vivid-vid-out.c media: vivid: loopback based on 'Connected To' controls 2024-06-28 08:00:29 +02:00
vivid-vid-out.h