What is Rowhammer?
A DRAM phenomenon in which repeatedly activating the same row in a short time drains charge from cells in neighboring rows and flips their data. Because it can be exploited in attacks, countermeasures are built into DRAMs and memory controllers.
Field: DRAM
Japanese name: ロウハンマー
Why hammering flips bits
DRAM cells store data as charge that slowly leaks, which is why each row is refreshed within a fixed window, typically a few tens of milliseconds (64 ms up to DDR4, 32 ms in DDR5). Activating a row swings its word line, and repeated activation of the same aggressor row couples electrically into physically adjacent victim rows and promotes charge migration that speeds their leakage. If an aggressor is activated thousands to tens of thousands of times (fewer on newer chips) before the victims are refreshed, some victim cells lose enough charge to flip. Hammering the two rows on either side of a victim (double-sided) is more effective, and denser cells are more susceptible.
Why it matters for security
Rowhammer needs no special privileges, only ordinary memory reads issued fast enough that they reach DRAM instead of hitting in cache, for example by flushing or evicting the cache lines. After it became widely known, researchers showed it could cross isolation boundaries: flipping bits in page-table entries to gain kernel privileges, corrupting data belonging to other processes or virtual machines, and triggering flips from sandboxed code. A hardware reliability flaw thus became a software-exploitable vulnerability.
Countermeasures
Target row refresh (TRR) tracks frequently activated rows inside the DRAM or controller and refreshes their neighbors early. DDR5 adds refresh management (RFM), in which the controller counts activations and grants the DRAM extra time for such refreshes. Simply raising the refresh rate helps but costs bandwidth and power. Error-correcting code (ECC) can detect and fix single-bit flips, but several flips in one word can defeat common schemes. Research has shown that simple trackers can be bypassed by hammering many rows at once, so layered defenses are used.
Rowhammer vs. random soft errors
Soft errors from alpha particles or cosmic-ray neutrons are random in time and location, and ECC with scrubbing is designed around that statistical behavior. Rowhammer is different: it is induced by a specific access pattern, it tends to recur in the same vulnerable cells, and an attacker can aim it at chosen addresses. That repeatability is what makes it dangerous, and why defenses focus on detecting suspicious activation patterns rather than only correcting errors after they occur.
Try it: questions about Rowhammer
- AHalving DRAM capacity
- BRefreshing rows adjacent to frequently activated rows early (such as TRR), or increasing the refresh rate
- CStopping the CPU clock
Show answer and explanation
Answer: B. Refreshing rows adjacent to frequently activated rows early (such as TRR), or increasing the refresh rate
Rowhammer is the phenomenon in which activating a row many times in a short period causes electrical interference that drains charge from cells in neighboring rows, flipping bits. It could let unprivileged programs alter other processes' or kernel data. Countermeasures combine mechanisms that additionally refresh neighbors of heavily activated rows, higher refresh rates and ECC to detect and correct flips.
- AScaling removes the need for refresh, so long periods pass without the cell charge ever being replenished
- BCells get closer together and store less charge, so they are more easily affected by interference from activations of neighbouring rows
- CIn scaled DRAM the standard forbids activating the same row many times, and violating that limit causes malfunctions
Show answer and explanation
Answer: B. Cells get closer together and store less charge, so they are more easily affected by interference from activations of neighbouring rows
Each time a row is activated, the word-line potential swings widely, making charge leak more easily from cells in nearby rows. As scaling shrinks the distance between cells, the interference becomes stronger, while the smaller cell capacitance also reduces the margin before a bit flips. Research has reported a tendency for newer DRAM generations to need fewer activations before the first bit flip. For this reason, countermeasures against Rowhammer become more important with each DRAM generation.
FAQ
Does ECC memory stop Rowhammer?
ECC makes attacks harder by correcting single-bit flips and detecting some multi-bit ones, but it is not a complete fix. Multiple flips in one word can escape correction, so ECC is combined with refresh-based mitigations.
What is TRR in DRAM?
Target row refresh is a mitigation that identifies rows activated unusually often and refreshes their neighboring rows before enough charge leaks to flip bits.
Is Rowhammer still a problem with DDR5?
DDR5 adds mechanisms such as refresh management to help, but cells keep shrinking and susceptibility generally rises with density. Mitigation is an ongoing effort shared between DRAM makers, controllers and system software.
Books on DRAM Ad
As an Amazon Associate I earn from qualifying purchases.
This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.
Back to the glossary