|
Message-ID: <20170109111351.GI17692@port70.net> Date: Mon, 9 Jan 2017 12:13:52 +0100 From: Szabolcs Nagy <nsz@...t70.net> To: musl@...ts.openwall.com Subject: Re: [PATCH] malloc: always fail with ENOMEM * Julien Ramseier <j.ramseier@...il.com> [2017-01-09 09:47:35 +0100]: > malloc may set errno to something else than ENOMEM indirectly > through mmap, though ENOMEM is the only error allowed by POSIX. > > There are cases where mmap will return EPERM instead of ENOMEM, > as highlighted by libc-test[1]. This can happen when mmap tries to > map pages near `mmap_min_addr` [2][3], as a security measure. i've seen this too and i think this should be fixed in mmap (i.e. never return EPERM for anonymous mmap(0,...), since posix specifies ENOMEM for that failure) > > [1] http://www.openwall.com/lists/musl/2016/03/30/9 > [2] https://ghc.haskell.org/trac/ghc/ticket/7500 > [3] https://github.com/torvalds/linux/blob/master/security/min_addr.c
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.