OSDN Git Service

msm: camera2: cpp: Fix iommu_attach/detach compat_ioctl issue
authorRavi kumar Koyyana <rkoyyana@codeaurora.org>
Tue, 28 Mar 2017 00:44:36 +0000 (17:44 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Sun, 30 Apr 2017 02:06:42 +0000 (19:06 -0700)
commit0f4c6731385e1db4e534d0d357685bb77b9fc63e
tree7eee9dc8171834cc78f0a833924687a65720d8eb
parent1ccabf65ac2fe97fbd2f2ca3a06905f52c16e50c
msm: camera2: cpp: Fix iommu_attach/detach compat_ioctl issue

When the Camera application exercises 32-bit version of the V4L2 ioctl
operation, it results accessing  user space  memory illegally. This is
due to the direct access of user space buffer by Camera CPP driver.

Thus, fix this by copying user space buffer contents into kernel space
buffer of the  driver for  further processing. Only after checking for
proper length of user space buffer, proceed further. This will prevent
the buffer overflow and invalid memory access.

CRs-fixed: 2025367
Change-Id: I85cf4a961884c7bb0d036299b886044aef7baf7c
Signed-off-by: Ravi kumar Koyyana <rkoyyana@codeaurora.org>
drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c