Re: MAP_FIXED for ELF mappings

From: Linus Torvalds
Date: Wed Oct 04 2017 - 13:15:37 EST


On Wed, Oct 4, 2017 at 10:12 AM, Michal Hocko <mhocko@xxxxxxxxxx> wrote:
>
> Yes, but we already have a new stack mapped and that was the point of
> the referenced CVE where the binary segments got mapped over the stack
> AFAIU.

Well, if you control the binary to the point where you just make the
ELF section map on top of the stack, what's the problem?

I mean, it's not a security issue. You could just have written the
code to do mmap() instead.

So I think this is a "crazy users can do crazy things, we're not
arbiters of taste" thing.

Linus