Skip to main content
QUICK REVIEW

[Paper Review] Leaking Control Flow Information via the Hardware Prefetcher

Yun Chen, Lingfeng Pei|arXiv (Cornell University)|Sep 1, 2021
Security and Verification in ComputingComputer Science51 references8 citations
TL;DR

AfterImage is a novel hardware prefetcher side-channel attack that exploits Intel's Instruction Pointer-based stride prefetcher to leak control flow information across code regions, processes, and user-kernel boundaries. By training the prefetcher in one execution domain and triggering it in another, the attack achieves up to 99% success rate in leaking secrets without relying on speculative execution or branch prediction manipulation.

ABSTRACT

Modern processor designs use a variety of microarchitectural methods to achieve high performance. Unfortunately, new side-channels have often been uncovered that exploit these enhanced designs. One area that has received little attention from a security perspective is the processor's hard-ware prefetcher, a critical component used to mitigate DRAM latency in today's systems. Prefetchers, like branch predictors, hold critical state related to the execution of the application, and have the potential to leak secret information. But up to now, there has not been a demonstration of a generic prefetcher side-channel that could be actively exploited in today's hardware. In this paper, we present AfterImage, a new side-channel that exploits the Intel Instruction Pointer-based stride prefetcher. We observe that, when the execution of the processor switches between different private domains, the prefetcher trained by one domain can be triggered in another. To the best of our knowledge, this work is the first to publicly demonstrate a methodology that is both algorithm-agnostic and also able to leak kernel data into userspace. AfterImage is different from previous works, as it leaks data on the non-speculative path of execution. Because of this, a large class of work that has focused on protecting transient, branch-outcome-based data will be unable to block this side-channel. By reverse-engineering the IP-stride prefetcher in modern Intel processors, we have successfully developed three variants of AfterImage to leak control flow information across code regions, processes and the user-kernel boundary. We find a high level of accuracy in leaking information with our methodology (from 91%, up to 99%), and propose two mitigation techniques to block this side-channel, one of which can be used on hardware systems today.

Motivation & Objective

  • To demonstrate a generic, algorithm-agnostic side-channel attack exploiting the Intel IP-stride prefetcher.
  • To reverse-engineer the behavior and undocumented features of the IP-stride prefetcher in modern Intel processors.
  • To show that control flow information can be leaked across code regions, process boundaries, and user-kernel transitions using only hardware prefetching.
  • To develop mitigation techniques effective on existing hardware systems.
  • To challenge the assumption that non-speculative, non-branch-based side-channels are secure against microarchitectural leakage.

Proposed method

  • Reverse-engineered the IP-stride prefetcher’s structure, including entry format, indexing, replacement, and confidence update policies using custom microbenchmarks.
  • Used overlapping load instructions to manipulate the least significant bits of the instruction pointer and train the prefetcher on specific strides.
  • Performed a training phase with distinct strides for if and else branches to encode control flow decisions into prefetcher state.
  • Triggered the trained prefetcher across domain boundaries (e.g., user to kernel) by reusing the same IP and stride pattern in a new execution context.
  • Correlated cache access patterns from prefetching events to infer secret control flow decisions using clustering and timing analysis.
  • Proposed two mitigation techniques: one based on hardware prefetcher disablement and another using page-boundary-aware prefetching to block cross-page prefetching.

Experimental results

Research questions

  • RQ1Can the IP-stride prefetcher be exploited as a side-channel to leak control flow information across isolated execution domains?
  • RQ2To what extent does the prefetcher’s state persist and propagate across user-kernel and process boundaries?
  • RQ3How does the prefetcher’s behavior differ from branch predictors in terms of training time, precision, and resistance to ASLR?
  • RQ4Can a side-channel be built that operates on non-speculative execution paths, bypassing defenses targeting speculative execution?
  • RQ5What undocumented behaviors of the IP-stride prefetcher enable cross-boundary information leakage?

Key findings

  • AfterImage successfully leaks control flow information across code regions with a success rate of 91% to 99%.
  • The IP-stride prefetcher can prefetch across virtual page boundaries, enabling cross-page and cross-domain information leakage.
  • The prefetcher’s training process is faster and more precise than the branch predictor, as it uses only 8 least significant bits of the IP, making it less affected by ASLR.
  • The attack operates on non-speculative paths, rendering many existing defenses against speculative execution attacks ineffective.
  • The reverse-engineered prefetcher model reveals undocumented features, including confidence counter mechanisms and page-checking policies.
  • One mitigation technique can be deployed on existing hardware systems to block the side-channel by disabling cross-page prefetching.

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.