SoK: Rowhammer on Commodity Operating Systems

Zhi Zhang, Decheng Chen, Jiahao Qi, Yueqiang Cheng, Shijie Jiang, Yiyang Lin, Yansong Gao, Surya Nepal, Yi Zou, Jiliang Zhang, Yang Xiang

TL;DR

This Systematization of Knowledge (SoK) paper provides a unified framework for understanding Rowhammer attacks and defenses on commodity operating systems. Crucially, the authors uncover a previously overlooked attack vector using the unprivileged Intel instruction clwb to bypass CPU caches efficiently, while highlighting systemic flaws in current software and hardware defenses.

What Problem Does This Paper Address?

Rowhammer is a physical-layer vulnerability in modern DRAM chips. When an attacker rapidly and repeatedly accesses a specific row of memory cells (known as "hammering"), the resulting electrical disturbance can cause charge leakage, flipping bits in adjacent rows. This allows an unprivileged attacker to corrupt sensitive data—like page tables or cryptographic keys—and break hardware-enforced memory isolation without exploiting a single software bug.

Since its discovery in 2014, academia and industry have been locked in a cat-and-mouse game of increasingly sophisticated attacks and defenses. This paper addresses the fragmented landscape of Rowhammer research by creating a unified framework to categorize all existing Rowhammer variants, evaluate the efficacy of current defenses, and identify unexplored security gaps.

Methods

The authors introduce a four-stage framework to model how a Rowhammer attack impacts a commodity system:

  1. Origin: Where the attack starts (local code execution vs. remote network packets).
  2. Environment: The privilege level of the attacker (browser sandbox, virtual machine, or native process).
  3. Methodology: How the attack is executed. This involves memory massaging (luring sensitive victim data next to attacker-controlled rows) and bypassing caches to directly hammer the DRAM rows.
  4. Objective: The ultimate goal (denial of service, privilege escalation, or information disclosure).

Using this framework, the authors systematically evaluate previous literature. They also perform a deep dive into Intel's CPU cache-control architecture, conducting real-world microbenchmarking to test how different cache-flushing instructions affect Rowhammer efficiency.

Datasets

As a Systematization of Knowledge (SoK) paper, this work does not train machine learning models on standard datasets. Instead, its "dataset" consists of the existing body of Rowhammer literature, analyzing over 20 distinct attack methods and dozens of defenses. For their empirical analysis of cache control, they implemented a custom microbenchmark suite executed on a physical Supermicro server equipped with an Intel Xeon Gold 6230 CPU.

Key Insights and Ideas

  • The clwb Revelation: The authors discovered that clwb (Cache Line Write Back)—an unprivileged Intel instruction designed to write modified cache lines back to memory—can be abused to explicitly flush caches. Surprisingly, it outperforms older instructions like clflush and clflushopt in hammering efficiency.
  • Defenses Built on Shaky Foundations: Many software-defined isolation defenses assume that logical memory addresses map linearly to physical DRAM rows. In reality, they completely ignore internal DRAM row remapping and data-scrambling features implemented by the memory controller, rendering these defenses ineffective in practice.
  • Hardware Defenses (TRR) are Failing: Built-in hardware mitigations like Target Row Refresh (TRR) are easily bypassed by complex, non-uniform, or many-sided hammering patterns that exploit the limited size of internal tracking tables.
Five existing hammer patterns in literature

Key Results

  • High-Efficiency Hammering: In hardware tests, executing clwb took only 252 CPU cycles on average, compared to 263 for clflushopt and 287 for clflush. This makes clwb the fastest and most efficient instruction for triggering Rowhammer bit flips discovered so far.
  • Comprehensive Taxonomy: The paper provides a rigorous qualitative breakdown of memory massaging techniques (such as mmap spraying, page deduplication, and buddy allocator manipulation), evaluating them based on whether they are stealthy, deterministic, or still available in modern operating systems.

Limitations and Future Work

  • The Scaling Blast Radius: As DRAM chips become denser, the "blast radius" (how far the electrical disturbance travels across rows) expands. Current software defenses like SoftTRR fail when the blast radius exceeds 6 rows.
  • Virtualization and GPUs: The authors note that breaking hypervisor isolation via Extended/Nested Page Tables (EPT/NPT) remains an open threat. Additionally, attacking shared cloud GPUs (which use vulnerable GDDR5 memory) is a critical, unexplored frontier.
  • Future Defenses: To counter these threats without sacrificing performance, the authors propose exploring non-intrusive detection mechanisms. Promising directions include monitoring abnormal DRAM power consumption via the Intel RAPL interface or tracking row-buffer conflicts using Intel Uncore performance counters (PCT_REQUESTS_PAGE_MISS).
Figure 1: DRAM Organization.

Summary updated

BibTeX
@inproceedings{zhang2022sok,
  author = {Zhi Zhang and Decheng Chen and Jiahao Qi and Yueqiang Cheng and Shijie Jiang and Yiyang Lin and Yansong Gao and Surya Nepal and Yi Zou and Jiliang Zhang and Yang Xiang},
  title = {{SoK: Rowhammer on Commodity Operating Systems}},
  booktitle = {AsiaCCS},
  year = {2022},
}
Figure