ASoC: msm: Null dereference check added

In asm_read function we should check buffer pointer
before it is dererferenced.

CRs-Fixed: 612682
Change-Id: I1968c038e1d35381bf174000287d542441e41092
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
msm-camera: Fix various small issues in Actuator driver

Bound check and validate userspace parameters direction,
number of steps and direction sign. Also fix possible
memory leak in certain error cases.

CRs-Fixed: 511349

Conflicts:
        drivers/media/video/msm/actuators/msm_actuator.c

Change-Id: I05a3f63583845851df36b122f2079d345657cb99
Signed-off-by: Abhinay Reddy Vanipally <avanip@codeaurora.org>
qseecom: Validate pointer offset in qseecom_send_modfd_cmd.

Validate cmd_req_buf pointer offset in qseecom_send_modfy_cmd, and
make sure cmd buffer address to be within shared bufffer.

Conflicts:
	drivers/misc/qseecom.c

Change-Id: I431511a92ab2cccbc2daebc0cf76cc3872689a97
Signed-off-by: Abhinay Reddy Vanipally <avanip@codeaurora.org>
Fix for compilation issues.

Change-Id: I255c8378fd8b573cef3e938ca67e10d6e7de1e6e
Signed-off-by: Gopal G Goberu <ggober@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>
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
msm-camera:  Return from DQBUF ioctl in case of error.

Incase the vb2_dqbuf call returns error, we are continuing
ahead and trying to access the fields of the vb2 buffer which
may not be initialized yet. Avoid this by checking the
return value of vb2_dqbuf and return immediately in case of
errors.

CRs-Fixed: 495635

Change-Id: Iaf8173247d44b457e7800d283e699a1514bb5ae5
Signed-off-by: Katta Santhisindhu <kattas@codeaurora.org>
Asoc:msm:Added Buffer overflow check

The overflow check is required to ensure that user space data
in kernel may not go beyond buffer boundary.

Change-Id: I79b7e5f875fadcaeceb05f9163ae3666d4b6b7e1
CRs-Fixed: 563086
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
msm: kgsl: Detect and avoid malformed ioctl codes

Because we were using _IO_NR, one could construct a malformed ioctl
code that would avoid allocating memory yet go to a function that
expected that memory. Still use _IO_NR to index the array of ioctls,
but check that the full values match before jumping to the helper
function.

CRs-fixed: 385592
Change-Id: Ic0dedbaded469035bd0a2bb0f20fecb2a3045ca5
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>