staging: android: ashmem: Disallow ashmem memory from being remapped
When ashmem file is 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. If an mremap is done on the ashmem region, then the permission checks will be skipped. Fix that by disallowing mapping operation on the backing shmem file. Reported-by:Jann Horn <jannh@google.com> Signed-off-by:
Suren Baghdasaryan <surenb@google.com> Cc: stable <stable@vger.kernel.org> # 4.4,4.9,4.14,4.18,5.4 Signed-off-by:
Todd Kjos <tkjos@google.com> Reviewed-by:
Joel Fernandes (Google) <joel@joelfernandes.org> Link: https://lore.kernel.org/r/20200127235616.48920-1-tkjos@google.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
-
mentioned in commit 29466279
-
mentioned in commit de831fe8
-
mentioned in commit acbb2f9f
-
mentioned in commit 950c65d1
-
mentioned in commit 70eca2f8
-
mentioned in commit 797c81f6
-
mentioned in commit d171d073
-
mentioned in commit a907c7d7
-
mentioned in commit c54c46a7
-
mentioned in commit a12b620f
-
mentioned in commit 246e2dde
-
mentioned in commit 9299f9c3
Please sign in to comment