msm: msm_fb: remove mmio access through mmap

Disable access to mm io and add
appropriate range checks to ensure valid accesses
through framebuffer mmap. This prevents illegal
access into memory.

CRs-Fixed: 474706
Change-Id: If25166f2732433ef967e99c716440030b567aae9
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
msm: msm_fb: validating backlight level and scale value

Validating the value of backlight to be not more than the
max value and also ensuring that the backlight scale value
is not more than 1024, thereby ensuring that backlight
scaling factor is not more than 1.

Change-Id: I6a6f4f0f0a8c272edcac5078276fb406ddee3e90
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
Signed-off-by: Sangani Suryanarayana Raju <csuryan@codeaurora.org>
msm/hdmi : Change the read permission for sysfs entry

rda_edid_physical_address,rda_cec_logical_addr sysfs entries
leak logical and physical addresses within the kernel and may
be read by any user. The read permissions for the sysfs entries
should be S_IRUSR rather than S_IRUGO.

CRs-Fixed: 547968

Change-Id: I9b99acbf292e5aa07fac15def112d2a4b4eb0eb7
Signed-off-by: Ramakant Singh <ramaka@codeaurora.org>
Merge "msm: msm_fb: validating backlight level and scale value"
mm-camera: Changes to remove unused code for security issue reported

Changes to remove MSM_CAM_IOCTL_SET_MEM_MAP_INFO Ioctl support.
This will avoid physical memory mapping to userspace.

Change-Id: If014e6d152786b508c8e7ee6c53631913cd4cfcf
Signed-off-by: Guruprasad Gaonkar <ggaonk@codeaurora.org>
Merge "mm-camera: Changes to remove unused code for security issue reported"
msm:camera: Copy data from user to kernel space before access

This would avoid any invalid access of data.

CRs-fixed: 550608

Change-Id: I30993a9bc731227e72f3be34874505f01357f04d
Signed-off-by: Alok Kediya <kediya@codeaurora.org>
msm:camera: Initialize a structure before usage

Initialize a structure using memset such that it is
populated properly before returning to userspace.

CRs-fixed: 550567
Change-Id: I2b3c78cd2b309de13acf2811fcc16b8bc04fa052
Signed-off-by: Alok Kediya <kediya@codeaurora.org>
msm-camera: Fix to prevent kernel heap buffer overflow in actuator

Fix to prevent kernel heap buffer overflow allows user
controlled data to be written to the heap via the
msm_camera actuator IOCTLs

Change-Id: I5d511e8c1aa2f76f4209a6712a58d8757bc53367
CRs-Fixed: 545979
Signed-off-by: Katta Santhisindhu <kattas@codeaurora.org>
Merge "msm: msm_fb: remove mmio access through mmap"
msm-camera: fix to prevent untrusted pointer to lead DoS in Actuator

fix to prevent untrusted userspace pointer in actuator kernel
driver to lead DoS in actuator driver

Change-Id: Id2402a4d4739bb6660f4cddbad92817458a9348d
CRs-Fixed: 547231
Signed-off-by:Vivek Singh<vising@codeaurora.org>
msm:camera: Bounds and validity check for params

Check the range and validity of parameters before accessing.

CRs-fixed: 550607, 554434, 554436

Change-Id: I2d6aec4f9cb9385789c0df6a2c4abefe9e87539f
Signed-off-by: Alok Kediya <kediya@codeaurora.org>
Merge "msm:camera: Copy data from user to kernel space before access"
msm:camera: Initialize the structure before to pass userspace.

Initialize the structure by memset so that value will pass to
proper to usersapce.

CRs-fixed: 554845
Change-Id: I4adf4bf1bb6e45e16f5fd2e26a74232e6ee7f8bd
Signed-off-by:Vivek Singh<vising@codeaurora.org>
Merge "msm-camera: fix to prevent untrusted pointer to lead DoS in Actuator"
msm-camera : Fix for Unbounded copy in msm_camera_v4l2_private_control

Fix for the Unbounded copy in msm_camera_v4l2_private_control function

CRs-Fixed: 545962
Change-Id: I36b3cb3193610a090f3fc87273bc71317e7029bd
Signed-off-by: Katta Santhisindhu <kattas@codeaurora.org>
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
Revert "msm:camera: Copy data from user to kernel space before access".

This reverts commit 201306bfb6a1d796635d8518758ca1d90408a9b5

Change-Id: Id10633f01dd3e45ef853ba40078dac42e7072e5f

Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
msm:camera: Copy data from user to kernel space before access.

This would avoid any invalid access of data

Change-Id: I801a363a18d10c71fd7cdfef3bbab7a1d5dbdfdc
CRs-fixed: 550608
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
msm: vidc: Check validity of userspace address

Before writing to a userspace address, verification
of the validity of user space address is required.

Change-Id: I9141e44a6c11aaf3f4d57c08bb0dd26a7b214f34
CRs-fixed: 556356
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
Merge "msm/hdmi : Change the read permission for sysfs entry"