exynos-linux-stable/drivers/media/platform/davinci
Prabhakar Lad 733d7ab6c5 media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl
commit da05d52d2f0f6bd61094a0cd045fed94bf7d673a upstream.

this patch makes sure VPFE_CMD_S_CCDC_RAW_PARAMS ioctl no longer works
for vpfe_capture driver with a minimal patch suitable for backporting.

- This ioctl was never in public api and was only defined in kernel header.
- The function set_params constantly mixes up pointers and phys_addr_t
  numbers.
- This is part of a 'VPFE_CMD_S_CCDC_RAW_PARAMS' ioctl command that is
  described as an 'experimental ioctl that will change in future kernels'.
- The code to allocate the table never gets called after we copy_from_user
  the user input over the kernel settings, and then compare them
  for inequality.
- We then go on to use an address provided by user space as both the
  __user pointer for input and pass it through phys_to_virt to come up
  with a kernel pointer to copy the data to. This looks like a trivially
  exploitable root hole.

Due to these reasons we make sure this ioctl now returns -EINVAL and backport
this patch as far as possible.

Fixes: 5f15fbb68f ("V4L/DVB (12251): v4l: dm644x ccdc module for vpfe capture driver")

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-11 08:49:30 -07:00
..
ccdc_hw_device.h [media] davinci: drop unused control callbacks 2016-07-12 11:12:00 -03:00
dm355_ccdc.c media: platform: davinci: drop owner assignment from platform_drivers 2014-10-20 16:20:45 +02:00
dm355_ccdc_regs.h [media] davinci: more gama -> gamma typo fixes 2013-03-19 16:16:23 -03:00
dm644x_ccdc.c [media] davinci: ccdc_update_raw_params() frees the wrong thing 2016-01-25 15:15:26 -02:00
dm644x_ccdc_regs.h [media] davinci/dm644x_ccdc: fix compiler warning 2013-03-19 16:16:04 -03:00
isif.c media: platform: davinci: drop owner assignment from platform_drivers 2014-10-20 16:20:45 +02:00
isif_regs.h [media] davinci: more gama -> gamma typo fixes 2013-03-19 16:16:23 -03:00
Kconfig [media] davinci: add i2c Kconfig dependencies 2015-11-19 12:03:52 -02:00
Makefile [media] media: davinci: kconfig: fix incorrect selects 2013-04-14 20:06:36 -03:00
vpbe.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
vpbe_display.c [media] vpbe_display: convert g/s_crop to g/s_selection 2016-08-24 09:52:53 -03:00
vpbe_osd.c media: platform: davinci: drop owner assignment from platform_drivers 2014-10-20 16:20:45 +02:00
vpbe_osd_regs.h
vpbe_venc.c media: platform: davinci: drop owner assignment from platform_drivers 2014-10-20 16:20:45 +02:00
vpbe_venc_regs.h
vpfe_capture.c media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl 2017-08-11 08:49:30 -07:00
vpif.c media: platform: davinci: drop owner assignment from platform_drivers 2014-10-20 16:20:45 +02:00
vpif.h [media] davinci: vpif: Fix module build for capture and display 2013-03-23 10:38:10 -03:00
vpif_capture.c [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
vpif_capture.h [media] media/platform: convert drivers to use the new vb2_queue dev field 2016-07-08 14:39:21 -03:00
vpif_display.c [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
vpif_display.h [media] media/platform: convert drivers to use the new vb2_queue dev field 2016-07-08 14:39:21 -03:00
vpss.c media: platform: davinci: drop owner assignment from platform_drivers 2014-10-20 16:20:45 +02:00