[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)
committerrobot <robot@samsung.com>
Mon, 16 Dec 2019 18:03:12 +0000 (03:03 +0900)
commit8ff865f4744004deadce3ad60193f530b4c7d1b9
treed08765bc0464a230f8537ced198960d779ef38e5
parentd03976560d6877169ad33fef80dfa6e09db9ab9a
[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