← Lab /Security & privacy

Compositional semantics framework detects speculative execution leaks

The authors claim their speculative non-interference framework and Spectector tool can detect and verify speculative vulnerabilities in software

Security & privacy arXiv 31 Mar 2026 Method Prototype evidence Threat model

Published as “Detecting speculative leaks with compositional semantics”

Why it matters

The tool can help compiler and hardware designers identify and eliminate speculative side-channel leaks before deployment.

Summary

Spectector automatically finds all known Spectre-style leaks in the authors’ benchmark suite and also uncovers new leaks that prior tools miss, including those that arise from interactions of multiple speculation mechanisms. The paper introduces a compositional operational semantics for speculation and a security notion called speculative non-interference, and proves the analysis sound. Evidence comes from an implementation evaluated on existing and newly crafted microbenchmarks, where it detects all leaks from prior work and additional subtle ones. The evaluation is limited to microbenchmarks, so the strength of the evidence is confined to these controlled experiments.

What they found 2

  1. Spectector detects all known leaks and leaks, including those from combined speculation mechanisms, and flags unnecessary compiler countermeasures.

    “Using Spectector, we successfully (1) detect all leaks pointed out in [47], (2) detect , subtle leaks that are out of the scope of existing approaches that check for known vulnerable code patterns [76], (3) detect leaks arising from speculation over multiple mechanisms that are not detected by existing symbolic approaches [14], and (4) identify cases where compilers unnecessarily inject countermeasures, i.e., opportunities for optimization without sacrificing security.”

  2. Spectector automatically detects leaks introduced by speculatively executed instructions or proves their absence.

    “Spectector automatically detects leaks introduced by speculatively executed instructions, or proves their absence.”

Caveats 2

  • These approaches ... share a critical limitation. They support only fixed speculation mechanisms, such as branch prediction ... which are hard-coded, e.g., in the underlying formal models.
  • Given the number of different speculative semantics studied in this paper, we leave the full formalization of all semantics, technicalities, and proof details to the associated technical report.

What’s new here 4

  • A compositional framework that can combine multiple speculation mechanisms into a single operational semantics.
  • The definition of speculative non-interference (SNI) as a security property comparing speculative and non-speculative executions.
  • An algorithm, Spectector, that uses symbolic execution to automatically prove SNI for arbitrary compositions of speculation semantics.
  • Support for five individual speculation semantics and their 18 combinations, the most extensive collection to date.

Threat model stated by the source

Adversarypassive attacker observing program execution through events
Capabilityobserves program counter and memory access locations (load/store/pc events)
Assumesmicroarchitectural details are abstracted away; observations model timing leaks via caches and control flow