PAX HARDENING: jailify mprotect exec hardening

github-issue: #76
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD PTRACE: jailify ptrace hardening

github-issue: #76
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD PTRACE: paxify ptrace hardening

github-issue: #60 #76
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD PTRACE: fix preprocessor expression and not renamed function

github-issue: #60 #76
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD PTRACE: fix build failure, rename the options in conf/files too

github-issue: #60 #76
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD PTRACE: added missing includes

github-issue: #60 #76
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD PTRACE: jailify remaining part of ptrace, and fix build

github-issue: #60 #76
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: bump __HardenedBSD_version after jailification

Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
Update libucl to latest version
HBSD PTRACE: clarify gid usage, and add missing prison init's hook

github-issue: #60 #76
Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
Update libucl to latest version

While here correctly link libucl to libm and register the dependency on libm
for static building
HBSD: bump __HardenedBSD_version after tested and working modifications

op@opn ~/paxtest-0.9.11> ./paxtest kiddie
PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
Released under the GNU Public Licence version 2 or later

Writing output to paxtest.log
It may take a while for the tests to complete
Test results:
PaXtest - Copyright(c) 2003,2004 by Peter Busser <peter@adamantix.org>
Released under the GNU Public Licence version 2 or later

Mode: kiddie
FreeBSD opn 11.0-CURRENT FreeBSD 11.0-CURRENT #18 b0604fe(hardened/current/rejailify-ptrace): Sat Nov 29 01:38:58 CET 2014     op@opn:/tmp/amd64-objdir/usr/data/source/git/opBSD/hardenedBSD.git/sys/OP-HBSD  amd64

Executable anonymous mapping             : Killed
Executable bss                           : Killed
Executable data                          : Killed
Executable heap                          : Killed
Executable stack                         : Killed
Executable anonymous mapping (mprotect)  : Killed
Executable bss (mprotect)                : Killed
Executable data (mprotect)               : Killed
Executable heap (mprotect)               : Killed
Executable shared library bss (mprotect) : Killed
Executable shared library data (mprotect): Killed
Executable stack (mprotect)              : Killed
Anonymous mapping randomisation test     : 21 bits (guessed)
Heap randomisation test (ET_EXEC)        : 11 bits (guessed)
Heap randomisation test (PIE)            : 12 bits (guessed)
Main executable randomisation (ET_EXEC)  : No randomisation
Main executable randomisation (PIE)      : 21 bits (guessed)
Shared library randomisation test        : 21 bits (guessed)
Stack randomisation test (SEGMEXEC)      : 15 bits (guessed)
Stack randomisation test (PAGEEXEC)      : 15 bits (guessed)
Arg/env randomisation test (SEGMEXEC)    : 17 bits (guessed)
Arg/env randomisation test (PAGEEXEC)    : 17 bits (guessed)
Randomization under memory exhaustion @~0: 21 bits (guessed)
Randomization under memory exhaustion @0 : 21 bits (guessed)
Return to function (strcpy)              : paxtest: return address contains a NULL byte.
Return to function (strcpy, PIE)         : paxtest: return address contains a NULL byte.
Return to function (memcpy)              : Killed
Return to function (memcpy, PIE)         : Killed
Executable shared library bss            : Killed
Executable shared library data           : Killed
Writable text segments                   : Vulnerable

NOTE: tested only on host system, and not inside of a jail...

Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: updated my e-mail address

Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
HBSD: added myself to ptrace's copyright

Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
Merge remote-tracking branch 'freebsd/master' into hardened/current/master
Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/userlandenhanced