Re:How OpenBSD Leverages Malloc to Find Bugs
by eridius on Tuesday November 29, 2011 @01:18PM
(#3291419)
Ah. It sounded like you were mapping 2 4k pages for the allocation itself, aligning the allocation at the end of that 2-page span, and then mapping the following page and marking it as denied.
3k empty, 1k data, 4k empty and read/write-protected.
The extra page is needed since you can't set the memory protection flags at a higher granularity.