Hello everyone,With the help of Shawn and Olivér from HardenedBSD we have finally incorporated the first piece of their wonderfully crafted improvements: Address Space Layout Randomization, or short ASLR. This change only affects the kernel and is now open for public testing.Things to be aware of:This is a call for testing that replaces the kernel. Use with care. The old kernel can still be booted from the early boot menu under option (5), selecting "kernel.old" and then continue the boot with option (1).The kernel ABI changes, VMware and XEN plugins may not work at the moment. This problem can only be addressed once the kernel is in place and our packages use the new API. Manually compiled drivers may need to be recompiled against the current master of src.gitThe impact of the patch is minimal, the system will boot ok, continue to function normally and ASLR will be enables as "opt-out", which means it will be on by default.The next firmware upgrade will remove the test kernel and switch back to a vanilla version without ASLR. In those cases, the kernel needs to be reapplied.To switch to the ASLR kernel:# opnsense-update -kr 16.1.8-aslr && /usr/local/etc/rc.rebootTo switch back to the standard kernel:# opnsense-update -k && /usr/local/etc/rc.rebootI will ask Shawn to explain the impact of the patch a bit more as well as what it means for going forward.On a more or less related note: consider me totally happy about this CFT Have fun,Franco
root@home_gateway:~ # ps aux | grep kernelroot 0 0.0 0.0 0 160 - DLs 12:56PM 0:00.01 [kernel]root 55148 0.0 0.2 18728 2244 0 S+ 12:58PM 0:00.00 grep kernelroot@home_gateway:~ # ps aux | grep kernel | moreroot 0 0.0 0.0 0 160 - DLs 12:56PM 0:00.01 [kernel]root 55465 0.0 0.2 18728 2248 0 S+ 12:58PM 0:00.00 grep kernelroot@home_gateway:~ # freebsd-version -k10.2-RELEASE-p14root@home_gateway:~ # freebsd-version -u10.2-RELEASE-p14root@home_gateway:~ # uname -mrsFreeBSD 10.2-RELEASE-p14 amd64root@home_gateway:~ # getconf LONG_BIT64root@home_gateway:~ # uname -aFreeBSD home_gateway.home 10.2-RELEASE-p14 FreeBSD 10.2-RELEASE-p14 #0 eda6bf2(master): Wed Mar 30 06:11:42 CEST 2016 root@sensey64:/usr/obj/usr/src/sys/SMP amd64
# dmesg | grep HBSD[HBSD ASLR (compat)] status: opt-out[HBSD ASLR (compat)] mmap: 14 bit[HBSD ASLR (compat)] exec base: 14 bit[HBSD ASLR (compat)] stack: 14 bit[HBSD ASLR (compat)] vdso: 8 bit[HBSD LOG] logging to system: enabled[HBSD LOG] logging to user: disabled[HBSD ASLR] status: opt-out[HBSD ASLR] mmap: 30 bit[HBSD ASLR] exec base: 30 bit[HBSD ASLR] stack: 42 bit[HBSD ASLR] vdso: 28 bit[HBSD ASLR] map32bit: 18 bit[HBSD ASLR] disallow MAP_32BIT mode mmap: opt-in
Hi, somebody has a documentation for this proyect? thanks.
Code: [Select]# dmesg | grep HBSD[HBSD ASLR (compat)] status: opt-out[HBSD ASLR (compat)] mmap: 14 bit[HBSD ASLR (compat)] exec base: 14 bit[HBSD ASLR (compat)] stack: 14 bit[HBSD ASLR (compat)] vdso: 8 bit[HBSD LOG] logging to system: enabled[HBSD LOG] logging to user: disabled[HBSD ASLR] status: opt-out[HBSD ASLR] mmap: 30 bit[HBSD ASLR] exec base: 30 bit[HBSD ASLR] stack: 42 bit[HBSD ASLR] vdso: 28 bit[HBSD ASLR] map32bit: 18 bit[HBSD ASLR] disallow MAP_32BIT mode mmap: opt-inIt'll show you some basic info about the implementation. If everything continues to work that is about all that there is to it from the user perspective. The next step will be to (selectively) add PIE to main executables in order to take advantage of the full scope of ASLR.There will be more HardenedBSD additions in the future. OPNsense will likely stay on 10.x for a bit longer than HardenedBSD builds with OPNsense (these use 11-CURRENT), but eventually the two paths will become more similar. As we keep integrating additions and go forward with FreeBSD progress adoption.Thank you for testing.
But looking at the smooth run it's merge time soon if Shawn agrees.