https://github.com/HardenedBSD/secadm/commit/3dd7584b70804cf...
If this check did anything, it appears susceptible to time-of-check, time-of-use attack.
See also https://reviews.freebsd.org/D473 , where Shawn pretty cleary does not incorporate feedback from the FreeBSD community.
We would love to merge in Konstantin's ASLR work. Reviewers have pointed out performance issues and memory fragmentation issues, especially on 32-bit platforms, but it's still better than nothing. I think we should just merge it as is, maybe default to off on 32-bit platforms, and improve from there. With the intent to have it polished for 12.0-RELEASE.
One such mitigation receiving community attention is Capsicum. The Capsicum security sandbox is a viable way to constrain applications. Unlike OpenBSD's pledge, rights are limited on a file descriptor basis. It has been ported to Linux and DragonFlyBSD (although merged to neither). There has been a lot of work in FreeBSD lately to restrict base programs, especially setuid programs, using Capsicum.
https://outflux.net/blog/archives/2016/09/26/security-things...
https://outflux.net/blog/archives/2016/09/27/security-things...
https://outflux.net/blog/archives/2016/09/28/security-things...
https://outflux.net/blog/archives/2016/09/30/security-things...
https://outflux.net/blog/archives/2016/10/03/security-things...
https://outflux.net/blog/archives/2016/10/04/security-things...
And naturally some stuff is exclusive to linux upstream, though grsec will benefit from those automatically if they deem it good enough.