Volume 12 - Issue 4
ShadowHeap: Memory Safety through Efficient Heap Metadata Validation
- Johannes Bouche
Frankfurt University of Applied Sciences, Frankfurt, Germany
johannes.bouche@fb2.fra-uas.de
- Lukas Atkinson
Frankfurt University of Applied Sciences, Frankfurt, Germany
lukas.atkinson@fb2.fra-uas.de
- Martin Kappes
Frankfurt University of Applied Sciences, Frankfurt, Germany
kappes@fb2.fra-uas.de
Keywords: Memory Safety, Buffer Overflow, Memory Allocator, System Integrity
Abstract
In the past, stack smashing attacks and buffer overflows were some of the most insidious datadependent
bugs leading to malicious code execution or other unwanted behavior in the targeted
application. Since reliable mitigations such as fuzzing or static code analysis are readily available,
attackers have shifted towards heap-based exploitation techniques. Therefore, robust methods are
required which ensure application security even in the presence of such intrusions, but existing mitigations
are not yet adequate in terms of convenience, reliability, and performance overhead. We
present a novel method to prevent heap corruption at runtime: by maintaining a copy of heap metadata
in a shadow-heap and verifying the heap integrity upon each call to the underlying allocator we
can detect most heap metadata manipulation techniques. The results demonstrate that ShadowHeap
is a practical mitigation approach, that our prototypical implementation only requires reasonable
overhead due to a user-configurable performance–security tradeoff, and that existing programs can
be protected without recompilation.