Re: Why do we let munmap fail?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 21, 2018 at 05:00:47PM -0700, Daniel Colascione wrote:
> On Mon, May 21, 2018 at 4:32 PM Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
> > I think there's still a potential dead-end here.  "Deallocation" does
> > not always free resources.
> 
> Sure, but the general principle applies: reserve resources when you *can*
> fail so that you don't fail where you can't fail.

Umm.  OK.  But you want an mmap of 4TB to succeed, right?  That implies
preallocating one billion * sizeof(*vma).  That's, what, dozens of
gigabytes right there?

I'm sympathetic to wanting to keep both vma-merging and
unmap-anything-i-mapped working, but your proposal isn't going to fix it.

You need to handle the attacker writing a program which mmaps 46 bits
of address space and then munmaps alternate pages.  That program needs
to be detected and stopped.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux