Re: [PATCH 2/2 v2] staging: android: ashmem: Fix mmap size validation

From: Martijn Coenen
Date: Fri Jun 22 2018 - 04:49:04 EST


On Thu, Jun 21, 2018 at 1:29 AM, Joel Fernandes <joel@xxxxxxxxxxxxxxxxx> wrote:
> Also if you look at the kernel sources, there are dozens of drivers that
> check for correct VMA size in mmap handler and fail if it isn't sized
> correctly.

If that's the case, we should definitely do it this way for ashmem as
well. Since its size is fixed after creation, preventing anyone from
mapping a larger size seems reasonable to me.

Reviewed-by: Martijn Coenen <maco@xxxxxxxxxxx>

>
> thanks!
>
> - Joel
>