Demonstrating Rowhammer Attacks on NVIDIA GPUs: A Step-by-Step Guide for Security Researchers
Introduction
Recent research has shown that Rowhammer attacks, long known to threaten CPUs, now pose a serious risk to NVIDIA GPUs from the Ampere generation. Two independent teams demonstrated attacks—GDDRHammer and GeForge—that exploit bit flips in GDDR6 memory to achieve arbitrary read/write access to GPU memory, and ultimately full compromise of the host CPU’s memory. A third attack even works with IOMMU enabled. This guide walks you through the step‑by‑step methodology used by researchers to reproduce these attacks in a controlled, ethical environment.

What You Need
- An NVIDIA Ampere GPU (e.g., RTX 3060, RTX A6000, or RTX 6000)
- System with IOMMU disabled in BIOS (default setting) – note: the third attack works with IOMMU enabled
- Detailed understanding of GPU memory architecture (page tables, row buffers, DRAM organization)
- Custom kernel exploit code (available from research repositories)
- Knowledge of hammering patterns (e.g., double‑sided, single‑sided) and memory massaging techniques
- CUDA toolkit and driver for low‑level GPU access
- Test environment isolated from production systems
Step‑by‑Step Procedure
Step 1: Prepare the System and Disable IOMMU
Ensure your test system has the vulnerable GPU installed. By default, IOMMU is disabled in BIOS—this is required for GDDRHammer and GeForge to trigger the necessary bit flips. Verify this setting and, if you plan to test the third attack, leave IOMMU enabled. Boot into your operating system and install the latest NVIDIA drivers and CUDA toolkit.
Step 2: Perform Memory Massaging to Align Data
Memory massaging is critical to position sensitive data (e.g., page table entries) in DRAM rows that are adjacent to attacker‑controlled rows. Use custom CUDA kernels to allocate and release memory in a pattern that forces the GPU’s memory controller to place your data next to the target page tables. This step requires careful tuning of allocation sizes and order to achieve the desired row adjacency.
Step 3: Apply Specialized Hammering Patterns
Traditional rowhammer patterns (repeatedly accessing two rows) are insufficient for GDDR6 because of its different timing characteristics. The researchers developed novel patterns that rapidly toggle between rows at high frequencies while respecting GDDR6’s refresh and timing constraints. Use the provided exploit code to issue a sequence of memory reads/writes that cause electromagnetic disturbances, leading to bit flips in adjacent rows.
Step 4: Induce Controlled Bit Flips in GPU Page Tables
The goal is to flip specific bits in the GPU’s last‑level page table (GDDRHammer) or last‑level page directory (GeForge). By monitoring which bits flip and adjusting the hammering pattern, you can corrupt entries that control physical address mappings. GDDRHammer reported 1,171 bitflips on the RTX 3060 and 202 on the RTX 6000; GeForge achieved similar numbers.

Step 5: Escalate to Arbitrary Read/Write Access
Once page table entries are corrupted, the GPU can be tricked into mapping arbitrary physical memory into its address space. This grants the attacker’s code full read and write capabilities over the GPU’s memory region. From here, you can access caches, registers, and any data residing in GPU RAM.
Step 6: Compromise Host CPU Memory
Because the GPU is a PCIe device, exploiting its memory access rights often allows you to reach the host CPU’s DDR memory (if IOMMU is off). By crafting malicious DMA requests, you can read and write kernel structures, user‑space data, or even overwrite page table entries of the CPU. This leads to full system compromise of the host machine.
Step 7: Achieve Privilege Escalation and Execute Commands
In the GeForge proof‑of‑concept, the final step involves opening a root shell on the host. Using the arbitrary memory access obtained, the attacker overwrites kernel code or modifies permission bits to spawn a shell with elevated privileges. Similar results were demonstrated against the RTX A6000, even with IOMMU enabled in the third attack.
Tips and Considerations
- Ethical use only: This guide is for security research and education. Unauthorized use is illegal and unethical.
- Mitigating the attack: Enable IOMMU in BIOS settings—this blocks the cross‑component attack on most systems (though the third attack bypasses it). Use ECC memory where possible, or apply vendor firmware patches.
- Reproducibility: Bit flips are probabilistic; expect to run the exploit many times. Environmental factors (temperature, voltage) can affect success rates.
- Future work: Researchers are exploring hardware‑based defenses (e.g., TRR, increased refresh rates) and software mitigations like memory isolation. Stay updated on new findings.
- Testing environment: Always use an isolated test system without critical data. Ensure you have authorization before running these experiments.
Related Articles
- The YouTube Lag Nightmare: 10 Critical Facts About the Infinite Loop Bug
- Intel's Crescent Island GPU Gains Major Linux Driver Boost for AI Inferencing
- Asus ROG Zephyrus DUO (2026) Breaks Cover: Dual-Screen Gaming Laptop Packs RTX 5090, Staggering Price Tag
- Acer Predator Helios Neo 16S AI Deal: RTX 5070 Ti, OLED, and 32GB RAM for Under $1,800
- 3mdeb Advances openSIL and Coreboot Integration for Ryzen AM5 Motherboards: Q&A
- SPIFFE Emerges as Critical Identity Solution for Rogue AI Agents and Non-Human Workloads
- AMD Ryzen 9 9950X3D Bundle Deal Slashes $370 Off High-End PC Build
- How to Build AI Agents Locally with AMD GAIA: A Step-by-Step Guide