mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] handle worst-case heap randomization in mmap_base
@ 2019-03-12 17:32 Ali Saidi
  2019-03-12 17:32 ` [PATCH 1/2] arm64/mmap: " Ali Saidi
  2019-03-12 17:32 ` [PATCH 2/2] x86/mmap: " Ali Saidi
  0 siblings, 2 replies; 13+ messages in thread
From: Ali Saidi @ 2019-03-12 17:32 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, x86
  Cc: H. Peter Anvin, Andrew Morton, Ali Saidi, Kees Cook,
	Borislav Petkov, Ingo Molnar, Thomas Gleixner, Peter Zijlstra,
	Andy Lutomirski, Dave Hansen, Will Deacon, Catalin Marinas,
	David Woodhouse, Anthony Liguori

Increase mmap_base by the worst-case brk randomization so that the stack and
heap remain apart.

In Linux 4.13 a change was committed that special cased the kernel ELF
loader when the loader is invoked directly (eab09532d400; binfmt_elf: use
ELF_ET_DYN_BASE only for PIE). Generally, the loader isn’t invoked
directly and this issue is limited to cases where it is, (e.g to set a
non-inheritable LD_LIBRARY_PATH, testing new versions of the loader). In
those rare cases, the loader doesn't take into account the amount of brk
randomization that will be applied by arch_randomize_brk(). This can
lead to the stack and heap being arbitrarily close to each other.

Ali Saidi (2):
  arm64/mmap: handle worst-case heap randomization in mmap_base
  x86/mmap: handle worst-case heap randomization in mmap_base

 arch/arm64/mm/mmap.c | 8 ++++++++
 arch/x86/mm/mmap.c   | 4 ++++
 2 files changed, 12 insertions(+)

-- 
2.15.3.AMZN


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-04-19 19:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 17:32 [PATCH 0/2] handle worst-case heap randomization in mmap_base Ali Saidi
2019-03-12 17:32 ` [PATCH 1/2] arm64/mmap: " Ali Saidi
2019-03-12 17:32 ` [PATCH 2/2] x86/mmap: " Ali Saidi
2019-03-13 16:25   ` Dave Hansen
2019-03-17 15:52     ` Saidi, Ali
2019-03-13 22:58   ` Kees Cook
2019-03-27 19:51     ` Kees Cook
2019-04-15 16:03       ` Saidi, Ali
2019-04-19  8:51         ` Ingo Molnar
2019-04-19 15:00           ` Kees Cook
2019-03-21 14:09   ` Thomas Gleixner
2019-03-26  2:13     ` Saidi, Ali
2019-03-26  8:43       ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome