Skip to content
Snippets Groups Projects
Commit f54224a6 authored by Tarun Karra's avatar Tarun Karra Committed by Ecco Park
Browse files

msm: kgsl: verify user memory permissions before mapping to GPU driver


For user memory of type KGSL_USER_MEM_TYPE_ADDR mapped to GPU driver
verify permissions and map GPU permissions same as CPU permissions.
If elevated permissions are requested return an error to prevent
privilege escalation. Without this check user could map readonly
memory into GPU driver as readwrite and gain elevated privilege.

Write permissions check is currently inverted causing readonly
user pages to be mapped as readwrite in GPU driver. Fix this
check to map readonly pages as readonly.

Bug: 28305757
CRs-Fixed: 988993
Change-Id: I0e097d7e4e4c414c0849e33bcc61a26fb94291ad
Signed-off-by: default avatarTarun Karra <tkarra@codeaurora.org>
parent 3c8d6db7
Branches ics-plus-aosp tools_r20
Tags android-sdk-adt_r20
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment