opnsense-src/sys
Shawn Webb 1af48f7b4b HBSD: Harden the stack guard
The Stack Clash article shows that a single page for the stack guard
isn't sufficient. Bump the size of the stack guard up to 2MB by default.
Provide a way for the stack guard size to be configurable with either a
custom kernel configuration or via a sysctl node. The sysctl node
(security.bsd.stack_guard_size) is only exposed if PAX_HARDENING is
disabled. Otherwise, the user must recompile with a custom kernel
(kernel option: STACK_GUARD_SIZE) to modify the size. The size MUST be
divisible by PAGE_SIZE (default: 4096 bytes) and cannot be zero.

ASLR does help address the Stack Clash, especially since HardenedBSD
follows the PaX design with true stack randomization (randomizing the
top of the stack while also inserting a random-sized gap). However, ASLR
does not mitigate the Stack Clash attack. It simply makes the attacker's
job much more difficult. Without ASLR, the attacker will know in advance
where the stack starts and can easily determine the current stack
layout. Utilizing that information, the attacker can figure out how to
manipulate the address space to clash with the stack.

Signed-off-by:	Shawn Webb <shawn.webb@hardenedbsd.org>
Sponsored-by:	SoldierX
2017-06-25 21:17:40 +02:00
..
amd64 Add sample HARDENED amd64 kernel config. 2017-02-11 17:51:05 -05:00
arm Initial import of HardenedBSD ASLR complete. 2016-10-10 01:53:29 -04:00
arm64 Initial import of HardenedBSD ASLR complete. 2016-10-10 01:53:29 -04:00
boot HBSD: Introducing SafeStack 2017-02-11 14:26:46 -05:00
bsm src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
cam Fix multiple vulnerabilities of OpenSSL. [SA-17:02] 2017-02-23 11:39:29 +01:00
cddl src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
compat Initial import of HardenedBSD ASLR complete. 2016-10-10 01:53:29 -04:00
conf HBSD: Harden the stack guard 2017-06-25 21:17:40 +02:00
contrib Fix ipfilter(4) fragment handling panic. 2017-04-27 09:14:52 +02:00
crypto src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
ddb src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
dev Add Intel Atom Cherryview SOC HSUART support 2017-06-12 11:52:37 +02:00
fs Introduce HardenedBSD's procfs hardening. 2017-02-11 16:39:16 -05:00
gdb src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
geom src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
gnu src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
hardenedbsd Initialize generic hardening subsystem at prison start. 2017-02-11 16:52:27 -05:00
i386 Remove PAX and PAX_ASLR from i386 GENERIC kernel. 2016-10-21 10:19:40 -04:00
isa src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
kern Revert "Microoptimize locking primitives by avoiding unnecessary atomic ops." 2017-02-20 12:16:47 +01:00
kgssapi src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
libkern Discard 3072 bytes instead of 1024 bytes (#22) 2017-03-20 19:01:49 +01:00
mips src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
modules Fix multiple vulnerabilities of OpenSSL. [SA-17:02] 2017-02-23 11:39:29 +01:00
net Revert "enc: revert rcvif meddling" 2017-03-15 06:34:19 +01:00
net80211 src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
netgraph src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
netinet netinet/pf: shared forwarding additions 2017-02-15 21:51:35 +01:00
netinet6 pf/ipfw/netinet[6]: IP forwarding rework, fixes IPv4 in pf(4) 2017-01-10 16:16:39 +01:00
netipsec ipsec: skip may be zero in IPv4 handling, but must not 2017-03-15 06:34:35 +01:00
netnatm src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
netpfil pf: port extended DSCP support from OpenBSD 2017-05-06 11:18:52 +02:00
netsmb src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
nfs src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
nfsclient src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
nfsserver src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
nlm src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
ofed src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
opencrypto src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
pc98 src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
powerpc src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
riscv src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
rpc src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
security src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
sparc64 Initial import of HardenedBSD ASLR complete. 2016-10-10 01:53:29 -04:00
sys Fix multiple vulnerabilities of OpenSSL. [SA-17:02] 2017-02-23 11:39:29 +01:00
teken src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
tests src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
tools src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
ufs src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
vm HBSD: Harden the stack guard 2017-06-25 21:17:40 +02:00
x86 Fix multiple vulnerabilities of OpenSSL. [SA-17:02] 2017-02-23 11:39:29 +01:00
xdr src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
xen Fix multiple vulnerabilities of ntp. [SA-17:03] 2017-04-16 11:26:43 +02:00
Makefile src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00