Skip to main content
QUICK REVIEW

[Paper Review] MeltdownPrime and SpectrePrime: Automatically-Synthesized Attacks Exploiting Invalidation-Based Coherence Protocols

Caroline Trippel, Daniel Lustig|arXiv (Cornell University)|Feb 11, 2018
Security and Verification in ComputingComputer Science7 references57 citations
TL;DR

The paper presents an automated tool that synthesizes microarchitecture-aware programs to create security litmus tests, uncovering MeltdownPrime and SpectrePrime—Prime+Probe variants exploiting cache invalidations in coherence protocols, with real-hardware proof-of-concept showing near-identical accuracy to original Meltdown/Spectre.

ABSTRACT

The recent Meltdown and Spectre attacks highlight the importance of automated verification techniques for identifying hardware security vulnerabilities. We have developed a tool for synthesizing microarchitecture-specific programs capable of producing any user-specified hardware execution pattern of interest. Our tool takes two inputs: a formal description of (i) a microarchitecture in a domain-specific language, and (ii) a microarchitectural execution pattern of interest, e.g. a threat pattern. All programs synthesized by our tool are capable of producing the specified execution pattern on the supplied microarchitecture. We used our tool to specify a hardware execution pattern common to Flush+Reload attacks and automatically synthesized security litmus tests representative of those that have been publicly disclosed for conducting Meltdown and Spectre attacks. We also formulated a Prime+Probe threat pattern, enabling our tool to synthesize a new variant of each---MeltdownPrime and SpectrePrime. Both of these new exploits use Prime+Probe approaches to conduct the timing attack. They are both also novel in that they are 2-core attacks which leverage the cache line invalidation mechanism in modern cache coherence protocols. These are the first proposed Prime+Probe variants of Meltdown and Spectre. But more importantly, both Prime attacks exploit invalidation-based coherence protocols to achieve the same level of precision as a Flush+Reload attack. While mitigation techniques in software (e.g., barriers that prevent speculation) will likely be the same for our Prime variants as for original Spectre and Meltdown, we believe that hardware protection against them will be distinct. As a proof of concept, we implemented SpectrePrime as a C program and ran it on an Intel x86 processor, averaging about the same accuracy as Spectre over 100 runs---97.9% for Spectre and 99.95% for SpectrePrime.

Motivation & Objective

  • Motivate automated verification to identify hardware security vulnerabilities arising from microarchitectural optimizations.
  • Introduce a tool that synthesizes implementation-aware assembly programs from microarchitecture descriptions and threat patterns.
  • Demonstrate synthesis of security litmus tests for Meltdown/Spectre-like attacks and derive Prime+Probe variants.
  • Showcase two-core MeltdownPrime/SpectrePrime attacks exploiting invalidation-based cache coherence protocols.

Proposed method

  • Use a domain-specific language describing microarchitecture (μ spec) and threat patterns to encode desired execution patterns.
  • Apply relational model-finding (Alloy/Kodkod) to synthesize program graphs representing security exploits.
  • Model microarchitectural events with Value in Cache Lifetime (ViCL) abstractions to capture cache occupancy dynamics.
  • Extend Check modeling to include attacker/victim processes, private/shared spaces, speculation, and coherence messages.
  • Synthesize two core Prime+Probe variants (MeltdownPrime/SpectrePrime) leveraging invalidations in coherence protocols.
  • Validate by implementing SpectrePrime on Intel x86 hardware and comparing accuracy to original Spectre.

Experimental results

Research questions

  • RQ1Can automated synthesis produce security exploits matching user-defined threat patterns on a given microarchitecture?
  • RQ2Do Prime+Probe variants exploiting invalidation-based coherence protocols achieve comparable precision to Flush+Reload-based attacks?
  • RQ3Can security litmus tests abstractly represent Meltdown/Spectre exploits and be extended to full attacks?
  • RQ4What hardware mitigations are effective against these Prime variants relative to software-level defenses?

Key findings

  • Automated synthesis can generate security litmus tests for Meltdown/Spectre-like patterns.
  • MeltdownPrime and SpectrePrime are two-core attacks that use cache coherence invalidations to achieve high-precision timing-based leakage.
  • SpectrePrime achieved 99.95% average accuracy in 100 runs on a 2.4 GHz Intel Core i7, matching Spectre’s 97.9% on the same hardware.
  • SpectrePrime on MacBook hardware demonstrates the viability of coherence-invalidations based Prime+Probe attacks.
  • Mitigations like mfence/lfence barriers mitigated both Spectre and SpectrePrime in experiments, suggesting software defenses may suffice for Prime variants, while hardware-specific mitigations may differ.

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.