On 12/09/2010 06:29 PM, Stefano Bonifazi wrote:
how can one think that addresses around zero are free for a mapping??

Addresses around zero are always free, because if they weren't you couldn't detect NULL pointer dereferences reliably.

mmap-ing at zero thus is a tricky operation, because it removes the possibility to detect NULL pointer dereferences. What's worse, such ability would be lost even for _kernel_ dereferences of NULL, thus opening a large security hole for privilege-escalation or kernel exploits. So, mmap-ing addresses close to zero is restricted to root.

Paolo

Reply via email to