linux/drivers/media/platform
Changming Liu 3f870a4503 media: am437x-vpfe: exclude illegal values for enum when validing params from user space
When calling ccdc_data_size_max_bit() to validate data_sz in
vpfe_ccdc_validate_param(), it's treated as an enumeration ranging from
0 to 7 while essentially it's an 32 bit unsigned integer directly from
user space. This can make the return value of ccdc_data_size_max_bit()
underflow and bypass the following check.

To fix this, an additional check is added to the following if clause to
keep this enumaration variable in range. And if its value is not legal,
return -EINVAL properly.

Signed-off-by: Changming Liu <charley.ashbringer@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-03-12 16:26:15 +01:00
..
am437x media: am437x-vpfe: exclude illegal values for enum when validing params from user space 2020-03-12 16:26:15 +01:00
atmel media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
cadence media: v4l: cadence: Fix how unsued lanes are handled in 'csi2rx_start()' 2019-10-10 07:19:13 -03:00
cec-gpio drm main pull for 5.5-rc1 2019-11-27 17:45:48 -08:00
coda media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
cros-ec-cec cros_ec: treewide: Remove 'include/linux/mfd/cros_ec.h' 2020-01-07 17:36:46 +01:00
davinci media: davinci: fix incorrect pix_fmt assignment 2020-02-24 17:15:01 +01:00
exynos-gsc media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
exynos4-is media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
marvell-ccic media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
meson drm main pull for 5.5-rc1 2019-11-27 17:45:48 -08:00
mtk-jpeg media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
mtk-mdp media: mtk-vpu: avoid unaligned access to DTCM buffer. 2020-03-12 16:25:33 +01:00
mtk-vcodec media: mtk-vpu: avoid unaligned access to DTCM buffer. 2020-03-12 16:25:33 +01:00
mtk-vpu media: mtk-vpu: avoid unaligned access to DTCM buffer. 2020-03-12 16:25:33 +01:00
omap media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
omap3isp media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put} 2020-03-02 15:11:40 +01:00
qcom media: venus: support frame rate control 2020-03-12 13:59:02 +01:00
rcar-vin media: Split v4l2_pipeline_pm_use into v4l2_pipeline_pm_{get, put} 2020-03-02 15:11:40 +01:00
rockchip/rga media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
s3c-camif media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
s5p-cec cec: add cec_adapter to cec_notifier_cec_adap_unregister() 2019-10-07 12:47:43 +02:00
s5p-g2d media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
s5p-jpeg media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
s5p-mfc media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
seco-cec drm main pull for 5.5-rc1 2019-11-27 17:45:48 -08:00
sti media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
stm32 media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
sunxi media: sun8i: Add Allwinner A83T Rotate driver 2020-03-02 15:16:40 +01:00
tegra-cec remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
ti-vpe media: ti-vpe: cal: fix a kernel oops when unloading module 2020-03-12 16:25:55 +01:00
vicodec media: vicodec: use v4l2-mem2mem draining, stopped and next-buf-is-last states handling 2020-03-05 22:55:57 +01:00
vimc media: vimc: use-after-free fix - release vimc in the v4l_device release 2020-03-05 22:43:47 +01:00
vivid media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
vsp1 media: vsp1: tidyup VI6_HGT_LBn_H() macro 2020-02-27 17:49:48 -03:00
xilinx media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
Kconfig media: sun8i: Add Allwinner A83T Rotate driver 2020-03-02 15:16:40 +01:00
Makefile media: ti-vpe: Fix a parallel build issue 2019-10-10 11:39:32 -03:00
aspeed-video.c media: aspeed: add AST2600 support 2020-03-02 15:53:39 +01:00
fsl-viu.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
imx-pxp.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
imx-pxp.h media: imx-pxp: add i.MX Pixel Pipeline driver 2018-09-11 13:32:17 -04:00
m2m-deinterlace.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
mx2_emmaprp.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
pxa_camera.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
rcar-fcp.c Char/Misc driver patches for 4.19-rc1 2018-08-18 11:04:51 -07:00
rcar_drif.c media: rcar_drif: Do not print error in case of EPROBE_DEFER for dma channel 2020-03-02 16:09:04 +01:00
rcar_fdp1.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
rcar_jpu.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
renesas-ceu.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
sh_veu.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
sh_vou.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
via-camera.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
via-camera.h media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
video-mux.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
vim2m.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00