[Paper Review] PThammer: Cross-User-Kernel-Boundary Rowhammer through Implicit Accesses
This paper presents PThammer, a cross-user-kernel-boundary Rowhammer attack that exploits implicit memory accesses to bypass software-only defenses. By using minimal TLB and LLC eviction sets to flush translation lookaside buffers and last-level caches, the attack achieves privilege escalation through bit flips in page tables, demonstrating successful root access within 15 minutes on multiple systems despite defenses like CTA and CATT.
Rowhammer is a hardware vulnerability in DRAM memory, where repeated access to memory can induce bit flips in neighboring memory locations. Being a hardware vulnerability, rowhammer bypasses all of the system memory protection, allowing adversaries to compromise the integrity and confidentiality of data. Rowhammer attacks have shown to enable privilege escalation, sandbox escape, and cryptographic key disclosures. Recently, several proposals suggest exploiting the spatial proximity between the accessed memory location and the location of the bit flip for a defense against rowhammer. These all aim to deny the attacker's permission to access memory locations near sensitive data. In this paper, we question the core assumption underlying these defenses. We present PThammer, a confused-deputy attack that causes accesses to memory locations that the attacker is not allowed to access. Specifically, PThammer exploits the address translation process of modern processors, inducing the processor to generate frequent accesses to protected memory locations. We implement PThammer, demonstrating that it is a viable attack, resulting in a system compromise (e.g., kernel privilege escalation). We further evaluate the effectiveness of proposed software-only defenses showing that PThammer can overcome those.
Motivation & Objective
- To develop a Rowhammer-based privilege escalation technique that operates across user and kernel memory boundaries.
- To overcome software-only defenses such as CATT, RIP-RH, and CTA that aim to isolate kernel data from user-space attacks.
- To minimize the attack surface by using efficient, minimal-sized eviction sets for TLB and LLC, reducing detection and resource overhead.
- To demonstrate that implicit access patterns in page table walks can be exploited to trigger bit flips in kernel data structures without direct memory access.
- To evaluate the effectiveness of existing software defenses against this novel, indirect attack vector.
Proposed method
- Uses a reverse-engineered mapping between virtual addresses and TLB sets to construct minimal, precise TLB eviction sets with no false positives.
- Employs a profiling-based algorithm to identify LLC eviction sets by measuring access latency, with a success rate of over 94% for sets larger than cache associativity.
- Selects eviction sets one entry larger than cache associativity (13 for 12-way, 17 for 16-way) to maximize eviction success while minimizing size.
- Performs double-sided hammering on selected victim rows using implicit access via page table walks to trigger bit flips in kernel page tables.
- Leverages the buddy allocator to concentrate L1PTEs in memory, increasing the probability of successful bit flips in protected regions.
- Simulates attacks on CTA-protected systems by targeting struct cred structures after L1PTE bit flips, enabling privilege escalation via user credential manipulation.
Experimental results
Research questions
- RQ1Can a Rowhammer attack be mounted across user and kernel memory boundaries using only implicit memory accesses?
- RQ2How effective are minimal-sized TLB and LLC eviction sets in achieving consistent cache and TLB flushing for exploitation?
- RQ3To what extent do software-only defenses like CTA, CATT, and RIP-RH remain effective against attacks that exploit page table walks?
- RQ4What is the performance overhead and success rate of the attack under different memory configurations (e.g., superpages vs. regular pages)?
- RQ5Can bit flips in kernel page tables be exploited to achieve privilege escalation even when L1PTEs are isolated or protected?
Key findings
- The TLB miss rate drops significantly when using eviction sets of size 12 or more, indicating effective TLB flushing.
- LLC miss rates exceed 95% when eviction set size exceeds cache associativity, confirming effective cache eviction.
- PThammer achieves privilege escalation within 15 minutes on all tested machines (Lenovo T420, X230, Dell E6420) using double-sided hammering.
- With superpages enabled, TLB pool preparation completes in under 10 ms, and LLC preparation in under 0.5 minutes, showing low setup overhead.
- The attack successfully bypasses CTA’s second-layer defense by targeting struct cred entries after L1PTE bit flips, achieving root access after seven bit flips in simulation.
- The LLC eviction-set selection algorithm has a false positive rate of no more than 6%, demonstrating high reliability in real-world settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.