2 ms·
Disclaimer: I'm not too familiar with the code. "This arena is mmap'd, with guard pages before and after so pointer over- and under-runs won't wander into it."
by bello 12y ago
Disclaimer: I'm not too familiar with the code.
"This arena is mmap'd, with guard pages before and after so pointer over- and under-runs won't wander into it."
Doesn't that mean that this will only protect against overreads of a certain max length (such that the int16 length in heardbleed)? Seems like that wouldn't help with a length defined as a bigger int. I wonder if there's any better ways of doing this.
- ramidarigaz 12y agoThe beginning and end of the allocated section of memory (the guard pages they refer to) are marked as PROT_NONE with mprotect, meaning that any access to them will cause a segfault. It's possible that a misbehaving process could jump straight into the unprotected memory, but it would have to not read from the guard pages at all. Buffer overruns don't have that problem (since they access memory sequentially), and would cause the program to crash before any sensitive data could be read (assuming the overrun starts outside the protected area).
- bello 12y agoThat makes sense, thank you!
- xyzzy123 12y agoThe idea is that a read overrun where the base pointer starts in a different arena would have to cross the guard pages to "get to" the secure arena.