I believe we're talking non-virtual memory, so an overflow would just end up on the next
physical page with no way to detect it. Or maybe I'm just talking through my ass (I'm not a
kernel dev).
Posted May 9, 2008 0:57 UTC (Fri) by corbet (editor, #1)
[Link]
All memory is virtual memory when the kernel is running. But kernel-space addresses are a sort of special case, in that they are mapped as one big page using a single page table entry. So it's not possible to insert inaccessible guard pages after the kernel stacks - at least, not without dropping the big mapping, which would have a significant performance cost.
4k/8k stacks
Posted May 15, 2008 11:37 UTC (Thu) by cras (guest, #7000)
[Link]
Maybe a small (32bit?) canary at the end of the stack would help a bit? Although if an
overflow
happens I guess by the time it's noticed the kernel might have crashed already.