arrow
Return

CleanStack: A new dual-stack for defending against stack-based memory corruption attacks

delete2026-07-01
delete0
PRE
AI
L
Lei, Chong *
P
Panpan Fu
DOI:10.1016/j.cose.2026.105056delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Stack-based memory corruption vulnerabilities have long been exploited by attackers to execute arbitrary code or perform unauthorized memory operations. Various defense mechanisms have been introduced to mitigate stack memory errors, but they typically focus on specific attack types (such as control-flow hijacking or non-control data attacks), incur substantial performance overhead, or suffer from compatibility limitations. In this paper, we present CleanStack, an efficient, highly compatible, and comprehensive stack protection mechanism. CleanStack isolates stack objects influenced by external input from other safe stack objects, thereby preventing attackers from modifying return addresses via controlled stack objects. Additionally, by randomizing the placement of tainted stack objects within the Unclean Stack, CleanStack mitigates non-control data attacks by preventing attackers from predicting the stack layout. A key component of CleanStack is the identification of tainted stack objects. We analyze both static program analysis and heuristic methods for this purpose. To maximize compatibility, we adopt a heuristic approach and implement CleanStack within the LLVM compiler framework, applying it to SPEC CPU2017 benchmarks and a real-world application. Our security evaluation demonstrates that CleanStack significantly reduces the exploitability of stack-based memory errors by providing a dual-stack system with isolation and randomization. Performance evaluation results indicate that CleanStack incurs an execution overhead of only 1.73% on the SPEC CPU2017 benchmark while introducing a minimal memory overhead of just 0.04%. Compared to existing stack protection techniques, CleanStack provides broader protection coverage while maintaining low runtime overhead and good compatibility with existing compiler infrastructure, making it a practical and effective stack security solution.
Keywords:
Memory corruption attacks
Stack
Randomization
Non-control-data attacks

Journal

C
COMPUTERS & SECURITY
IF:
5.4
Papers:
295
Citations:
0

Organization

S
sichuan university of arts & science
Scholars:
271
Papers: 232
Citations: 0
U
universiti sains malaysia
Scholars:
287
Papers: 125
Citations: 0
Cited Papers

Cited Papers

No cited papers available