linux/drivers/media
Hans Verkuil 6fb8bc29bf media: v4l2-dv-timings.c: fix too strict blanking sanity checks
commit 5eef214177 upstream.

Sanity checks were added to verify the v4l2_bt_timings blanking fields
in order to avoid integer overflows when userspace passes weird values.

But that assumed that userspace would correctly fill in the front porch,
backporch and sync values, but sometimes all you know is the total
blanking, which is then assigned to just one of these fields.

And that can fail with these checks.

So instead set a maximum for the total horizontal and vertical
blanking and check that each field remains below that.

That is still sufficient to avoid integer overflows, but it also
allows for more flexibility in how userspace fills in these fields.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 4b6d66a45e ("media: v4l2-dv-timings: add sanity checks for blanking values")
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-12-14 11:37:19 +01:00
..
cec media: cros-ec-cec: limit msg.len to CEC_MAX_MSG_SIZE 2022-11-10 18:15:33 +01:00
common media: videobuf2-core: take mmap_lock in vb2_get_unmapped_area() 2022-12-14 11:37:19 +01:00
dvb-core media: dvb_vb2: fix possible out of bound access 2022-10-05 10:39:39 +02:00
dvb-frontends media: dvb-frontends/drxk: initialize err to 0 2022-11-10 18:15:34 +01:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-11-06 14:13:30 +01:00
i2c media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR() 2022-06-09 10:22:59 +02:00
mc media: mc-device.c: use DEVICE_ATTR_RO() helper macro 2021-08-04 14:43:50 +02:00
mmc
pci media: cx88: Fix a null-ptr-deref bug in buffer_prepare() 2022-10-26 12:35:45 +02:00
platform media: rkisp1: Zero v4l2_subdev_format fields in when validating links 2022-11-10 18:15:33 +01:00
radio media: si470x-i2c: fix possible memory leak in si470x_i2c_probe() 2022-01-27 11:03:20 +01:00
rc media: mceusb: set timeout to at least timeout provided 2022-10-29 10:12:54 +02:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-11-18 19:16:27 +01:00
test-drivers media: vivid: set num_in/outputs to 0 if not supported 2022-11-03 23:59:17 +09:00
tuners media: msi001: fix possible null-ptr-deref in msi001_probe() 2022-01-27 11:03:36 +01:00
usb media: uvcvideo: Use entity get_cur in uvc_ctrl_set 2022-10-26 12:35:06 +02:00
v4l2-core media: v4l2-dv-timings.c: fix too strict blanking sanity checks 2022-12-14 11:37:19 +01:00
Kconfig media: correct MEDIA_TEST_SUPPORT help text 2022-01-27 11:05:20 +01:00
Makefile