]> Git Repo - linux.git/commit
binfmt_elf: fix PIE execution with randomization disabled
authorJiri Kosina <[email protected]>
Wed, 2 Nov 2011 20:37:41 +0000 (13:37 -0700)
committerLinus Torvalds <[email protected]>
Wed, 2 Nov 2011 23:06:58 +0000 (16:06 -0700)
commita3defbe5c337dbc6da911f8cc49ae3cc3b49b453
tree0971645887ef2848ad4f7bc86d2204aacb748de9
parentb35a35b556f5e6b7993ad0baf20173e75c09ce8c
binfmt_elf: fix PIE execution with randomization disabled

The case of address space randomization being disabled in runtime through
randomize_va_space sysctl is not treated properly in load_elf_binary(),
resulting in SIGKILL coming at exec() time for certain PIE-linked binaries
in case the randomization has been disabled at runtime prior to calling
exec().

Handle the randomize_va_space == 0 case the same way as if we were not
supporting .text randomization at all.

Based on original patch by H.J. Lu and Josh Boyer.

Signed-off-by: Jiri Kosina <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Russell King <[email protected]>
Cc: H.J. Lu <[email protected]>
Cc: <[email protected]>
Tested-by: Josh Boyer <[email protected]>
Acked-by: Nicolas Pitre <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/binfmt_elf.c
This page took 0.042509 seconds and 4 git commands to generate.