Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 1028

Shadow Stack

What is Shadow Stack?

Shadow StackA shadow stack is a separate, protected stack that stores copies of return addresses so the CPU can detect tampering with the regular stack and block ROP attacks.


A shadow stack runs in parallel with the conventional call stack: every call pushes the return address to both stacks, and every return compares them. If they disagree, the CPU traps and the process aborts before a corrupted return is used. The mechanism was popularized in academic CFI papers and now ships in hardware as Intel CET shadow stack and Arm v8.5-A Guarded Control Stack (GCS). Software-only shadow stacks exist (e.g., LLVM SafeStack, clang -fsanitize=safe-stack) but pay a performance and memory-isolation cost. Shadow stacks complete the backward-edge half of CFI; forward-edge protection still requires CFI/IBT.

Examples

  1. 01

    Windows 11 enforcing user-mode shadow stacks on CET-capable CPUs.

  2. 02

    Arm GCS catching a stack-buffer overflow that overwrites a saved LR.

Frequently asked questions

What is Shadow Stack?

A shadow stack is a separate, protected stack that stores copies of return addresses so the CPU can detect tampering with the regular stack and block ROP attacks. It belongs to the Application Security category of cybersecurity.

What does Shadow Stack mean?

A shadow stack is a separate, protected stack that stores copies of return addresses so the CPU can detect tampering with the regular stack and block ROP attacks.

How does Shadow Stack work?

A shadow stack runs in parallel with the conventional call stack: every call pushes the return address to both stacks, and every return compares them. If they disagree, the CPU traps and the process aborts before a corrupted return is used. The mechanism was popularized in academic CFI papers and now ships in hardware as Intel CET shadow stack and Arm v8.5-A Guarded Control Stack (GCS). Software-only shadow stacks exist (e.g., LLVM SafeStack, clang -fsanitize=safe-stack) but pay a performance and memory-isolation cost. Shadow stacks complete the backward-edge half of CFI; forward-edge protection still requires CFI/IBT.

How do you defend against Shadow Stack?

Defences for Shadow Stack typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for Shadow Stack?

Common alternative names include: Return stack, Safe stack, GCS.

Related terms