Re: [PATCH 2/2] mm/mmap.c: do not allow mappings outside of allowed limits

From: Alexander Gordeev
Date: Tue Apr 21 2020 - 01:38:00 EST


On Mon, Apr 20, 2020 at 07:59:03PM -0700, Andrew Morton wrote:
> On Mon, 23 Mar 2020 14:29:29 +0100 agordeev@xxxxxxxxxxxxx wrote:
>
> > It is possible to request a fixed mapping address below
> > mmap_min_addr and succeed. This update adds early checks
> > of mmap_min_addr and mmap_end boundaries and fixes the
> > above issue.
>
> Does this solve any known problems? If not, what is the motivation for
> the change?

One can set a lowest possible address in /proc/sys/vm/mmap_min_addr
and mmap below that bound nevertheless. Apart from it is wrong I am
not aware of any existing issue.

Thanks!