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 paper provides a comprehensive survey (SoK) of rowhammer attacks and defenses on commodity operating systems. It introduces a unified framework to analyze how these attacks work, categorizes existing defenses, and identifies promising avenues for future research to combat this persistent hardware vulnerability.

What Problem Does This Paper Address?

Rowhammer is a hardware vulnerability in DRAM where repeatedly accessing certain memory rows can cause bit flips in adjacent rows, potentially leading to system compromise. While the initial discovery in 2014 sparked significant research, the landscape of attacks and defenses has become complex and fragmented. This paper addresses the need for a systematic understanding of this evolving threat. It aims to:

  • Unify the understanding of rowhammer attacks: By establishing a framework that maps attacks from their origin to their objective.
  • Categorize and analyze existing attacks: Shedding light on their techniques and identifying potential new attack vectors.
  • Systematize defenses: Categorizing both software and hardware solutions, generalizing their strategies, and highlighting their limitations.
  • Identify future research directions: Guiding the community towards more effective countermeasures.

Methods

The authors propose a unified framework to analyze rowhammer attacks, consisting of four components:

  1. Origin: Where the attack originates (local or remote).
  2. Environment: The attacker's privilege level and system context (e.g., native process, browser sandbox, VM).
  3. Methodology: The core techniques used to induce bit flips, broadly categorized into:
  4. Placing Sensitive Objects: Techniques to position sensitive data near potential victim rows (e.g., using mmap, fork, WebGL, page deduplication, per-CPU page-frame cache policies).
  5. Hammering Attacker-Induced Objects: Methods to bypass CPU/GPU caches and row buffers to repeatedly access aggressor rows. This includes explicit cache-flush instructions (clflush, clflushopt, clwb), non-temporal instructions, cache eviction, and direct memory access (DMA).
  6. Objective: The ultimate goal of the attack, such as denial-of-service, privilege escalation, or information leakage.

The paper then uses this framework to categorize and analyze a vast body of existing research on rowhammer attacks and defenses, both software and hardware.

Datasets

Not discussed in the paper.

Key Insights and Ideas

  • The "arms race" continues: Rowhammer is unlikely to be eliminated soon, necessitating ongoing research into both attacks and defenses.
  • A unified framework is crucial: The proposed framework provides a consistent lens to analyze diverse rowhammer attack vectors and their impacts, from origin to objective.
  • CPU cache control is a key battleground: Techniques to bypass CPU caches (e.g., clwb instruction, cache eviction) are critical for effective hammering, and new instructions like clwb offer novel attack opportunities.
  • Software defenses have limitations: While software defenses are more deployable, they often have specific vulnerabilities or are bypassed by new attack techniques.
  • Hardware defenses are evolving but not foolproof: Production defenses like ECC and TRR have shown vulnerabilities, and on-die ECC's effectiveness against rowhammer is still an open question.
  • Cloud environments are prime targets: The paper highlights potential rowhammer attacks in hardware-assisted VMs and on isolated GPUs within cloud platforms, posing significant security risks.

Key Results

The paper presents a comprehensive taxonomy of rowhammer attacks and defenses, drawing from numerous prior works. Key findings include:

  • Categorization of attacks: Attacks are classified based on their origin, environment, memory massaging techniques, and objectives (DoS, privilege escalation, information leakage).
  • Identification of new attack vectors: The authors highlight the potential for exploiting clwb for cache flushing and discuss potential attacks in hardware-assisted VMs and on isolated GPUs.
  • Taxonomy of defenses: Software defenses are categorized into ad-hoc attempts, DRAM-aware isolation, and RH-triggered detection. Hardware defenses are classified into Data Integrity Check, Row Activation Count, and Fabrication Process Improvement.
  • Analysis of limitations: The paper details the limitations of various defenses, such as their inability to handle all attack types, reliance on specific hardware features, or susceptibility to new attack patterns.

Limitations and Future Work

Limitations:

  • The paper acknowledges that while many software defenses aim to mitigate attacks, each category has its own limitations in terms of security guarantees and applicability.
  • Production defenses, while deployed, have also been shown to be vulnerable to sophisticated attacks.
  • The effectiveness of on-die ECC against rowhammer has not been studied in detail.

Future Work:

The authors suggest several promising directions:

  • Gaining hypervisor privilege: Exploring rowhammer attacks to break MMU-enforced HVM-hypervisor isolation in public clouds.
  • Exploiting isolated GPUs: Investigating rowhammer attacks on isolated GPUs in x86-based processors, particularly in multi-tenant cloud environments, to compromise DNN models.
  • Reinforcing DRAM-aware isolation in virtualization: Developing KVM-based isolation prototypes to counter cloud-based rowhammer attacks.
  • Detecting abnormal DRAM power: Leveraging Intel's RAPL framework to detect rowhammer activity through power consumption anomalies.
  • Detecting abnormal row-buffer conflicts: Utilizing Intel's performance monitoring events to identify rowhammer by analyzing row-buffer conflict rates.

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