Re:Boringcc: Proposal for a C compiler for secure software
by 0x0 on Monday December 21, 2015 @04:49PM
(#10773768)
Which was probably the reason why "mmap_min_addr" was added :) https://wiki.debian.org/mmap_min_addr
Re:Boringcc: Proposal for a C compiler for secure software
by jevinskie on Monday December 21, 2015 @07:19PM
(#10774649)
OS X and iOS map in __TEXT,__PAGEZERO to 0x0.* Of course, it is mapped without any protection levels so it isn't of much use except for catching most nullptr dereferences (just 4 GB of protection on x86_64!).
* Well, this is implemented by the default system toolchain. You'r particular toolchain can opt out of this behavior if they want to.
In fact, Linux had several privilege escalation bugs which involved putting something at 0 and executing a buggy syscall which loaded this thing due to NULL dereference and believed it's some legit internal kernel data.