3 ms·
My first reaction to this headline was "Surely there is never any circumstance where this is genuinely a smart thing to do, no matter how clever" but I confess
by Eliezer 17y ago
My first reaction to this headline was "Surely there is never any circumstance where this is genuinely a smart thing to do, no matter how clever" but I confess I wasn't thinking in terms of security vulnerabilities.
- lallysingh 17y agoYeah, the last line of the article: "I’ll show you how this lets an attacker use a NULL dereference in the kernel to take over the entire machine."
- Tuna-Fish 17y agoI believe some old borland compilers mapped 0 to a guard value, and checked if it ever changed to see if there were accidental writes to null. 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.
- barrkel 17y agoAre you thinking of DOS? I can't imagine a Win32 compiler doing this.
- spudlyo 17y agoHeh, in DOS a far NULL pointer was the start of the interrupt vector table -- divide by zero being first. I remember writing a program that wrote the address of one of my subroutines to a far NULL pointer and then dividing by zero.
- sketerpot 17y agoPeople used to sloppily dereference null pointers on VAX machines because position 0 in memory was always readable and had the value 0.