Require EFT shared objects have a PT_PHDR entry to be considered
authorkurt <kurt@openbsd.org>
Tue, 27 Jan 2015 00:33:21 +0000 (00:33 +0000)
committerkurt <kurt@openbsd.org>
Tue, 27 Jan 2015 00:33:21 +0000 (00:33 +0000)
commitcc75aa50d4711fba1f346e82ffe433225721fbfb
treeab5d788ad29e3ff7eb5e5d7b8f2d8a02664b23b4
parent56b6d61326f145cc3ab78a126b1b1a2f3b8fcc59
Require EFT shared objects have a PT_PHDR entry to be considered
a pie binary. The kernel will now reject executing a typical shared
library with EINVAL. This breaks compatibility with initial static pie
binaries and requires a recent user-land prior to upgrading. In
addition, more fine grained errors can be returned from execve(2)
when errors occur while attempting to execute ELF objects.

okay guenther@, kettenis@, deraadt@
sys/kern/exec_elf.c