Skip to main content
QUICK REVIEW

[Paper Review] Speculose: Analyzing the Security Implications of Speculative Execution in CPUs

Giorgi Maisuradze, Christian Rossow|arXiv (Cornell University)|Jan 12, 2018
Security and Verification in ComputingComputer Science22 references12 citations
TL;DR

This paper introduces Speculose, the first comprehensive analysis of speculative execution in modern CPUs, revealing that side-channel leaks from uncommitted speculative execution can be exploited to bypass kernel and user-space ASLR. By observing cache states and pipeline flush times, attackers can detect mapped kernel pages and break KASLR in under three seconds on Linux and under one second on Windows 10.

ABSTRACT

Whenever modern CPUs encounter a conditional branch for which the condition cannot be evaluated yet, they predict the likely branch target and speculatively execute code. Such pipelining is key to optimizing runtime performance and is incorporated in CPUs for more than 15 years. In this paper, to the best of our knowledge, we are the first to study the inner workings and the security implications of such speculative execution. We revisit the assumption that speculatively executed code leaves no traces in case it is not committed. We reveal several measurable side effects that allow adversaries to enumerate mapped memory pages and to read arbitrary memory---all using only speculated code that was never fully executed. To demonstrate the practicality of such attacks, we show how a user-space adversary can probe for kernel pages to reliably break kernel-level ASLR in Linux in under three seconds and reduce the Windows 10 KASLR entropy by 18~bits in less than a second.

Motivation & Objective

  • To investigate the security implications of speculative execution in modern CPUs, which has been largely overlooked despite its performance-critical role.
  • To challenge the assumption that speculative execution leaves no observable side effects, even when instructions are not committed.
  • To demonstrate how side channels in speculative execution can be exploited to break kernel and user-space Address Space Layout Randomization (ASLR).
  • To analyze the feasibility of using speculative execution to access protected memory regions, including kernel memory, without triggering traditional protection mechanisms.
  • To evaluate the practicality of these attacks using commodity hardware and real-world operating systems like Linux and Windows 10.

Proposed method

  • Reverse-engineered CPU behavior to analyze branch prediction and speculative execution mechanisms in modern x86 and ARM processors.
  • Identified two primary side channels: cache state changes and differences in instruction pipeline flush times during speculative execution.
  • Designed and implemented attacks that use speculative execution to probe memory pages without committing instructions.
  • Exploited the distinction between page faults (stall) and access violations (zeroed results) to differentiate mapped from unmapped kernel pages.
  • Used timing measurements and cache probing techniques to detect whether a virtual memory page is mapped in kernel space.
  • Evaluated the attack on real systems (Ubuntu 16.04, Windows 10) with commodity hardware to validate performance and reliability.

Experimental results

Research questions

  • RQ1Can speculative execution in modern CPUs leak information through observable side effects, even when the executed instructions are never committed?
  • RQ2To what extent can an unprivileged user-space adversary use speculative execution to bypass kernel-level memory protection mechanisms like KASLR?
  • RQ3What are the measurable side channels that allow data exfiltration from speculative execution, and how can they be exploited reliably?
  • RQ4How does speculative execution affect the security guarantees of ASLR in both user-space and kernel-space memory layouts?
  • RQ5Can speculative execution be used to distinguish between mapped and unmapped memory pages, and if so, what are the performance characteristics of such an attack?

Key findings

  • Speculative execution can leak data through cache state changes and pipeline flush timing differences, even when instructions are not committed.
  • An attacker can detect mapped kernel pages by observing that access violations (to unmapped pages) stall speculative execution, while valid accesses do not.
  • The authors successfully broke kernel ASLR on Ubuntu 16.04 with kernel 4.13.0 in less than three seconds using only user-space code.
  • On Windows 10, the attack reduced KASLR entropy by 18 bits in under one second, significantly weakening kernel address randomization.
  • Speculative execution does not allow direct reading of kernel memory due to zeroing of access-violating reads, but this behavior creates a reliable side channel for page mapping detection.
  • The attack is practical on commodity hardware and predated the public disclosure of Meltdown and Spectre, indicating that speculative execution side channels were a known threat before widespread recognition.

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.