Here is a summary of the paper "Adversarial Prefetch: New Cross-Core Cache Side Channel Attacks".
TL;DR
Researchers discovered two security flaws in the implementation of Intel's PREFETCHW instruction, allowing attackers to manipulate and read the cache coherence states of read-only data. By exploiting these flaws, the authors developed novel cross-core cache attacks (Prefetch+Reload and Prefetch+Prefetch) that achieve record-breaking data exfiltration speeds and work across modern processor architectures, supercharging both traditional side-channel and transient execution attacks (like Spectre).
What Problem Does This Paper Address?
Cache timing attacks are a powerful class of hardware vulnerabilities where an attacker spies on a victim's memory access patterns by timing how long it takes to read shared data.
Historically, these attacks face a tradeoff between speed and practicality:
- Last-Level Cache (LLC) attacks (like the famous Flush+Reload) work across different CPU cores, but they require evicting data all the way out to slow main memory (DRAM). This creates a massive speed bottleneck. Furthermore, modern server processors increasingly use "non-inclusive" LLCs, which breaks many of these traditional eviction methods.
- Private Cache attacks (targeting fast L1/L2 caches) are much faster but usually require the attacker and victim to share the exact same physical CPU core via Simultaneous Multithreading (SMT/Hyper-Threading). Cloud providers often disable SMT specifically to prevent this.
The authors sought to bridge this gap: Can we build an attack that is as fast as a private cache attack, but works across different physical cores and ignores the underlying LLC architecture?
Methods
The authors found their solution in PREFETCHW, an x86 instruction designed to speed up software by pulling data into the L1 cache and preemptively setting its cache coherence state to "Modified" (M) in anticipation of a future write operation.
They discovered two critical hardware bugs in Intel's implementation of PREFETCHW:
- Permission Bypass:
PREFETCHWsuccessfully executes on read-only shared data. It changes the data's coherence state to Modified across the entire processor without triggering a write-permission fault. - Timing Leak: The execution time of
PREFETCHWvaries based on the data's current coherence state. It executes quickly if the data is already in the Modified state, but slowly if it has to invalidate copies in other cores (Shared state).
Using these observations, the authors built new attacks:
- Prefetch+Reload / Prefetch+Prefetch: The attacker uses
PREFETCHWto force a shared cache line into the Modified state. If the victim (on another core) accesses that data, the hardware automatically changes the state to Shared. The attacker then times a subsequent prefetch or reload operation. If it's fast, the victim didn't touch the data; if it's slow, the victim did.
Datasets
Not applicable in the traditional machine learning sense. The authors evaluated their attacks on real-world hardware, specifically Intel desktop (Core i7-6700, i7-7700K) and server processors (Xeon Platinum 8124M, 8151). They targeted real-world applications like GnuPG 1.4.13 (for cryptographic key leakage) and the GDK library (for keystroke timing).
Key Insights and Ideas
- Microarchitectural side-effects bypass architectural permissions: Even though a program cannot architecturally write to read-only memory,
PREFETCHWallows it to microarchitecturally pretend it's going to. This forces the CPU's cache coherence protocol (MESI) to invalidate the data in the victim's private cache, creating an observable footprint. - Staying on-chip is a game-changer: Because these attacks only manipulate private cache coherence states rather than evicting data to DRAM, they are incredibly fast and much stealthier than traditional flush-based attacks.
- LLC inclusivity doesn't matter: Since the attack operates directly on private L1/L2 caches via the coherence protocol, it works perfectly on modern server chips with non-inclusive Last-Level Caches—a major hurdle for older cross-core attacks.
Key Results
- Record-breaking Covert Channels: When two malicious programs collude to share data, Prefetch+Load and Prefetch+Prefetch achieved capacities of 840 KB/s and 822 KB/s, respectively, using just a single shared cache line. This is the highest single-line capacity among all existing CPU cache covert channels.
- Real-world Side Channels: The attacks successfully leaked cryptographic keys from GnuPG's square-and-multiply algorithm with 96.2% accuracy. They also precisely tracked keystroke timings in a text editor with zero false positives or negatives.
- Supercharging Spectre: When used as the exfiltration channel for a Spectre v1 transient execution attack, the prefetch-based channels were up to 3x faster than the standard Flush+Reload method. Because the encoding operations stay in the fast private cache, attackers can leak up to 17 bytes per transient window (compared to just 8 bytes for Flush+Reload).
Limitations and Future Work
- Hardware Specificity: The vulnerability appears specific to Intel processors. The authors tested AMD processors and found they correctly enforce write permission checks for
PREFETCHW, rendering them immune to this specific attack. - Reliability under load: The attacks can be disrupted if the attacker's core has SMT enabled and the sibling thread is highly memory-intensive, which fills the L1/L2 request buffer and causes prefetch instructions to be dropped.
- Mitigations: The authors suggest that future CPU designs must enforce write permission checks for
PREFETCHW(faulting or ignoring the instruction on read-only data) and ensure its execution time is constant to prevent timing leaks. Software-level cache partitioning (like DAWG) could also block these attacks.
Summary updated