[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)
committerchenyt9 <chenyt9@lenovo.com>
Wed, 1 Apr 2020 09:32:33 +0000 (17:32 +0800)
commit42a49d8a17752c4d8d496e443c5224aa7fff5618
treecaeec974589c542689418242cd845be8654e0216
parent96b8f58241830d2cf3ca7a31444c83caa5af3dd7
[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