[RAMEN9610-21029]staGing: android: ashmem: Disallow ashmem memory from being remapped
authorSuren Baghdasaryan <surenb@google.com>
Fri, 25 Oct 2019 07:12:58 +0000 (00:12 -0700)
committerlingsen1 <lingsen1@lenovo.com>
Thu, 19 Dec 2019 03:02:23 +0000 (11:02 +0800)
commit562d940d0b4866deb92b121b89b8176a0ce70670
treecaeec974589c542689418242cd845be8654e0216
parentcdec49da984ad5d613609acb06b3f5aa5da6ac64
[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>
drivers/staging/android/ashmem.c