Skip to main content
QUICK REVIEW

[Paper Review] Zipper Stack: Shadow Stacks Without Shadow

Jinfeng Li, Liwei Chen|arXiv (Cornell University)|Feb 3, 2019
Security and Verification in ComputingComputer Science33 references7 citations
TL;DR

This paper proposes Zipper Stack, a lightweight, cryptographically secure return address protection mechanism that uses a chain of message authentication codes (MACs) to authenticate all return addresses. By linking each MAC to the previous one, only the latest MAC needs protection, enabling strong resistance to powerful attackers—even those with full memory access and knowledge of the secret key—while achieving only 1.86% average performance overhead on RISC-V with FPGA-based hardware support.

ABSTRACT

Return-Oriented Programming (ROP) is a typical attack technique that exploits return addresses to abuse existing code repeatedly. Most of the current return address protecting mechanisms (also known as the Backward-Edge Control-Flow Integrity) work only in limited threat models. For example, the attacker cannot break memory isolation, or the attacker has no knowledge of a secret key or random values. This paper presents a novel, lightweight mechanism protecting return addresses, Zipper Stack, which authenticates all return addresses by a chain structure using cryptographic message authentication codes (MACs). This innovative design can defend against the most powerful attackers who have full control over the program's memory and even know the secret key of the MAC function. This threat model is stronger than the one used in related work. At the same time, it produces low-performance overhead. We implemented Zipper Stack by extending the RISC-V instruction set architecture, and the evaluation on FPGA shows that the performance overhead of Zipper Stack is only 1.86%. Thus, we think Zipper Stack is suitable for actual deployment.

Motivation & Objective

  • To address the limitations of existing return address protection mechanisms, such as reliance on memory isolation or secret randomness, which can be bypassed via memory leaks or side-channel attacks.
  • To design a mechanism that remains secure even under a strong threat model where attackers have full memory access and knowledge of the secret key.
  • To minimize performance overhead while ensuring strong authentication of return addresses through a novel cryptographic chain structure.
  • To achieve practical deployment feasibility by demonstrating low runtime overhead and binary compatibility with existing binaries.

Proposed method

  • Zipper Stack uses a cryptographic MAC chain where each MAC is computed from the current return address and the previous MAC, creating a dependency across all return addresses.
  • The security of the entire chain relies only on protecting the most recent MAC, as tampering with any earlier MAC breaks the chain's integrity.
  • The mechanism authenticates return addresses at runtime by verifying the latest MAC before each return instruction.
  • It is implemented via hardware extensions to the RISC-V instruction set, using AES-NI for efficient MAC computation.
  • The design avoids storing MACs in memory by computing them on-the-fly, reducing memory access and overhead.
  • Binary compatibility is evaluated using QEMU, with modifications to the x86-64 instruction set to support the chain structure without recompilation.

Experimental results

Research questions

  • RQ1Can a return address protection mechanism remain secure when attackers have full memory access and knowledge of the secret key?
  • RQ2Can such a mechanism achieve low performance overhead while eliminating reliance on memory isolation or secret randomness?
  • RQ3Is it possible to design a system where only a single cryptographic value needs to be protected to ensure the integrity of all return addresses?
  • RQ4How does the performance of a software-based MAC chain implementation compare to hardware-based Shadow Stack?
  • RQ5To what extent can Zipper Stack be deployed on existing binaries without recompilation?

Key findings

  • Zipper Stack achieves only 1.86% average performance overhead on RISC-V with hardware support, outperforming hardware-based Shadow Stack (2.36% overhead) when caching optimizations are applied.
  • The software-based LLVM implementation incurs 4.75% to 21.13% overhead depending on MAC computation rounds, which is still competitive compared to prior cryptographic approaches.
  • Binary compatibility testing shows 84% compatibility (42 out of 50 programs) with existing x86-64 binaries in QEMU, primarily limited by unsupported setjmp/longjmp calls.
  • The MAC chain design ensures that an attacker cannot forge a valid return address without tampering with the entire chain, making it secure even under a strong threat model.
  • Security analysis confirms that Zipper Stack resists replay attacks, JOP/COOP, and ASLR bypass techniques, as the chain’s integrity depends on the unmodified latest MAC.
  • The mechanism is more resilient than Shadow Stack because it does not depend on memory isolation, which can be compromised via page attribute manipulation or information leaks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.