ShadowHeap: Memory Safety through Efficient Heap Metadata Validation

Johannes Bouché, Lukas Atkinson, and Martin Kappes+


Frankfurt University of Applied Sciences
, Frankfurt, Germany
{johannes.bouche, lukas.atkinson, kappes}@fb2.fra-uas.de

 

 

Abstract

In the past, stack smashing attacks and buffer overflows were some of the most insidious data-dependent 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.

Keywords: Memory Safety, Buffer Overflow, Memory Allocator, System Integrity

 

+: Corresponding author: Martin Kappes
Faculty of Computer Science and Engineering, Frankfurt University of Applied Sciences, 60318 Frankfurt am Main, Germany, Tel: +49-69-1533-2791

 

Journal of Wireless Mobile Networks, Ubiquitous Computing, and Dependable Applications (JoWUA)
Vol. 12, No. 4, pp. 4-21, December 2021 [pdf]

Received: April 15, 2021; Accepted: September 2, 2021; Published: December 31, 2021

DOI: 10.22667/JOWUA.2021.12.31.004