[RAMEN9610-21029]staGing: android: ashmem: Disallow ashmem memory from being remapped MMI-QSBS30.62-17-4
authorSuren Baghdasaryan <surenb@google.com>
Fri, 25 Oct 2019 07:12:58 +0000 (00:12 -0700)
committerchenyt9 <chenyt9@lenovo.com>
Mon, 15 Jun 2020 08:42:56 +0000 (16:42 +0800)
commitce576faee1a3595fad038da1f20a62c13d091e0b
tree2ba4d79ed746da6d83a3d89a92d9c515741e2218
parentf11ac6204f49b2e6b065bc222933664ffbc4a7c6
[RAMEN9610-21029]staGing: android: ashmem: Disallow ashmem memory from being remapped

When ashmem file is being mmapped the resulting vma->vm_file points to the
backing shmem file with the generic fops that do not check ashmem
permissions like fops of ashmem do. Fix that by disallowing mapping
operation for backing shmem file.

Bug: 142903466
Change-Id: Ic24b44d3fc5b1cb7f2704f251d700ce3667bd2ee
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry picked from commit 8ff865f4744004deadce3ad60193f530b4c7d1b9)
drivers/staging/android/ashmem.c