Adversarial Prefetch: New Cross-Core Cache Side Channel Attacks

Yanan Guo, Andrew Zigerelli, Youtao Zhang, Jun Yang

Introduction

Cache timing attacks represent a significant class of hardware vulnerabilities, allowing attackers to infer sensitive information by monitoring memory access patterns. Traditionally, these attacks face a trade-off: Last-Level Cache (LLC) attacks like Flush+Reload work across cores but are slowed by DRAM access, while private cache attacks are fast but restricted to the same physical core via Simultaneous Multithreading (SMT). This paper introduces "Adversarial Prefetch," a new class of attacks that bypasses these limitations by exploiting flaws in Intel's PREFETCHW instruction.

The PREFETCHW Vulnerability

The researchers identified two critical vulnerabilities in the implementation of the PREFETCHW instruction on Intel processors. First, a Permission Bypass allows the instruction to execute on read-only shared data, forcing its cache coherence state to "Modified" (M) without triggering architectural write-permission faults. Second, a Timing Leak exists because the execution time of PREFETCHW depends on the current coherence state of the target data.

MESI Coherence States

As illustrated above, the attack manipulates the MESI (Modified, Exclusive, Shared, Invalid) protocol. By forcing a line into the Modified state (a), an attacker can detect if a victim on another core subsequently accesses that data, as the hardware will transition the state to Shared (b).

Attack Methodology: Prefetch+Reload and Prefetch+Prefetch

The proposed attacks, Prefetch+Reload and Prefetch+Prefetch, utilize these vulnerabilities to create a high-speed side channel. The attacker first uses PREFETCHW to prime a shared cache line into the Modified state. If the victim accesses the data, the state changes to Shared. The attacker then performs a second prefetch or reload operation. A fast response indicates the data remained in the Modified state (victim did not access), while a slow response indicates a transition to Shared (victim accessed).

Because these operations stay within the fast private caches and utilize the coherence protocol, they are immune to modern "non-inclusive" LLC architectures that often break traditional eviction-based attacks.

Experimental Results

The authors evaluated the attacks on various Intel desktop and server processors. The results demonstrate unprecedented performance for cross-core side channels.

Latency Timing Gap

As shown in the latency measurements, there is a distinct and measurable gap between the two experimental states, allowing for reliable data exfiltration. Key findings include:

  • Covert Channel Capacity: Achieved up to 840 KB/s using a single shared cache line, the highest recorded for such channels.
  • Cryptographic Leakage: Successfully extracted keys from GnuPG's square-and-multiply algorithm with 96.2% accuracy.
  • Supercharging Spectre: Accelerated Spectre v1 exfiltration by up to 3x, leaking 17 bytes per transient window compared to 8 bytes with standard methods.

Conclusion and Mitigations

Adversarial Prefetch demonstrates that microarchitectural side-effects can effectively bypass architectural permissions. To mitigate these risks, future CPU designs should enforce strict write-permission checks for prefetch instructions and ensure constant-time execution regardless of coherence states. Software-level partitioning remains a viable defense-in-depth strategy to block these cross-core leaks.

Summary updated

BibTeX
@inproceedings{guo2022adversarial,
  author = {Yanan Guo and Andrew Zigerelli and Youtao Zhang and Jun Yang},
  title = {{Adversarial Prefetch: New Cross-Core Cache Side Channel Attacks}},
  booktitle = {SP},
  year = {2022},
  doi = {10.1109/sp46214.2022.9833692},
}
Figure