Lune

S&P2024Top-tier venue

Serberus: Protecting Cryptographic Code from Spectres at Compile-Time

Nicholas Mosier, Hamed Nemati, John C. Mitchell, Caroline Trippel

Abstract

We present Serberus, the first comprehensive mitigation for hardening constant-time (CT) code against Spectre attacks (involving the PHT, BTB, RSB, STL, and/or PSF speculation primitives) on existing hardware. Serberus is based on three insights. First, some hardware control-flow integrity (CFI) protections restrict transient control-flow to the extent that it may be comprehensively considered by software analyses. Second, conformance to the accepted CT code discipline permits two code patterns that are unsafe in the post-Spectre era. Third, once these code patterns are addressed, all Spectre leakage of secrets in CT programs can be attributed to one of four classes of taint primitives—instructions that can transiently assign a secret value to a publicly-typed register. We evaluate Serberus on cryptographic primitives in the OpenSSL, Libsodium, and Hacl* libraries. Serberus introduces 21.3% runtime overhead on average, compared to 24.9% for the next closest state-of-the-art software mitigation, which is less secure.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

11 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • RTL Verification for Secure Speculation Using Contract Shadow Logic cites Spectre Attacks: Exploiting Speculative Execution
  • RTL Verification for Secure Speculation Using Contract Shadow Logic cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • RTL Verification for Secure Speculation Using Contract Shadow Logic cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
  • ZombieLoad: Cross-Privilege-Boundary Data Sampling cites Spectre Attacks: Exploiting Speculative Execution
  • ZombieLoad: Cross-Privilege-Boundary Data Sampling cites DRAMA: Exploiting DRAM Addressing for Cross-CPU Attacks
  • ZombieLoad: Cross-Privilege-Boundary Data Sampling cites A Systematic Evaluation of Transient Execution Attacks and Defenses
  • Specification and Verification of Strong Timing Isolation of Hardware Enclaves cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • Specification and Verification of Strong Timing Isolation of Hardware Enclaves cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
  • RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security Verification cites Spectre Attacks: Exploiting Speculative Execution
  • RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security Verification cites DRAMA: Exploiting DRAM Addressing for Cross-CPU Attacks
  • RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security Verification cites A Systematic Evaluation of Transient Execution Attacks and Defenses
  • A Systematic Evaluation of Transient Execution Attacks and Defenses cites Spectre Attacks: Exploiting Speculative Execution
  • A Systematic Evaluation of Transient Execution Attacks and Defenses cites DRAMA: Exploiting DRAM Addressing for Cross-CPU Attacks
  • Automated Side-Channel Analysis of Cryptographic Protocol Implementations cites Spectre Attacks: Exploiting Speculative Execution
  • Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution cites Spectre Attacks: Exploiting Speculative Execution
  • Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic Programs cites Spectre Attacks: Exploiting Speculative Execution
  • Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic Programs cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
  • Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic Programs cites A Systematic Evaluation of Transient Execution Attacks and Defenses
  • Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic Programs cites Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers11

  1. RTL Verification for Secure Speculation Using Contract Shadow LogicQinhan Tan, Yuheng Yang, Thomas Bourgeat, Sharad Malik et al.ASPLOS 2025 · 12 citations
  2. RTL2MμPATH: Multi-μPATH Synthesis with Applications to Hardware Security VerificationYao Hsiao, Nikos Nikoleris, Artem Khyzha, Dominic P. Mulligan et al.MICRO 2024 · 12 citations
  3. Automated Side-Channel Analysis of Cryptographic Protocol ImplementationsFaezeh Nasrabadi, Robert Künnemann, Hamed NematiCCS 2026 · 2 citations
  4. Cassandra: Efficient Enforcement of Sequential Execution for Cryptographic ProgramsAli Hajiabadi, Trevor E. CarlsonISCA 2025 · 2 citations
  5. Specification and Verification of Strong Timing Isolation of Hardware EnclavesStella Lau, Thomas Bourgeat, Clément Pit-Claudel, Adam ChlipalaCCS 2024 · 1 citation

Builds on54

  1. Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
  2. Foreshadow: Extracting the Keys to the Intel SGX Kingdom with Transient Out-of-Order ExecutionJo Van Bulck, Marina Minkin, Ofir Weisse, Daniel Genkin et al.USENIX Security 2018 · 1,175 citations
  3. DRAMA: Exploiting DRAM Addressing for Cross-CPU AttacksPeter Pessl, Daniel Gruss, Clémentine Maurice, Michael Schwarz et al.USENIX Security 2016 · 500 citations
  4. ZombieLoad: Cross-Privilege-Boundary Data SamplingMichael Schwarz, Moritz Lipp, Daniel Moghimi, Jo Van Bulck et al.CCS 2019 · 464 citations
  5. A Systematic Evaluation of Transient Execution Attacks and DefensesClaudio Canella, Jo Van Bulck, Michael Schwarz, Moritz Lipp et al.USENIX Security 2019 · 442 citations

Related papers

  1. SpecCFI: Mitigating Spectre Attacks using CFI Informed SpeculationEsmaeil Mohammadian Koruyeh, Shirin Haji Amin Shirazi, Khaled N. Khasawneh, Chengyu Song et al.S&P 2020 · 74 citations
  2. Protecting Cryptographic Code Against Spectre-RSB: (and, in Fact, All Known Spectre Variants)Santiago Arranz-Olmos, Gilles Barthe, Chitchanok Chuengsatiansup, Benjamin Grégoire et al.ASPLOS 2025 · 1 citation
  3. Declassiflow: A Static Analysis for Modeling Non-Speculative Knowledge to Relax Speculative Execution Security MeasuresRutvik Choudhary, Alan Wang, Zirui Neil Zhao, Adam Morrison et al.CCS 2023 · 4 citations
  4. ProSpeCT: Provably Secure Speculation for the Constant-Time PolicyLesly-Ann Daniel, Marton Bognar, Job Noorman, Sébastien Bardin et al.USENIX Security 2023
  5. Place Protections at the Right Place: Targeted Hardening for Cryptographic Code against Spectre v1Yiming Zhu, Wenchao Huang, Yan XiongUSENIX Security 2025
Dusk over the sea between two cliffs drawn in fine vertical lines