Dereferencing a NULL pointer always segfaults, right? Not if you're clever...
blog.ksplice.com
blog.ksplice.com
I feel that was a stupid approach, and having 0 unmapped is actually the better choice -- instant seqfault is imho a better way to know your program failed.
cmp dword ptr [ecx],ecx
(Assuming 'this' is in ecx.)How many C programmers are out there that do not know how VM works?
Goddamn page views.
These null pointers are sometimes function pointers. Wow. You don't even need to muck with the stack and change the return address to get arbitrary code execution.
I admit I'm surprised Linux even lets you mmap 0x0. I suppose most systems won't, since mmap_min_addr will probably be set to a sane address, but it's still a legit vulnerability.