SoK: Eternal War in Memory

Laszlo Szekeres, Mathias Payer, Tao Wei, Dawn SongIEEE Symposium on Security and Privacy 2013 · OpenReview

Abstract: Memory corruption bugs in software written in low-level languages like C or C++ are one of the oldest problems in computer security. The lack of safety in these languages allows attackers to alter the program's behavior or take full control over it by hijacking its control flow. This problem has existed for more than 30 years and a vast number of potential solutions have been proposed, yet memory corruption attacks continue to pose a serious threat. Real world exploits show that all currently deployed protections can be defeated. This paper sheds light on the primary reasons for this by describing attacks that succeed on today's systems. We systematize the current knowledge about various protection techniques by setting up a general model for memory corruption attacks. Using this model we show what policies can stop which attacks. The model identifies weaknesses of currently deployed techniques, as well as other proposed protections enforcing stricter policies. We analyze the reasons why protection mechanisms implementing stricter polices are not deployed. To achieve wide adoption, protection mechanisms must support a multitude of features and must satisfy a host of requirements. Especially important is performance, as experience shows that only solutions whose overhead is in reasonable bounds get deployed. A comparison of different enforceable policies helps designers of new protection mechanisms in finding the balance between effectiveness (security) and efficiency. We identify some open research problems, and provide suggestions on improving the adoption of newer techniques.

Introduction

Memory corruption bugs—such as buffer overflows and use-after-free errors—have plagued low-level languages like C and C++ for over three decades. Despite the introduction of "standard" defenses like Address Space Layout Randomization (ASLR) and Data Execution Prevention (DEP), attackers continue to find success, as evidenced by persistent high-profile exploits in modern browsers and operating systems. This "Systematization of Knowledge" (SoK) paper addresses the fundamental fragmentation in the field by providing a common model to compare how different attacks work and why specific defenses fail in practice.

A Unified Attack Model

To understand the gap between theoretical security and practical deployment, the authors developed a six-step exploitation model. This pipeline breaks down every memory attack into discrete stages, allowing for a granular evaluation of defense mechanisms.

The six-step exploitation model systematizing memory corruption attacks from initial pointer corruption to final exploit execution.

The model follows these stages:

  1. Make a pointer invalid: Triggering a bug to make a pointer go out-of-bounds or become dangling.
  2. Dereference the pointer: Using the invalid pointer to read, write, or free memory.
  3. Corrupt/Leak data: Modifying a code pointer, data pointer, or variable to alter program state.
  4. Bypass randomization: Using information leaks to discover memory addresses or guessing entropy.
  5. Divert control flow: Hijacking an indirect jump or return instruction to point to malicious locations.
  6. Execute malicious code: Running shellcode or chaining existing code fragments (ROP gadgets).

By categorizing defenses—ranging from Stack Cookies to Control-Flow Integrity (CFI)—based on which step they block, the authors can evaluate not just effectiveness, but also the specific trade-offs in performance and compatibility.

Empirical Analysis and Real-World Exploits

The study performs a meta-analysis of existing research and evaluates defenses against real-world vulnerabilities. A key finding is that probabilistic defenses like ASLR are fundamentally fragile. If an attacker can use a memory bug to leak just one pointer, the entire randomization scheme often collapses.

Analysis of real-world CVEs demonstrating the role of address leakage and user scripting in modern exploits.

As shown in the table above, many high-profile vulnerabilities (e.g., in Adobe Flash, Firefox, and Internet Explorer) rely on address leakage to bypass modern protections. Attackers often use scripting environments like JavaScript or ActionScript to facilitate these leaks, turning a simple memory error into a reliable exploit.

The Performance-Security Trade-off

The authors identify the "10% Rule" as a primary barrier to adoption: any defense with a performance overhead greater than 10% is unlikely to see wide deployment. Industry "sweet spots" are often even lower, closer to 5%.

  • Full Memory Safety: Solutions like SoftBound+CETS provide the strongest protection but often incur over 100% overhead, effectively doubling execution time.
  • Control-Flow Integrity (CFI): Identified as a promising middle ground with moderate overhead (15-25%), though it faces challenges with binary compatibility and modularity.
  • Deployed Defenses (ASLR/DEP): These remain the standard because they offer near 0% overhead due to hardware support, despite being the "weakest" against sophisticated attackers who utilize ROP and information leaks.

Conclusion and Future Directions

The "eternal war" in memory persists because academic solutions often fail the real-world tests of performance and compatibility. Many advanced protections require changing memory layouts or recompiling entire library chains, which is a non-starter for legacy systems and proprietary binaries.

The paper concludes that future progress depends on hardware acceleration to reduce software check overhead, the development of modular protections that don't require full system source code, and improved static analysis to minimize unnecessary security checks in safe code segments.

Summary updated

Abstract

Memory corruption bugs in software written in low-level languages like C or C++ are one of the oldest problems in computer security. The lack of safety in these languages allows attackers to alter the program's behavior or take full control over it by hijacking its control flow. This problem has existed for more than 30 years and a vast number of potential solutions have been proposed, yet memory corruption attacks continue to pose a serious threat. Real world exploits show that all currently deployed protections can be defeated. This paper sheds light on the primary reasons for this by describing attacks that succeed on today's systems. We systematize the current knowledge about various protection techniques by setting up a general model for memory corruption attacks. Using this model we show what policies can stop which attacks. The model identifies weaknesses of currently deployed techniques, as well as other proposed protections enforcing stricter policies. We analyze the reasons why protection mechanisms implementing stricter polices are not deployed. To achieve wide adoption, protection mechanisms must support a multitude of features and must satisfy a host of requirements. Especially important is performance, as experience shows that only solutions whose overhead is in reasonable bounds get deployed. A comparison of different enforceable policies helps designers of new protection mechanisms in finding the balance between effectiveness (security) and efficiency. We identify some open research problems, and provide suggestions on improving the adoption of newer techniques.
BibTeX
@inproceedings{szekeres2013sok,
  author = {Laszlo Szekeres and Mathias Payer and Tao Wei and Dawn Song},
  title = {{SoK: Eternal War in Memory}},
  booktitle = {IEEE Symposium on Security and Privacy},
  year = {2013},
  url = {https://openreview.net/forum?id=ruu9t2DJL-5},
}
Figure