Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 410cfa95 authored by Tarun Karra's avatar Tarun Karra
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.

CRs-Fixed: 988993
Change-Id: I0e097d7e4e4c414c0849e33bcc61a26fb94291ad
Signed-off-by: default avatarTarun Karra <tkarra@codeaurora.org>
parent 10d0167c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment