Introduction
The Rowhammer vulnerability represents a fundamental hardware flaw in DRAM where high-frequency access to a specific memory row (the "hammer" row) induces electrical leakage, potentially flipping bits in adjacent "victim" rows. If these victim rows contain sensitive kernel data, such as page tables, an unprivileged attacker can escalate privileges to full system compromise.
Existing software-level defenses, including CATT, CTA, and RIP-RH, operate on the principle of isolation. They attempt to physically separate attacker-controlled memory from sensitive kernel memory in DRAM. The underlying assumption is that an attacker cannot hammer a row they cannot directly access. PThammer challenges this assumption by demonstrating that the CPU's Memory Management Unit (MMU) can be coerced into performing the hammering implicitly.
Methodology
PThammer exploits the address translation process, turning the MMU into a "confused deputy." When a virtual address is accessed, the MMU must translate it to a physical address. If the Translation-Lookaside Buffer (TLB) misses, the MMU performs a page-table walk in DRAM.
The attack focuses on Level-1 Page Table Entries (L1PTEs). To achieve the high-frequency access required for Rowhammer, the authors developed two primary algorithms:
- TLB Eviction: Identifies a minimal set of addresses to flush the TLB, ensuring every subsequent access triggers a page-table walk.
- Cache Eviction: Targets the Last-Level Cache (LLC) to flush L1PTEs, forcing the MMU to fetch them directly from DRAM.
By maintaining higher-level page structures in the cache while evicting L1PTEs, the attack creates a high-speed "fast path" to DRAM. Furthermore, "memory spraying" is used to populate RAM with L1PTEs, and timing side-channels (bank conflicts) help identify pairs of L1PTEs positioned to perform "double-sided" hammering on a target row.
Experimental Setup
The efficacy of PThammer was evaluated on three distinct hardware configurations to demonstrate its generalizability across different Intel architectures:
- Lenovo T420: Intel SandyBridge i5-2540M with 8GB DDR3.
- Lenovo X230: Intel IvyBridge i5-3230M with 8GB DDR3.
- Dell E6420: Intel SandyBridge i7-2640M with 8GB DDR3. All systems were tested in a standard Ubuntu 16.04 environment.
Results
PThammer proved highly effective, successfully bypassing isolation-based defenses like CATT and CTA. The attack induced bit flips in kernel memory across all test machines in remarkably short timeframes.
Key findings include:
- Speed: The first bit flip was typically induced within 10 to 15 minutes of active hammering.
- Precision: The eviction set selection algorithms were highly accurate, with the LLC selection showing a false positive rate below 6%.
- Exploitation: By using "credential sprinkling," the authors successfully achieved root privileges on a CTA-protected system after an average of only seven bit flips.
Discussion and Limitations
While PThammer demonstrates a significant breach in software-only Rowhammer defenses, several limitations exist. The current study focused on DDR3 memory; while DDR4 is theoretically more susceptible, experimental verification on DDR4 systems with Target Row Refresh (TRR) or ECC memory is needed.
The attack highlights that as long as hardware features like the MMU require access to DRAM-resident structures, spatial isolation alone is insufficient. Future research may explore other "implicit hammers" within hardware, such as speculative execution or network I/O handling, which could similarly bypass current security boundaries.
Summary updated