Rowhammer: when reading memory corrupts it
Activate one row of DRAM often enough, and the rows beside it begin to lose their data. This page explains why that happens, why it has become a security threat, and how a decade of our work defends against it, one paper at a time.
Rows of charge
DRAM stores each bit as charge on a capacitor, guarded by an access transistor. Cells are arranged in rows, and rows are grouped into banks: a 16GB module has two million rows of 8KB each. To read any data, the memory controller first activates its row. The wordline turns on every access transistor in that row, and the sense amplifiers latch the row's contents into the row buffer. Before a different row in the same bank can be activated, the bank must be precharged.
Charge leaks away over time. Therefore, every row is refreshed, and its charge restored, once every refresh window $t_{REFW}$, typically 64 ms. Consecutive activations in a bank are separated by the row cycle time $t_{RC}$, about 45 ns for DDR4. A refresh command is issued every $t_{REFI} = 7.8$ µs and occupies the bank for $t_{RFC} = 350$ ns. The maximum number of activations a bank can receive in one refresh window is therefore:
An attacker can issue at most this many activations in each bank per refresh window. DDR5 halves the refresh window to 32 ms, which leaves about 550K to 616K activations per bank, depending on the timings.
The disturbance
Key idea A cell must hold its charge for one refresh window of 64 ms. Each activation of an adjacent row increases the leakage of the cell. If the adjacent row is activated often enough within one window, the cell loses its charge before the next refresh, and the bit flips.
Technology scaling packs cells closer together, which is critical for density. Unfortunately, it also increases the coupling between neighboring cells. Our 2014 study traced the disturbance to two device-level effects. First, wordline-to-wordline coupling: DRAM voltage does not scale down in proportion to feature size, so the ratio of coupling noise to stored signal grows at smaller nodes. Second, the passing-gate effect: activating a gate next to a victim gate changes the electric field around it. Both effects lower the threshold voltage of the victim's access transistor and increase its sub-threshold leakage.
Activate one row (the aggressor) often enough within a refresh window, and the cells in the adjacent rows (the victims) lose charge faster than refresh can restore it. Their bits flip. This disturbance is called Rowhammer. An activation of the victim row itself restores its charge, so the attack succeeds only if the victims are left alone.
How many activations does it take?
A first-order model gives the answer. Vendors guard-band the retention time of a cell to $\beta$ times the refresh window $t_{ret\text{-}th}$. At that guard-band the leakage current is $I_{leak\text{-}GB}$, so the cell, with capacitance $C_s$ and driving voltage $V$, stores a charge $C_s V = I_{leak\text{-}GB}\,\beta\,t_{ret\text{-}th}$. Suppose hammering multiplies the victim's leakage by $\alpha$, and the cell is hammered for a time $t_{ret\text{-}RH}$ of the refresh window. The cell loses its data when the two leakage phases together drain the stored charge:
Solving Equation $\eqref{eq:1}$ gives $t_{ret\text{-}RH}/t_{ret\text{-}th} = (\beta-1)/(\alpha-1)$. Expressed as a share of $M_{max}$, the study's symbol for the maximum number of activations in one refresh window, the Rowhammer threshold is:
The leakage is dominated by the sub-threshold current, which grows exponentially with the variation in sub-threshold voltage $\Delta V_{th\text{-}sub}$ under hammering. Here $q$ is the electron charge, $n$ the body-effect coefficient and $kT/q$ the thermal voltage:
For a 50 nm DRAM, $\Delta V_{th\text{-}sub}$ is 50 mV to 70 mV and the body-effect coefficient $n$ is 1.1 to 1.4, so $\alpha$ ranges from 4 to 11.7. With the study's $M_{max} \approx 1.3$ million at a 64 ms refresh window (the paper's figure; its evaluated system is DDR3, and the DDR4 value above is 1.36 million), $\alpha = 11$ and $\beta = 2$ give an $RH_{th}$ of 130K, in line with the thresholds measured on DDR3 modules at the time. However, $\alpha$ depends on the fabrication process and increases as DRAM scales down. Equation $\eqref{eq:2}$ then gives the trend that later measurements confirmed: as $\alpha$ grows, the threshold falls.
Figure 3. Equation $\eqref{eq:2}$ with $M_{max} = 1.3$ million. Move the sliders to change $\alpha$ and $\beta$. The study assumed a threshold of 32K for future DRAM, which corresponds to $\alpha \approx 42$ at $\beta = 2$. Values other than those in the paper are computed for this page.
Try it
Pick a threshold and a defense, then hammer row X. The defense shown refreshes the two victim rows at half the threshold; Part I explains why half. Later sections call the threshold $T_{RH}$. Some of our papers write it as $N_{RH}$; it is the same quantity.
- 0activations to row X
- 0.00 msof the 64 ms window
- 0bits flipped
- 0mitigations issued
Press Hammer to activate row X over and over.
Simplified. Cells differ in how vulnerable they are: the weakest cell flips at the threshold, and others follow as activations continue. Time assumes back-to-back activations at 1.36 million per 64 ms.
A falling threshold
When Rowhammer was first characterized in 2014, the threshold was 139K activations for DDR3. By 2020 it had fallen to 4.8K for LPDDR4, almost 30× lower, and it is expected to fall further. The threshold also falls within a standard, from older to newer technology nodes. A mitigation developed for a given threshold becomes ineffective for devices with a lower one. Therefore, our work designs mitigations that remain effective at thresholds far below today's.
- Measured thresholds, older and newer technology nodes
- DDR3139K when first characterized, in 2014139K, 22.4K
- DDR417.5K, 10K
- LPDDR4as of 202016.8K, 4.8K to 9K
- Thresholds our designs are evaluated at
- CRA and PRACAL 201432K
- Randomized Row-SwapASPLOS 20224.8K
- Scale-SRSHPCA 20231,200
- AQUA, TPRACMICRO 2022, ISCA 20251K, 1,024
- Hydra, DAPPER, PrISMISCA 2022, HPCA 2025, ISCA 2026500
- QPRAC, CnC-PRAC, CounterpointHPCA 2025, 2025, DRAMSec 202571, 66, 64
Figure 4. Thresholds on a log scale. Lower is harder: fewer activations are enough to flip a bit. The designs in the lower group are explained in the sections that follow.
A lower threshold does more than make one row easier to attack. A bank allows $ACT_{max}$ activations per window, so the number of rows that can each be driven to the threshold within one window is $ACT_{max}/T_{RH}$. At 139K, an attacker could hammer nine rows per bank to the threshold. At 500, it can hammer 2,720. Every defense that guarantees to detect aggressors by counting their activations must be provisioned for at least that many at once.
Figure 5. $ACT_{max}/T_{RH}$ for $ACT_{max} = 1.36$ million. Move the slider to change the threshold. The number of rows that a defense must follow at once grows in inverse proportion to the threshold.
Why it matters
Rowhammer turns a reliability problem into a security threat. The threat model is modest: an unprivileged attacker runs native code on the machine, and a bit flips somewhere as soon as any row receives more than $T_{RH}$ activations within its refresh window. The attacker can thereby flip bits in memory that it cannot access, which subverts the process isolation that operating systems provide. For example, flipping bits in page tables yields kernel privileges and access to data stored at arbitrary locations. Furthermore, the flips depend on the data stored in nearby rows, so they can also be used to infer that data.
Benign workloads can cross the threshold on their own. In our 2014 study, most workloads peaked at several thousand activations of a single row within 64 ms, and one multi-threaded workload reached 400K. A program that hammers a row is short: about ten lines of C.
Anatomy of a defense
Hardware defenses consist of two parts: a tracking mechanism that identifies the rows receiving frequent activations, and a mitigating action that is issued before any row reaches $T_{RH}$. Each part can be attacked, and each has a cost that grows as $T_{RH}$ falls. Our papers address both parts, in the memory controller and inside the DRAM chip.
The papers form a chain, shown here in logical order. Each one answers a problem that an earlier design left open, or created.
Figure 6. The problems, in outline, and the paper that answers each one.
Part ITracking the aggressor
A typical memory system contains millions of rows, and any of them can become an aggressor. The tracker must identify every row that approaches $T_{RH}$, and it must do so even when an attacker knows exactly how the tracker works.
CRA and PRACAL 2014
Key idea Counter-Based Row Activation (CRA) counts the activations of every row and refreshes the neighbors of a row when its count reaches the threshold. It is exact, but it needs one counter per row. Probabilistic Row Activation (PRA) keeps no counters. It refreshes the neighbors of each activated row with a small probability $N$, so a row that is activated $M$ times escapes with probability $(1-N)^{M}$.
Rowhammer can be mitigated by sending a proactive activation to the victim rows before the aggressor row crosses the threshold. Such a dummy activation acts as a refresh for the victim rows. Our 2014 study proposed two ways to decide when to send it.
Counter-Based Row Activation (CRA)
CRA maintains a 2-byte activation counter for every row, which can count up to 64K activations per refresh window. For an 8GB memory with one million rows, the counters occupy 2MB. Devoting multiple megabytes of on-chip SRAM is impractical, so CRA stores the counters in a reserved area of DRAM and keeps the recently used ones in a counter cache in the memory controller. Each 64-byte line from the reserved area carries the counters of 32 contiguous rows. On every activation the controller increments the row's counter; when the count equals the threshold, it activates the victim rows and clears the counter. With a 128KB counter cache and a threshold of 32K, CRA has less than 0.5% performance degradation, and the degradation stems mainly from the memory accesses for the counters.
Probabilistic Row Activation (PRA)
PRA obviates the tracking structures entirely. On every row activation, the memory controller activates the two neighboring rows with a small probability $N$. A hammered row is activated so many times that it is almost certain to be chosen before it reaches the threshold. If the aggressor row receives $M$ activations, the probability that none of them triggers a dummy activation is:
since $(1-N)^{1/N} \to e^{-1}$ as $N \to 0$. Over $K$ such instances in the lifetime of the system, the probability of at least one failure is:
The exponent $M\cdot N$ is what matters. At a threshold of 32K and $N = 0.1\%$, $M\cdot N = 32$ and a hammered row escapes with probability $e^{-32}$, about $1.3\times10^{-14}$ per instance. The cost is small: $N = 1\%$ adds 2% more activations and about 2% to execution time, and at $N = 0.1\%$ the slowdown is under 0.2% on average.
Figure 7. Equation $\eqref{eq:4}$: the probability that a row escapes mitigation over $M$ activations. Move the sliders to change $N$ and the threshold. To keep the same protection, $N$ must rise in inverse proportion to the threshold, which is why purely probabilistic schemes become expensive at low thresholds.
Both schemes were designed for a threshold of 32K. As the threshold falls, PRA needs a higher probability, and the counter fetches of CRA become costly on larger systems with poor row locality. A threshold of 500 requires a different tracker.
Architectural Support for Mitigating Row Hammering in DRAM Memories · IEEE Computer Architecture Letters, 2014
HydraISCA 2022
Key idea Within a 64 ms window, most rows receive only a few activations. Hydra therefore keeps one counter for each group of 128 rows. It switches to one counter per row only for a group whose counter reaches the group threshold.
At ultra-low thresholds, of 500 and below, exact tracking is limited by the counting argument made earlier: $ACT_{max}/T_{RH} = 2{,}720$ rows per bank can reach a threshold of 500 within 64 ms. Even an idealized tracker must hold that many entries. The number of entries doubles with each halving of $T_{RH}$. There is a further factor of two: a tracker is reset periodically, and the reset is not synchronized with the refresh of any given row. An attacker can issue $T-1$ activations just before the reset and $T-1$ just after it, so a tracker that mitigates at a count of $T$ tolerates only a threshold of $2T-1$. Trackers must therefore mitigate at $T_{RH}/2$. Graphene is a prior tracker of this kind. At a $T_{RH}$ of 500, it needs 5,441 entries per bank and 340KB of content-addressable memory (CAM) per rank, a set of DRAM chips that is accessed together, and twice that for the 32 banks of DDR5.
The alternative is to keep a counter for every row in DRAM, as in CRA. This can track an arbitrary number of rows, and its cost does not depend on the threshold. However, on an 8-core system with 32GB of memory, the extra memory accesses for the counters cause a 25.8% slowdown on average with a 64KB metadata cache, and still 16.8% with 256KB, because row accesses have poor spatial locality. The 2014 result of under 0.5% was for a two-core system and a different set of workloads.
A hybrid tracker
Hydra combines the two approaches. It builds on an observation about real workloads: within 64 ms, the vast majority of rows receive only a few activations, and at most a few thousand rows receive hundreds. Hydra therefore tracks groups of rows at low cost in SRAM and switches to exact per-row tracking, stored in DRAM, only for the groups that become hot.
- Group-Count Table (GCT). 32K untagged 8-bit counters in SRAM, one per group of 128 rows. Every activation increments its group's entry until the entry reaches the group threshold $T_G$.
- Row-Count Table (RCT). One 1-byte counter per row, in a reserved 4MB of DRAM. When a group's entry reaches $T_G$, the RCT entries of all 128 rows in the group are initialized to $T_G$, at a cost of two line reads and two line writes. From then on, each activation in that group increments the row's own counter.
- Row-Count Cache (RCC). 8K entries in SRAM that cache individual RCT counters, so most per-row updates avoid a DRAM access.
- Mitigation. When a row's counter reaches the tracking threshold $T_H$, Hydra issues a mitigation and resets that counter to zero. The SRAM structures are reset every 64 ms.
The defaults are $T_{RH} = 500$, $T_H = T_{RH}/2 = 250$ and $T_G = 200$.
Why no aggressor escapes
The estimated count is never below the true count. Consider a row between two resets of the SRAM structures. While its group is below $T_G$, the group's entry is incremented by this row and by every other row in the group, so when the entry reaches $T_G$ the row's true count $T_{true1}$ satisfies $T_G \ge T_{true1}$. After that, the row's RCT counter starts at $T_G$ and is incremented only by the row itself, so it reaches $T_H$ after exactly $T_{true2}$ further activations, with $T_H = T_G + T_{true2}$. Combining the two:
The first mitigation therefore arrives at or before the row's true count reaches $T_H = T_{RH}/2$. After a mitigation the counter restarts from zero and counts exactly, so every later mitigation arrives after exactly $T_H$ more activations. Across a reset, a row receives fewer than $2\,T_H = T_{RH}$ activations without a mitigation. The group threshold $T_G$ affects only performance: any $T_G \lt T_H$ is secure. In the worst case, a row whose group is already at $T_G$ is mitigated after only $T_H - T_G = 50$ of its own activations.
Figure 9. The first mitigation of an aggressor row, computed for this page from Equation $\eqref{eq:7}$ with $T_H = 250$. Move the sliders to change how many activations the other rows of the group contribute first, and the group threshold $T_G$. The mitigation can arrive early, never late.
Activations caused by victim refreshes are counted as activations of the refreshed rows, which accounts for Half-Double, an attack that Part II describes. Hydra also protects itself: the RCT occupies 512 DRAM rows, and 512 one-byte SRAM counters track the activations to those rows.
- 0.7%average slowdown at a threshold of 500, across 36 workloads
- 56.5KBof SRAM for a 32GB memory, about 28KB per rank
- 4MBof DRAM for the Row-Count Table, under 0.02% of capacity
With its structures scaled in proportion, Hydra has a slowdown of 1.6% at a threshold of 250 and 4% at 125. Both structures matter: without the RCC the slowdown is 4.5%, and without the GCT it is 20%. Unlike per-bank trackers, Hydra's storage does not grow with the number of banks.
By the numbers
Figure 10. SRAM and CAM per 16GB rank at a threshold of 500. Graphene, TWiCE and CAT need entries in proportion to the rows that could reach the threshold, and D-CBF needs large filters to keep false positives low.
Figure 11. Average slowdown at a threshold of 500, across 36 workloads. Each of Hydra's two SRAM structures removes most of the remaining cost.
Hydra shares its counters among rows, and the paper argues that thrashing these shared structures costs no more than attacks already possible, such as row-buffer conflicts. The next paper measures a 61% slowdown on Hydra under a tailored attack, and shows that the sharing itself is the weakness.
Hydra: Enabling Low-Overhead Mitigation of Row-Hammer at Ultra-Low Thresholds via Hybrid Tracking · ISCA 2022
DAPPERHPCA 2025
Key idea A tracker that shares one counter among several rows can be attacked by anyone who knows which rows share it. DAPPER assigns rows to counters with a keyed hash that the attacker cannot predict. DAPPER-H uses two independent hashes, and mitigates only when both counters of a row reach the threshold.
Low-cost trackers save storage by sharing state: group counters, counter caches, sketches, or one table shared across banks. Unfortunately, shared structures can be exploited. In a Performance Attack (Perf-Attack), an attacker does not try to flip bits. Instead, it crafts an access pattern that makes the tracker itself consume DRAM bandwidth, which slows down co-running benign applications. This paper writes the Rowhammer threshold as $N_{RH}$; it is the $T_{RH}$ of the other sections.
Consider Hydra's Row-Count Cache, modeled in this study as a 32-way cache with random eviction. If an attacker activates $m$ rows that map to the same set, the probability that a counter lookup misses is:
Activating 64 such rows gives a miss probability of 87%, and each miss requires two additional DRAM requests: one read to fetch the counter and one write to update the evicted counter. Other trackers fail differently. In CoMeT and ABACUS, the attacker overflows a shared structure and forces a reset that refreshes every DRAM row; for ABACUS at an $N_{RH}$ of 500, such a reset can be forced within 2 ms. Across 57 workloads at an $N_{RH}$ of 500, tailored Perf-Attacks on Hydra, START, CoMeT and ABACUS cause slowdowns of 60% to 90% (61% for Hydra), compared with about 40% for a cache-thrashing attack.
Figure 12. Equation $\eqref{eq:8}$: the miss probability of a 32-way counter cache with random eviction. Move the slider to add attacker rows to one set. The model applies once more than 32 rows compete for the 32 ways.
Figure 13. Average slowdown of the co-running benign applications at a threshold of 500, across 57 workloads. Each tracker is attacked with a pattern tailored to it. DAPPER-H is the design described below.
DAPPER-S: hide the mapping
DAPPER keeps every counter in SRAM in the memory controller, so there are no in-DRAM counters to fetch. Rows share Row Group Counters (RGCs), 256 rows to a group, and a mitigation refreshes the group when its counter reaches the mitigation threshold $N_M = N_{RH}/2$. To stop an attacker from targeting a group, the first variant, DAPPER-S, assigns rows to groups with a keyed secure hash, a four-round low-latency block cipher, and changes the keys periodically. The cipher is reversible, so the controller can recover the member rows of a group when it must refresh them.
A single hash is not enough. In a Mapping-Capturing attack, the attacker activates a target row $N_M - 1$ times and then activates other rows until a mitigative refresh reveals a row in the same group. With a reset period $t_{reset}$, the attacker has
where $G$ is the number of guesses that fit in the remaining time, $t_{RRD\_S}$ is the minimum time between activations to banks in different bank groups, and $N_{RG}$ is the number of row groups (8K for the two million rows of a rank). Each guess lands in the target's group with probability $1/N_{RG}$, so $P_S$ is the probability that at least one of the $G$ guesses succeeds before the reset. The expected attack time is $t_{reset}/P_S$. Even with an impractically short reset period of 12 µs, the mapping can be captured every 7.6 ms. Moreover, DAPPER-S is vulnerable to attacks that need no mapping at all: a streaming attack that sequentially activates all rows of a rank causes a 13% slowdown, and a refresh attack that repeatedly triggers the refresh of all 256 rows of a group causes 20%.
DAPPER-H: hash twice
DAPPER-H uses two RGC tables with independent hashes. It issues a mitigation only when both of a row's counters reach $N_M$, and it refreshes only the rows common to the two groups. This limits the refresh attack: a mitigation refreshes one row instead of 256. It also makes the mapping far harder to capture. The attacker must now find rows that collide with the target in both tables. With $N_{RG}$ row groups per table and two guesses per trial, a trial succeeds with probability $p$, and the attack succeeds within $n$ trials with probability $P_S$:
The first table also carries a per-bank bit-vector: an activation from a bank whose bit is not yet set only sets the bit and increments the second table. This confines the attacker to the 616K activations that one bank allows per refresh window. Every failed trial costs the full $N_M$ activations, so the number of trials $n$ is about 2.5K. As a result, DAPPER-H prevents Mapping-Capturing attacks with a probability of 99.99% within a refresh window of 32 ms, and both tables are rehashed every window.
Figure 15. The probability of capturing the mapping of a target row with $N_{RG} = 8\text{K}$ row groups: $P_S$ of Equation $\eqref{eq:9}$ for one hash, as a function of the number of guesses, and $P_S$ of Equation $\eqref{eq:10}$ for two hashes, as a function of the number of trials. Computed for this page. Move the slider to change the number of attempts.
The bit-vector also counters streaming. With eight rows per group in each bank, and up to 12 million activations per channel spread over two million rows, a streaming attacker can contribute at most about $6 \times 8 = 48$ counts to a group in the first table, far below an $N_M$ of 250.
- 0.9%slowdown under Perf-Attacks at an $N_{RH}$ of 500
- 0.1%average slowdown on benign workloads
- 96KBof SRAM per 32GB of DDR5, with no CAM
The storage is 32KB for the two tables, with 8K one-byte counters per table and rank, and 64KB for the bit-vectors. At an $N_{RH}$ of 125, the slowdown is 4% on benign workloads and 6% under a refresh attack.
The tracker is now low-cost and resilient to performance attacks. The next question is what to do with the rows it flags.
DAPPER: A Performance-Attack-Resilient Tracker for RowHammer Defense · HPCA 2025
Part IIThe mitigating action
Once the tracker flags an aggressor, something must be done. Until 2021, nearly all hardware proposals that track aggressors did the same thing: refresh the immediate neighbors of the aggressor to restore their charge. We term this victim-focused mitigation. It has two shortcomings. First, the memory controller must know which rows are physically adjacent, yet DRAM chips use proprietary internal mappings. Second, it assumes that no bit flips occur beyond the rows it refreshes.
Google's Half-Double attack breaks this assumption. Its key insight is to use the mitigation itself as a source of activations. A large number of activations to one row causes mitigative refreshes of its neighbors. Each refresh is an activation, so the refreshed neighbors become aggressors themselves and flip bits in rows at a distance of two from the hammered row. Half-Double caused more than 100 bit flips within 64 ms on LPDDR4 modules. Refreshing two rows on each side does not help: the row at a distance of three could then incur bit flips.
The root cause is that victim-focused mitigation preserves the spatial connection between the aggressor and its victims. The attacker keeps the full 64 ms to orchestrate a pattern in one neighborhood. The next three papers break that connection by moving the aggressor instead. The fourth, SafeGuard, detects the bit flips of an attack that gets through.
Randomized Row-SwapASPLOS 2022
Key idea Victim refresh leaves the aggressor next to the same victims. RRS instead swaps a row that reaches the swap threshold with a random row of the bank. The activations that follow disturb a different, random set of neighbors, so they no longer accumulate on the same victims.
Randomized Row-Swap (RRS) is an aggressor-focused mitigation. When a row receives $T_{RRS}$ activations within a 64 ms epoch, the interval between resets of its tracker, the memory controller swaps its contents with a randomly selected row in the same bank. If the attacker keeps hammering, the row is swapped again at every multiple of $T_{RRS}$. No knowledge of the DRAM's internal row adjacency is needed.
RRS consists of two structures per bank. A Hot-Row Tracker, built on the Misra-Gries algorithm for finding frequent items in a stream, identifies rows that reach $T_{RRS}$. A Row-Indirection Table records where each swapped row now resides, and it is consulted on every memory access. By the earlier counting argument, the tracker is guaranteed to catch every such row if it has, for the swap threshold of 800 derived below,
because at most 1,700 rows can each receive 800 activations in one epoch. A swap streams two 8KB rows through two swap buffers. Each of the four row transfers, two reads and two writes, takes about 365 ns, so a swap takes about 1.46 µs, and 2.9 µs when installing it also evicts and un-swaps an older pair.
How low must the swap threshold be?
After a swap, the attacker no longer knows which row address maps to the physical row it hammered. It can activate that row again only by chance. Write $T$ for $T_{RRS}$. The attacker's best strategy is to pick a random row in the bank, activate it exactly $T$ times until it swaps, and repeat for the whole epoch, so that some physical row is hit repeatedly by chance. Let $T_{RH} = k\cdot T$, so a physical row must be involved in $k$ swaps to collect $T_{RH}$ activations. This is a buckets-and-balls problem: the $N$ rows of the bank are the buckets, and each attack round is a ball. With $A$ the maximum activations per epoch and $D$ the fraction of time the bank is not busy swapping, there are $B = A\cdot D/T$ balls, and the probability that a given row receives exactly $k$ of them is binomial with $p = 1/N$:
The expected number of epochs before some row in the bank collects $k$ swaps, and the corresponding attack time, are:
For a bank with 128K rows, $A = 1.36$ million and $D = 0.925$, so $A\cdot D = 1.26$ million. Equation $\eqref{eq:13}$ then gives the time to place 4,800 activations on one row:
| Swap threshold $T$ | $k = T_{RH}/T$ | Attack iterations | Attack time |
|---|---|---|---|
| 960 | 5 | $9.3\times10^{6}$ | 6.9 days |
| 800 | 6 | $1.9\times10^{9}$ | 3.8 years |
| 685 | 7 | $3.8\times10^{11}$ | 762 years |
Each extra swap the attacker needs multiplies the attack time by a factor of about 200. RRS therefore sets $T_{RRS} = T_{RH}/6$, which protects the system for years of continuous attack. Attacking all 16 banks at once does not help the attacker: swaps in every bank occupy the shared channel, the duty cycle drops to 0.55, and the attack time increases from 3.8 years to 5.1 years.
Figure 17. Equations $\eqref{eq:12}$ and $\eqref{eq:13}$ for a threshold of 4,800. Move the slider to change the number of swaps $k$ the attacker needs on one row. A lower swap threshold means a larger $k$. The paper tabulates $k$ = 5, 6 and 7; the other points are computed for this page.
- 0.4%average slowdown at a threshold of 4,800, across 78 workloads
- 3.8 yearsexpected time for a successful attack under continuous hammering
- 686KBof SRAM per rank, or 42.9KB per bank
Benign workloads swap rarely: 68 row-swaps per 64 ms on average, and 50 of the 78 workloads never swap. The worst-case workload slows down by 7.6%. However, the cost grows as the threshold falls: at a threshold of 1,200, the average slowdown is 4.5%.
By the numbers
Figure 18. Average slowdown of RRS across 78 workloads. A lower threshold forces a lower swap threshold, and more rows cross it.
The RRS analysis does not count the activations that a swap itself causes. The next paper shows that they matter.
Randomized Row-Swap: Mitigating Row Hammer by Breaking Spatial Correlation between Aggressor and Victim Rows · ASPLOS 2022
Scalable and Secure Row-SwapHPCA 2023
Key idea A swap in RRS writes to the original location of the aggressor, and each write activates that location. RRS does not count these activations. Secure Row-Swap never returns a row to its original location within an epoch, which limits them to one.
RRS is neither secure nor scalable. This paper first breaks it, with an attack called Juggernaut, and then repairs it in two steps: Secure Row-Swap (SRS) restores security, and Scale-SRS reduces the cost. The attack rests on the same observation as Half-Double: the mitigating action is itself a source of activations.
Latent activations
To swap an aggressor row with a random row, the memory controller must write the random row's data into the aggressor's original physical location. That write activates the original location once more. We call this a latent activation. Furthermore, when a swapped row is hammered again within the same epoch, RRS first un-swaps the pair and then swaps the aggressor with a new row, and both steps activate the aggressor's original location. After one swap and $N$ rounds of unswap-swap, that location has incurred up to $2N+1$ latent activations, all caused by the mitigation itself.
The Juggernaut attack pattern
Juggernaut has two parts. First, the attacker hammers a single row continuously to force $N$ unswap-swap rounds, which biases one physical location with latent activations. Second, it falls back to random guessing, but now it needs far fewer correct guesses. Let $T_S$ be the swap threshold ($T_{RRS}$ above); the ratio $T_{RH}/T_S$ is the swap rate, 6 in RRS. Let $N$ be the number of unswap-swap rounds, and $L$ the latent activations per round, 1.5 on average. Because the tracker's reset is not synchronized with refresh, a row can also receive $2T_S - 1$ direct activations before its first swap. The activations on the aggressor's original location, and the number of correct guesses $k$ still needed, are:
The biasing rounds consume time, which leaves fewer guesses. With $t_{actual} = 64\ \text{ms} - 8192\,t_{RFC}$ available in a refresh window, the number of random guesses $G$ and the probability that $k$ of them land on the one biased row among the $R$ rows of the bank ($N$ in the RRS analysis; here $N$ counts rounds) are:
where $t_{swap}$ and $t_{reswap}$ are the latencies of a swap and of an unswap-swap, 2.7 µs and 5.4 µs in this paper's analysis (the RRS paper gives 2.9 µs for a swap with an eviction), each including the eviction of an entry from the previous epoch. The expected time to break RRS is $64\ \text{ms}/p_{k,T_S}$. Consider a $T_{RH}$ of 4,800 with $T_S = 800$ and $N = 1{,}100$ rounds, the default in the figure below:
Figure 19. Equations $\eqref{eq:jugg}$ and $\eqref{eq:juggp}$ for a $T_{RH}$ of 4,800 and a swap threshold of 800, with $t_{RC} = 45$ ns, $t_{swap} = 2.7$ µs, $t_{reswap} = 5.4$ µs and 128K rows per bank. The bar shows the activations on one physical row, out of the 4,800 needed. The first segment, 1,600, is the 1,599 direct activations before the first swap and the latent activation of that swap. Move the slider to change the number of unswap-swap rounds, or select Secure Row-Swap. The steps in the curve occur where $k$ drops by one; between them, more rounds leave fewer guesses.
Only two correct guesses are needed, and Juggernaut breaks RRS in 4 hours, where the original analysis promised more than three years. At thresholds of 2,400 and 1,200, with a swap rate of 6, the latent activations alone bring the row to the threshold, and RRS breaks within a single 64 ms refresh window. At 1,200, RRS breaks in under a day regardless of the swap rate.
Secure Row-Swap
Secure Row-Swap (SRS) never un-swaps a row in the epoch in which it was swapped. A row that is hammered again is swapped onward from wherever it currently resides, so its original location incurs only the single latent activation of the initial swap. Then $ACT_{aggr} = 2\,T_S$ regardless of $N$, the attacker needs $k = 4$ correct guesses at a swap rate of 6 (not six, because the $2\,T_S$ initial activations still count), and SRS withstands Juggernaut for more than two years.
To support swap-only operation, the indirection table is split into a real and a mirrored half, entries from the previous epoch are evicted lazily, and a per-bank place-back buffer holds the row being displaced. SRS also keeps a per-row swap-tracking counter in DRAM, 32 bits for each row, or 512KB per bank and 0.05% of capacity, to detect attacks: any successful attack must swap a single row multiple times. At each swap, the counter of the row is increased by $T_S$ activations and by any latent activations.
Scale-SRS
With security restored, the cost can be reduced. Reducing the swap rate from 6 to 3 halves the maximum number of swaps per epoch, but it allows rare outlier rows that are swapped three times within an epoch. If $R_K = R\cdot p_{k,T_S}$ is the expected number of rows with $k$ swaps, the probability that $M$ such rows appear in the same window is Poisson:
At a $T_{RH}$ of 4,800 and a swap rate of 3, three outlier rows appear together in a bank only once every 31 days, and four only once in 64 years or more. Scale-SRS designs for the common case and handles the outliers separately. When a row's swap-tracking counter reaches $3\times T_S$, the row is pinned in the last-level cache for the rest of the refresh window, which prevents further activations. Even an attack on multiple banks requires pinning at most 66 rows, about 6.5% of an 8MB cache, and that occurs once every 2.6 years.
Figure 20. The Poisson model for a swap rate of 3 and a threshold of 4,800. A few simultaneous outliers are rare, and many are practically impossible, so only a few rows ever need to be pinned.
- 0.7%average slowdown at a threshold of 1,200, against 4% for RRS as re-simulated in this paper (4.5% in the RRS paper)
- 3.3×less storage than RRS at a threshold of 1,200: 76.9KB against 251KB per bank, excluding the tracker
- 4 hoursfor Juggernaut to break RRS at a threshold of 4,800
At a threshold of 512, Scale-SRS has a 4% average slowdown, against 14% for RRS.
By the numbers
Figure 21. Average slowdown across 78 workloads, in the Scale-SRS evaluation. Halving the swap rate removes most of the cost of swapping.
Figure 22. On-chip storage per bank for the mitigation structures. Fewer swaps need a smaller indirection table. SRS and Scale-SRS also keep 512KB of swap counters per bank in DRAM.
Row-swap still incurs the cost of randomization: the swap threshold must be well below the Rowhammer threshold. A parallel line of work examines whether randomization is needed at all.
Scalable and Secure Row-Swap: Efficient and Safe Row Hammer Mitigation in Memory Systems · HPCA 2023
AQUAMICRO 2022
Key idea RRS is secure only while the attacker cannot find a swapped row again. AQUA instead moves each aggressor row to a reserved region of DRAM, where no slot is reused within a refresh window. The location of the row need not be secret, so the row can be moved at $T_{RH}/2$ activations, where RRS must swap at $T_{RH}/6$.
RRS provides security via randomization, and randomization is expensive. Because an attacker may reach an already-hammered row by chance, RRS must swap at one-sixth of $T_{RH}$. At a $T_{RH}$ of 1K it swaps after only 166 activations, which, in AQUA's evaluation on SPEC2017 workloads, leads to an average slowdown of 19.8% and an indirection table of 2.4MB of SRAM per rank. The key insight of AQUA is to rely on isolation instead of randomization.
AQUA reserves a small region of DRAM, the Row Quarantine Area (RQA), that is invisible to software. When the tracker flags an aggressor row, AQUA migrates the row into the next free slot of the RQA. If the row is hammered again while in quarantine, it is moved to another slot. The RQA is organized as a circular buffer and sized so that no slot is reused within the 64 ms refresh window. Because security does not depend on hiding the row, the migration threshold is set only by the tracker: a tracker that is reset every epoch must mitigate at $T_{RH}/2$, so AQUA migrates at 500 activations where RRS swaps at 166.
How large must the quarantine area be?
Two factors bound the rate at which rows can enter quarantine: the time to trigger a migration, and the time to perform it. An aggressor needs $t_{AGG} = A\cdot t_{RC}$ to reach a migration threshold of $A$ activations. The fastest attack hammers one row in each of the $B$ banks concurrently, so $B$ rows trigger within one $t_{AGG}$, and each migration then occupies the shared channel for $t_{mov}$. The maximum number of migrations in a refresh window is therefore:
for $A = 500$, 16 banks per rank, and $t_{mov} = 1.37$ µs, the time to read an 8KB row into a copy buffer and write it out again (685 ns per transfer in AQUA's DDR4-2400 model; the RRS paper's DDR4-3200 model takes 365 ns). That is 180MB, or 1.1% of a 16GB rank. The size saturates as the threshold falls, because the migration time dominates: even at an impractical effective threshold of 1, the quarantine area needs at most 2.2% of DRAM.
Figure 24. Equation $\eqref{eq:rmax}$ for a 16GB rank with 16 banks. Move the slider to change the migration threshold. The dots are the configurations tabulated in the paper; other values are computed for this page.
Why no row reaches the threshold
AQUA guarantees that no physical row receives $T_{RH}$ activations in a refresh window. Three properties ensure this. First, the tracker issues a mitigation every $T_{RH}/2$ activations to a row, and at most two tracking epochs span the refresh window of a row. Second, a quarantined row can return to its original location only in the next epoch, so the original location receives at most $T_{RH}/2 - 1$ activations in each of the two epochs. Third, the tracker is indexed by the physical row address after translation, so a row in the quarantine area is itself migrated before it reaches the threshold, and its previous slot stays unused for the rest of the window.
Tables in DRAM
Since security does not depend on keeping the destination secret, the pointer tables need not be in SRAM with constant-latency lookups. AQUA stores the Forward-Pointer Table in 4MB of DRAM, with one 2-byte entry per row. A 16KB Bloom filter answers whether a row is possibly quarantined, and a 16KB cache holds the entries of quarantined rows. As a result, 92.2% of lookups end at the Bloom filter, and fewer than 0.1% access DRAM.
- 2.1%average slowdown at a threshold of 1K, against 19.8% for RRS
- 41KBof SRAM per rank for mapping and migration, against 2.4MB
- 1.1%of DRAM reserved for the quarantine area
AQUA performs about 9× fewer row migrations than RRS on average: 1,099 against 9,935 per 64 ms. Under a denial-of-service attack on all 16 banks, each migration that must first evict an old row takes $2 \times 1.37 = 2.74$ µs, so the memory system is busy for $16 \times 2.74 = 43.8$ µs after every 22.5 µs of hammering, which bounds the worst-case slowdown at $2.95\times$. At a $T_{RH}$ of 500, the average slowdown is 6.8%.
By the numbers
Figure 25. Average slowdown across 34 workloads in AQUA's evaluation. At each threshold, AQUA migrates at half of it, where RRS swaps at one-sixth.
Figure 26. SRAM per rank at a threshold of 1K. Moving the pointer tables into DRAM leaves only a Bloom filter, a small cache and a copy buffer in SRAM. The 172KB bar counts the two pointer tables alone; the 41KB bar also includes the 8KB copy buffer.
All of these designs assume a known threshold and anticipated attack patterns. The next paper considers the case in which a defense fails.
AQUA: Scalable Rowhammer Mitigation by Quarantining Aggressor Rows at Runtime · MICRO 2022
SafeGuardHPCA 2022
Key idea A mitigation can fail against an access pattern that its designers did not anticipate. SafeGuard stores a message authentication code (MAC) with every 64-byte line. A line whose bits have flipped no longer matches its MAC, and the mismatch is detected when the line is read. An $n$-bit MAC misses a corrupted line with probability $2^{-n}$ per check.
Every mitigation is designed for a particular threshold and for known access patterns. Unfortunately, both change over time: thresholds fall with each generation, and new patterns such as TRRespass, which broke the Target Row Refresh of DDR4 modules, and Half-Double continue to break deployed defenses. Currently, there is no guaranteed solution. We contend that relying on mitigation alone is insufficient. SafeGuard equips the system with low-cost integrity protection, so that bit flips from an attack that breaks through are detected. This converts Rowhammer from a security threat, the silent consumption of corrupted data, into a reliability concern: a Detected Unrecoverable Error (DUE).
Finding room for a MAC
Integrity protection needs a message authentication code (MAC) for every cache line. Storing MACs in a separate region costs 12.5% of memory and an extra memory access. SafeGuard finds the space in the error-correcting code (ECC) bits that the module already has. An ECC module carries 64 spare bits for every 64-byte line. Conventional SECDED (single-error correction, double-error detection) spends them on eight independent codes, one for each 64-bit word. A single code over the whole line needs far fewer bits: correcting one error among $k$ protected bits needs $r$ check bits with $2^{r} \ge k + r + 1$, so 10 bits suffice for a 64-byte line and its MAC. The rest can hold the MAC and, as explained below, a small parity.
Figure 27. The 64 ECC bits of a 64-byte line. Reorganizing the code at line granularity frees enough bits for a MAC without any additional DRAM.
Does line-level correction weaken reliability? Only when one line has single-bit faults in two different words. With $N$ lines and $f$ accumulated faults, the next fault occurs in an already-faulty line with probability $f/N$, so it takes about $\sqrt{N}$ faults to see such a line: about 32K faults for the $2^{30}$ lines of a 64GB memory. The real obstacle is a column failure, which corrupts the same bit position in all eight words of a line. SafeGuard therefore keeps an 8-bit column parity. On a MAC mismatch it tries single-bit correction, then reconstructs each candidate column in turn from the parity until the MAC matches. With column parity, the probability of system failure is virtually identical to that of conventional SECDED.
For Chipkill modules, which tolerate the failure of a whole chip and use x4 devices (four data bits per chip), one of the two extra chips holds a 32-bit MAC and the other a 32-bit chip-wise parity. A failed chip is found by reconstructing each chip in turn and checking the MAC. With a permanently failed chip, Eager Correction reconstructs the known-bad chip before the first MAC check, so the MAC is not checked against that chip's faulty data on every access.
How long does detection hold?
An $n$-bit MAC lets corrupted data escape a check with probability
Suppose a break-through attack corrupts one line in every 64 ms refresh window, and no preventive action is ever taken. With a 32-bit MAC and one check per fault, an escape is expected after $2^{32}\times 64$ ms, about 9 years of continuous attack. Without Eager Correction, each fault can incur up to 18 failed MAC checks, and detection is exhausted within 6 months. With the 46-bit MAC of the SECDED design, the attack must continue for more than 1,000 years. For reference, SGX uses a 56-bit MAC and TDX a 28-bit MAC.
Figure 28. $2^{n} \times 64$ ms, divided by the number of MAC checks per corrupted line. Move the slider to change the MAC size. Each additional bit doubles the time. Up to 18 checks apply to the Chipkill design without Eager Correction. For the SECDED design, the paper quotes a more conservative bound (over 1,000 years) than one check per line gives (about 143,000 years).
- 0.7%average slowdown, for both the SECDED and the Chipkill design
- 0additional DRAM; under 32 bytes of SRAM
- 46 or 32 bitsof MAC per 64-byte line
The same MAC kept in a separate region, as in SGX, would cause an 18.7% slowdown. With the SECDED design, the worst-case workload slows down by 3.6%.
By the numbers
Figure 29. Average slowdown from the MAC alone, with the same MAC latency in all three designs. SafeGuard reads the MAC together with the data.
SafeGuard: Reducing the Security Risk from Row-Hammer via Low-Cost Integrity Protection · HPCA 2022
Part IIICounting inside the chip
The designs so far place the defense in the memory controller, which does not know which rows are physically adjacent. The DRAM chip does. Inside the chip, refreshing the victims is again the natural mitigating action, provided that the refreshes themselves are counted. JEDEC's DDR5 specification now provides a foundation there: Per Row Activation Counting (PRAC). PRAC has two parts. First, an activation counter is added to each DRAM row, using additional DRAM cells and sense amplifiers, and it is incremented on every activation of the row. Second, the Alert Back-Off (ABO) protocol lets the DRAM request mitigation time from the memory controller:
- When a row's counter crosses the Back-Off threshold $N_{BO}$, the DRAM asserts the Alert signal.
- The Alert is non-blocking. The memory controller may continue to issue activations for up to 180 ns, which is $ABO_{ACT} = 3$ activations.
- The controller then issues $N_{mit}$ Refresh Management (RFM) commands, where $N_{mit}$ is 1, 2 or 4. Each RFM takes 350 ns and gives the DRAM time to mitigate. Because the Alert does not identify the bank, these are All-Bank RFMs that stall every bank.
- The next Alert can be asserted only after $ABO_{Delay} = N_{mit}$ further activations.
PRAC establishes a principled interface, but the specification provides minimal implementation details. Which row to mitigate on an RFM and how to remember pending mitigations are left to the DRAM manufacturer, and the counter update that the specification assumes lengthens the DRAM timings. The next three papers address these questions. The last two examine what PRAC leaks, and whether per-row counters are needed at all.
QPRACHPCA 2025
Key idea A practical PRAC implementation needs a queue of the rows that await mitigation. A first-in, first-out queue that is full cannot accept another row, even one with a higher activation count. QPRAC orders the queue by activation count: a row replaces the entry with the lowest count whenever its own count is higher, and each RFM mitigates the entry with the highest count.
Prior PRAC implementations are either insecure or impractical. Panopticon, the design that inspired PRAC, enqueues a row in a first-in, first-out service queue, the list of rows awaiting mitigation, when a threshold bit of its counter toggles. Under the PRAC specification this is insecure, for two reasons that compound with the non-blocking Alert:
- Toggle+Forget. The attacker fills the queue with $Q$ rows and uses the ABO window to push a target row past the queue's mitigation threshold $M$ while the queue is full. The target's threshold bit toggles, but the row is not enqueued and is not considered again until the bit toggles once more. With a 4-entry queue, the target receives more than 100K activations without mitigation.
- Fill+Escape. Even if the full counter value is compared on every activation, a full queue cannot accept the target. Every $5\times M$ activations spent refilling the queue give the target 3 unmitigated activations. The best case for the defender is 1,283 unmitigated activations at $M = 512$, so the design is insecure below a $T_{RH}$ of 1,280.
The alternative, UPRAC, mitigates the $N_{mit}$ most-activated rows on each Alert without a queue. Identifying those rows requires reading the counter of every row in the bank, which is impractical.
A priority queue
QPRAC replaces the FIFO with a small Priority-based Service Queue (PSQ) in each bank, ordered by activation count. On every activation, the row's count is compared with the lowest count in the PSQ, and the row replaces that entry if its count is higher. A single threshold, $N_{BO}$, both identifies the row to mitigate and raises the Alert. On each RFM, the DRAM mitigates the highest-count entry: it refreshes the victim rows within the blast radius, the number of rows on either side that an aggressor can disturb, resets the aggressor's counter, and removes the entry. Each mitigative refresh also increments the victim's own counter, which covers Half-Double.
Two further policies reduce the number of Alerts. With opportunistic mitigation, every bank uses an All-Bank RFM to mitigate its own highest-count rows, even if the Alert came from another bank. With proactive mitigation, each bank mitigates its top entry during a regular refresh (REF) command, and the energy-aware variant does so only when the count has reached $N_{PRO}$, by default $N_{BO}/2$.
The lowest secure threshold
The strongest known pattern against such a design is the wave or feinting attack. In a setup phase, the attacker brings a pool of $R_1$ rows to $N_{BO}-1$ activations each. In the online phase, it activates every row in the pool once per round. Each Alert removes $N_{mit}$ rows from the pool, and in the final round the attack hammers the single remaining row. The defense is secure if
where $N_{online}$ is the largest number of activations the last row receives in the online phase, $NR$ is the number of rounds it survives, and $BR$ is the blast radius: the mitigations of neighboring rows can add $BR$ activations to it. An Alert occurs every $ABO_{ACT} + ABO_{Delay}$ activations, so the pool shrinks from round $i-1$ to round $i$ as
Figure 32. Equation $\eqref{eq:wave}$ with one RFM per Alert: an Alert every four activations removes one row, so each round removes about a quarter of a large pool, $\lfloor (R-2)/4 \rfloor$ rows. Move the slider to change the size of the pool. Starting from all rows of a bank, the pool stops shrinking after 40 rounds, which gives $N_{online} = 40 + 3 + 1 + 2 = 46$. Smaller pools are computed for this page.
From a pool of all 128K rows of a bank, the paper obtains an $N_{online}$ of 46, 30 and 23 for 1, 2 and 4 RFMs per Alert. The pool is further limited by time, since the setup and online phases must fit in the 32 ms refresh window. The resulting secure thresholds are:
| Back-Off threshold $N_{BO}$ | 1 RFM per Alert | 2 RFMs | 4 RFMs |
|---|---|---|---|
| 1 | 44 | 29 | 22 |
| 32 (default) | 71 | 58 | 52 |
| 256 | 289 | 279 | 274 |
| 32, with proactive mitigation on every REF | 66 | 55 | 50 |
In every row of the table, the secure threshold exceeds the Back-Off threshold by between 18 and 43 activations, so it tracks $N_{BO}$ closely.
A PSQ gives the same bound as an ideal design that always mitigates the $N_{mit}$ most-activated rows, as long as it has at least $N_{mit}$ entries, or $N_{mit}+1$ with proactive mitigation. Under the wave attack all rows in the pool are at the same count, and a row evicted from the PSQ re-enters as soon as it is activated again. Hence five entries suffice for up to four RFMs per Alert.
- 71lowest secure $T_{RH}$ at the default $N_{BO}$ of 32 with one RFM per Alert
- 0.8%average slowdown, and 0% with proactive mitigation
- 15 bytesof SRAM per bank for the five-entry queue
The slowdown is measured against a DDR5 baseline that already uses PRAC timings. Opportunistic mitigation matters: without it, the slowdown is 12.4%. The energy-aware proactive design has an energy overhead of 1.9%, and the queue adds 0.05% to the area of a DDR5 chip.
By the numbers
Figure 33. Average slowdown across 57 workloads, with one RFM per Alert. Letting every bank use each All-Bank RFM removes almost all Alerts.
Figure 34. Average slowdown against in-DRAM trackers that rely on frequent RFMs. Their cost rises steeply as the threshold falls, while QPRAC with proactive mitigation stays at 0%. QPRAC's baseline already uses PRAC timings; Mithril and PrIDE are simulated without the PRAC timing increase.
QPRAC determines which row to mitigate. Its 0% is measured against a baseline that already includes the cost of the counters. The next two papers address the cost of counting itself.
QPRAC: Towards Secure and Practical PRAC-based Rowhammer Mitigation using Priority Queues · HPCA 2025
CnC-PRAC2025
Key idea When the counters are stored in separate counter rows, every activation of a data row also activates a counter row. CnC-PRAC holds the counter updates in a small buffer. When four buffered updates target the same counter row, one activation of that row performs all four.
Counting has a cost. Every activation requires a read-modify-write of the row's counter. When the counter is stored in line with the data row, as in QPRAC, the update lengthens the precharge latency $t_{RP}$ and the row cycle time $t_{RC}$, which slows a system down by almost 10% on average relative to DDR5 without PRAC, as reported by Chronus, a prior design. Chronus avoids the timing penalty by placing the counters in a separate sub-array and updating them concurrently with the data access. Unfortunately, each data-row activation then triggers an additional counter-row activation, which costs energy.
CnC-PRAC builds on the Chronus substrate and makes two observations. First, counter accesses have locality. In the configuration this paper evaluates, with 64K rows per bank and a 1-byte counter per row, the counters of a bank occupy 64KB. An x8 chip stores 1KB per row, so the counters fit in just 64 counter rows:
Consecutive activations of different data rows therefore often need counters in the same counter row. Within a window of 64 counter requests, six of them target the same counter row on average. Second, the footprint of counters is large, so caching them does not help. Covering half of the activations takes from about 600 rows per bank for small-footprint workloads to about 7,500 for large ones, and a 64-entry counter cache has a hit rate below 3.5%. Hence the name: coalesce, not cache.
CnC-PRAC buffers each counter request in a small content-addressable memory in the DRAM, off the critical path of the data access. When $M = 4$ buffered requests map to the same counter row, a single counter-row activation performs all four read-modify-writes. Two designs are proposed: a unified 64-entry buffer of 3-byte entries, and a per-row design with four entries for each counter row.
Delaying a counter update must not weaken security. A request for a counter that is already buffered increments a repeat count in its entry, and an entry is removed when its repeat count reaches $K = 4$. A stored count can therefore lag the true count by at most $K$, and the Back-Off threshold is lowered by the same amount, from 32 to $32 - K = 28$. With one mitigation per Alert, the paper reports that CnC-PRAC securely handles a $T_{RH}$ of 66, the value QPRAC obtains at an $N_{BO}$ of 32 with proactive mitigation.
- 73% to 82%fewer counter-row activations than Chronus
- 0.84% to 1%dynamic energy overhead over DDR5 without PRAC, against 2.1% for Chronus
- 192 bytesper bank for the unified buffer; 384 bytes for the per-row design
The unified design needs 27.1% of Chronus's counter-row activations and the per-row design 17.6%, which the paper rounds to savings of almost 75% to 83%. Every activation is still counted; only the number of counter-row activations falls. Combined with a QPRAC-style service queue and proactive mitigation, performance overhead stays below 0.5% on average relative to DDR5 without PRAC, as it does for Chronus. The timing of four coalesced single-byte updates within one activation is assumed from prior work on small sub-arrays, and a precise evaluation for DDR5 is left for future work.
By the numbers
Figure 36. Counter-row activations relative to Chronus, which activates a counter row for every data-row activation. The unified design comes close to an ideal sorted buffer of the same size.
CnC-PRAC reduces how often the counter rows are activated. Counterpoint examines whether the read-modify-write is needed at all.
CounterpointDRAMSec 2025
Key idea A binary counter must be read, incremented and written back on every activation, which lengthens the DRAM timings. Counterpoint stores the count as a bit pattern that is incremented by shifting it by one cell. The shift takes place while the sense amplifiers restore the row, so no read-modify-write is needed.
Counterpoint attacks the same cost from the circuit side. The read-modify-write is slow because the counter bits must be read out of the sub-array to global logic, incremented, and written back. Against DDR5 without PRAC, this alone causes a 7.4% average slowdown at any threshold, and up to 18.3% for a memory-intensive workload. An incrementer cannot be placed in each sub-array, because the sense-amplifier layout must align with the bitline pitch.
The key idea is to choose an encoding in which incrementing is a shift. A DRAM read is destructive, so every activation already ends with a restoration phase in which the sense amplifiers write the sensed values back into the cells. If the count is a one-hot style bit vector, the counter can be incremented during restoration by writing each counter bit into the cell on the adjacent bitline. This needs only pass transistors beside the sense amplifiers, and no read-modify-write.
In the basic scheme, a constant 1 is shifted in on every activation, and the counter saturates when all bits are 1. With $N$ counter cells it has $N+1$ states and uses two pass transistors per bitline. Counting to 500 would need 499 cells per row, about 6% of a row with 8K columns. The extended scheme adds one pass transistor per bitline to shift in the opposite direction. A single 1 first moves across the cells, one cell per activation. When it reaches the last cell, the counter fills with 1s from that end. This gives $2N$ states for $N$ cells.
Figure 38. The counter cells of one row under the two encodings. Move the sliders to change the number of cells and the number of activations since the last refresh.
The counter bits are reset during auto-refresh. The shift is assumed to lengthen the restoration time $t_{RAS}$ from 32 ns to 38 ns, a conservative estimate. The Back-Off thresholds are taken from the QPRAC analysis.
- 1.1%average slowdown at a threshold of 64, against 8% for PRAC with read-modify-write
- 0.9%average slowdown of an ideal PRAC with no counting overhead
- 2 or 3pass transistors per counter bitline
At higher thresholds, the slowdown of one-hot counting is below 0.5%. This is a workshop paper: transistor-level layout and timing characterization are left for future work.
By the numbers
Figure 39. Average slowdown across 57 workloads. Most of the cost of PRAC is the timing of the read-modify-write, not the Alerts, and one-hot counting removes it.
Counting can be made low-cost, and the queue is secure. However, the Alert itself carries information.
Counterpoint: One-Hot Counting for PRAC-Based RowHammer Mitigation · DRAMSec 2025
PRACLeak and TPRACISCA 2025
Key idea PRAC raises an Alert only when the counter of a row reaches the Back-Off threshold. The time of an Alert therefore reveals how often a row was activated, to every process that shares the memory channel. TPRAC issues its RFMs at a fixed interval, independent of the activations, so their timing carries no information.
A defense can also leak. An ABO, that is, an Alert together with its RFMs, stalls every request on the memory channel for $t_{RFM} = 350$ ns per RFM, and whether an ABO occurs depends on how often a particular row has been activated. The mitigation is therefore activity-dependent, and its latency is visible to every process that shares the memory module. In simulation, an attacker on another core observes an average memory latency of 545 ns when a victim process triggers an ABO with one RFM, 976 ns with two, and 1,669 ns with four. We call the resulting class of attacks PRACLeak.
Two covert channels
A covert channel lets two cooperating processes communicate where the system forbids it. In the activity-based channel, the sender and receiver share only a memory channel. To send a 1, the sender activates a row $N_{BO}$ times so that an ABO fires; to send a 0, it idles. The receiver watches for a latency spike. In the activation-count-based channel, the two share one DRAM row. The sender activates the row $k \lt N_{BO}$ times. The receiver then activates the same row until the ABO appears, which happens after exactly $N_{BO} - k$ activations and reveals $k$. Each transmission thus carries $\log_2 N_{BO}$ bits. To first order, under a closed-page policy, the periods are:
The periods measured in simulation, with four RFMs per ABO, are longer than this estimate:
| Channel | $N_{BO}$ | Period | Bitrate |
|---|---|---|---|
| Activity-based, 1 bit per period | 256 | 24.1 µs | 41.4 Kbps |
| 512 | 46.7 µs | 21.4 Kbps | |
| 1024 | 91.8 µs | 10.9 Kbps | |
| Activation-count-based, $\log_2 N_{BO}$ bits per period | 256 | 64.7 µs | 123.6 Kbps |
| 512 | 128.0 µs | 70.3 Kbps | |
| 1024 | 257.6 µs | 38.8 Kbps |
As $N_{BO}$ increases, the bitrates decrease because the periods grow longer. Unlike most timing channels, the count-based channel transmits exact values. The error rate of both channels is below 0.1%.
Leaking an AES key
The same primitive is a side channel. AES implementations with T-tables index a table with $x_i = p_i \oplus k_i$ in the first round, where $p_i$ is a plaintext byte and $k_i$ a key byte. Each table spans 16 cache lines, each in a different DRAM row. The attacker and the victim share these DRAM rows. The attacker holds $p_0$ constant and randomizes the other bytes, and it evicts the table's lines from the cache so that each lookup reaches DRAM. The row holding the line for $x_0$ then receives more activations than the other 15. After the victim's encryptions, the attacker activates the 16 rows in turn until an ABO fires. The first row to trigger it is the most-activated one, which reveals the upper four bits of $k_0$.
Figure 40. An example with $N_{BO} = 256$. The victim's lookups leave 207 activations on one row. The attacker sees the ABO after 49 more, which identifies the row and the top four bits of the key byte.
Each such run, of fewer than 200 encryptions, leaks the upper four bits of one key byte. Repeating it with each plaintext byte held constant in turn leaks 64 of the 128 key bits.
Timing-Safe PRAC
The channel exists because mitigation depends on activity. Proactive RFMs that are triggered by a bank's activation count do not help, since they are activity-dependent as well. Timing-Safe PRAC (TPRAC) instead issues Timing-Based RFMs (TB-RFMs) at a fixed interval, the TB-Window, regardless of memory activity. On each TB-RFM, every bank mitigates the most-activated row, held in a single-entry queue. A single entry suffices because the timing of TB-RFMs is fixed and cannot be influenced by the attacker: the queue always holds the currently most-activated row. The TB-Window is chosen so that no row can ever reach $N_{BO}$, which eliminates ABOs altogether.
How short must the window be? The worst case is again the wave (feinting) attack. With $ACT_{TB} = \text{TB-Window}/t_{RC}$ activations per window, the pool of decoy rows loses one row per TB-RFM, and the target receives one activation per round and then a full window:
where $R_1$ is the initial pool, $R_N$ the pool remaining after $N-1$ rounds, $AR$ the number of attack rounds, and $T_{ACT}$ the total activations the target row receives. If counters are reset every refresh window, the optimal pool is $R_1 = MAXACT_{tREFW}/ACT_{TB}$, with about 550K activations possible in the 32 ms window.
Figure 41. $T_{MAX}$, the largest $T_{ACT}$ an attacker can reach, for three TB-Windows. One $t_{REFI}$ is 3.9 µs in DDR5. Resetting the counters every refresh window limits the attacker's pool and lowers the bound.
The main cost is bandwidth: TB-RFMs occupy at most $t_{RFM}/\text{TB-Window}$ of the channel's time. At a threshold of 1,024, TPRAC issues one TB-RFM every 1.6 $t_{REFI}$, or 6.2 µs, so the bandwidth loss is at most $350\ \text{ns}/6.2\ \mu\text{s} = 5.6\%$. An individual workload can lose slightly more, because each TB-RFM also closes open rows: the worst case is 8.3%.
Figure 42. The bound $t_{RFM}/\text{TB-Window}$ with $t_{RFM} = 350$ ns and $t_{REFI} = 3.9$ µs. Move the slider to change the TB-Window. $T_{MAX}$ is shown for the three windows the paper reports.
- 124 Kbpspeak covert-channel bitrate through PRAC
- 3.4%average slowdown of TPRAC at a threshold of 1,024, relative to PRAC without ABO
- 3 bytesone interval register in the memory controller; no change to the DRAM interface
The cost rises as the threshold falls, because TB-RFMs must be issued more often: 0.6% at a threshold of 4,096, 6.5% at 512, and 22.6% at 128.
By the numbers
Figure 43. Average slowdown of TPRAC across 50 workloads, relative to PRAC without ABO. A lower threshold needs a shorter TB-Window, and each TB-RFM stalls the channel for 350 ns.
TPRAC removes the leak, but it keeps the counters and their cost. The last paper examines whether a defense at these thresholds needs per-row counters at all.
When Mitigations Backfire: Timing Channel Attacks and Defense for PRAC-Based RowHammer Mitigations · ISCA 2025
PrISMISCA 2026
Key idea MINT mitigates one randomly chosen activation per window, so an aggressor is selected with probability $1/W$ and can go unselected for many windows. PrISM samples $R$ activations per window and remembers the samples it did not mitigate for $L$ windows. A row that is sampled again while it is in this history is mitigated, so a row that keeps reappearing is mitigated with a much higher probability.
PRAC is precise, but its counters are costly. They occupy DRAM cells in every row, and the read-modify-write on each activation raises $t_{RP}$ from 16 ns to 36 ns and $t_{RC}$ from 48 ns to 52 ns. In this paper's evaluation, with eight cores sharing one DDR5-8000 channel, PRAC causes an average slowdown of 14%, and 21.8% for workloads with high memory intensity, largely independent of the threshold. This paper states thresholds as $T_{RH\text{-}D}$, the double-sided threshold, where two aggressor rows adjacent to a victim are alternately hammered.
Probabilistic in-DRAM mitigations avoid counters, as PRA did in the memory controller. MINT divides time into mitigation windows of $W$ activations, picks one random activation slot per window, and mitigates the row in that slot. At lower thresholds, however, such schemes face a statistical barrier, the non-selection problem. Each window mitigates at most one row, so a persistent aggressor is selected with probability only $1/W$, about 1.4% for $W = 72$, and it can go unselected for many consecutive windows. The only remedy is to shrink $W$ for every workload: MINT issues an RFM every 24 activations at a threshold of 500 and every 11 at 250, which reduces the available bandwidth by nearly 23% and 40%.
Sampling with a history
PrISM observes that a persistent aggressor, unlike a benign row, keeps reappearing. It therefore samples $R$ slots per window instead of one, remembers, for $L$ windows, the sampled rows that were not selected for mitigation, and requests an additional mitigation only when a sampled row appears again. A row that is present in every window is sampled with probability $R/W$ per window, so the probability that it is sampled at least once in $L$ consecutive windows is roughly:
For $W = 72$, $R = 7$ and $L = 41$, this probability exceeds 98%. This is a first estimate; the security analysis below refines it.
Figure 44. Equation $\eqref{eq:prism}$. Move the sliders to change the window, the number of samples and the lookback, or select one of the configurations in the paper. The dashed curve is a design with one sample per window. The design requires $W \ge 4R$.
- Sampled Slot Queue (SSQ). Holds the rows sampled in the current window. At the end of the window, one of the non-intersecting samples is chosen at random as the default mitigation candidate.
- Sampled History Queue (SHQ). A first-in, first-out history of the sampled-but-unselected rows of the previous $L$ windows, with $(R-1)\times L$ entries. Every sampled row is compared against it. A match is an intersection.
- Pending Mitigation Queue (PMQ). 16 entries, each with a 3-bit activation counter. Intersecting rows and default candidates wait here for a mitigation opportunity: a targeted refresh, which borrows time from a periodic refresh, or a proactive RFM. Each opportunity services the entry with the highest count.
- Alert. If the PMQ fills, or a pending entry is activated more than $T_{PMQ} = 4$ times, PrISM uses the existing ABO protocol to request one additional RFM.
Security analysis
The worst-case pattern activates $X$ aggressor rows in a circle, one per slot, so that each row appears at most once per window; extra copies of a row only make it more likely to be sampled. A row enters the SHQ when it is sampled but not chosen as the default candidate, and leaves after $L$ windows. Let $P_{in}$ be the per-window probability of entering the history. For a row that appears once in every window, modeling this as a two-state Markov chain gives the steady-state probability that the row currently has an entry in the history, which is the value the security analysis uses:
PrISM prefers a row that is not already in the history as its default candidate. In each window, the aggressor is then mitigated, with per-window probability $P_m$, either by the default draw or because it is sampled while an earlier sample of it is still in the history:
The intersection term is what MINT lacks. For the configuration used at a threshold of 500, and a row that appears in every window, these equations give $P_{SHQ} \approx 0.77$ and $P_m \approx 8.7\%$ per window. These values are computed for this page; the fixed-point form of $P_{SHQ}$ in the paper's main text gives about 0.69 and 8.0%. A single random draw per window of the same size gives $1/72 \approx 1.4\%$. The difference compounds from window to window:
Figure 46. An illustration from Equations $\eqref{eq:shq}$ and $\eqref{eq:pm}$: $(1-P)^{n}$ for a row that appears in every window, treating each window as an independent draw at the steady-state probability. Move the sliders or select a configuration. For $W = 72$, $R = 7$ and $L = 41$, a quarter of such aggressors are still unmitigated after 100 windows with one draw per window. With intersections, at the steady-state rate, about one in ten thousand are. An aggressor that starts with no entry in the history is mitigated more slowly at first. The design requires $W \ge 4R$.
When the attacker spreads its activations over more rows, with $X \gt W$, each row reappears only about $K \approx L\cdot W/X$ times within the lookback, and the analysis uses $K$ in place of $L$. $P_m$ is converted into the lowest supported threshold for a target mean time to failure of 10,000 years per bank, and the result is swept over $X$ to find the worst case. A row waiting in the PMQ can still be activated, so the supported threshold includes that slack: $T_{PMQ} = 4$ activations before an Alert, plus 12 more that chained Alerts can add with a 16-entry PMQ. The chosen configurations are:
| Target $T_{RH\text{-}D}$ | Supported | Window $W$ | Samples $R$ | Lookback $L$ | SHQ entries |
|---|---|---|---|---|---|
| 1000 | 975 | 72 | 4 | 12 | 36 |
| 750 | 731 | 72 | 7 | 11 | 66 |
| 500 | 499 | 72 | 7 | 41 | 246 |
| 250 | 249 | 48 | 9 | 79 | 632 |
Two bounds complete the design. The ABO protocol can drain only one pending entry every four activations, so in the worst case, where the samples of two adjacent windows cluster and all intersect, the SSQ must buffer
entries: 13 for $R = 9$. And an attacker that maximizes intersections can force at most $R$ RFMs per window. With one All-Bank RFM stalling roughly seven activations, the worst-case throughput loss is $7R/(W + 7R)$, a slowdown of $1.68\times$ at a threshold of 500.
- 0.2%average slowdown at a threshold of 500, against 14% for PRAC and 3.8% for MINT
- 1.5%at a threshold of 250, against 10.7% for MINT
- 625 bytesof SRAM per bank at 500; no per-row counters and no changes to the DRAM array
Benign workloads rarely intersect, so PrISM issues few RFMs in total: 0.03 per $t_{REFI}$ per channel at a threshold of 500. These results assume one targeted refresh opportunity every two $t_{REFI}$; without any, the slowdown at 500 is 3.2% for PrISM and 7.2% for MINT. At thresholds of 250 and below, PrISM also randomizes the address mapping. At 250, this reduces the Alert rate of benign workloads by 6.2×, from 312.3 to 50.3 Alerts per 1,000 $t_{REFI}$.
By the numbers
Figure 47. Average slowdown across 57 workloads at thresholds of 500 (left) and 250 (right). PRAC incurs the cost of its counters at every threshold, and MINT the cost of a fixed RFM rate. PrISM issues extra RFMs only when a sampled row reappears.
Loaded Dice: Solving the Non-Selection Problem for Scalable Probabilistic RowHammer Defense · ISCA 2026
At a glance
The thirteen designs above fall into the three parts of this page: tracking in the memory controller, the mitigating action, and counting inside the DRAM chip. Each answers a problem that an earlier design left open, or created, and the thresholds they are evaluated at fall from 32K to 64. The table collects them.
| Design | Key idea | Threshold evaluated | Average slowdown | Storage |
|---|---|---|---|---|
| CRA | A counter per row, kept in DRAM and cached | 32K | under 0.5% | 2MB of DRAM per 8GB; 128KB cache |
| PRA | Refresh neighbors with a small probability | 32K | under 0.2%, at a probability of 0.1% | none |
| Hydra | Group counters in SRAM, row counters in DRAM | 500 | 0.7% | 56.5KB of SRAM per 32GB; 4MB of DRAM |
| DAPPER-H | Two secret hashes over shared counters | 500 | 0.1%; 0.9% under attack | 96KB of SRAM per 32GB |
| RRS | Swap the aggressor with a random row | 4.8K | 0.4% | 686KB of SRAM per rank |
| Scale-SRS | Swap without un-swapping; pin outliers | 1,200 | 0.7% | 76.9KB of SRAM per bank; 0.05% of DRAM |
| AQUA | Quarantine the aggressor | 1K | 2.1% | 41KB of SRAM per rank; 1.1% of DRAM |
| SafeGuard | A MAC in the ECC bits detects what gets through | any | 0.7% | under 32 bytes |
| QPRAC | Priority queue for PRAC | 71 | 0.8%; 0% with proactive mitigation | 15 bytes per bank |
| CnC-PRAC | Coalesce counter updates | 66 | under 0.5% | 192 bytes per bank (unified); 384 bytes (per-row) |
| Counterpoint | Count by shifting during restore | 64 | 1.1% | $N$ cells per row for $2N$ counts |
| TPRAC | RFMs at fixed intervals close the timing channel | 1,024 | 3.4% | 3 bytes |
| PrISM | Mitigate rows that are sampled twice | 500 | 0.2% | 625 bytes per bank |
Slowdowns are averages over benign workloads, each measured against the baseline of its own paper, so they are not directly comparable. The same holds across sections. RRS, for example, is re-evaluated in the AQUA paper on a different system and workloads (19.8% at a threshold of 1K),. The two papers also size the RRS indirection table differently: 2.4MB per rank at 1K in the AQUA paper, and 250KB per bank at 1,200 in the Scale-SRS paper. QPRAC and TPRAC are measured against DDR5 with PRAC timings; the storage of RRS includes its tracker, while that of Scale-SRS and AQUA does not.
Read the papers
- Loaded Dice: Solving the Non-Selection Problem for Scalable Probabilistic RowHammer DefenseISCA 2026
- When Mitigations Backfire: Timing Channel Attacks and Defense for PRAC-Based RowHammer MitigationsISCA 2025
- QPRAC: Towards Secure and Practical PRAC-based Rowhammer Mitigation using Priority QueuesHPCA 2025
- DAPPER: A Performance-Attack-Resilient Tracker for RowHammer DefenseHPCA 2025
- CnC-PRAC: Coalesce, not Cache, Per Row Activation Counts for an Efficient in-DRAM Rowhammer Mitigation2025
- Counterpoint: One-Hot Counting for PRAC-Based RowHammer MitigationDRAMSec 2025
- Scalable and Secure Row-Swap: Efficient and Safe Row Hammer Mitigation in Memory SystemsHPCA 2023
- AQUA: Scalable Rowhammer Mitigation by Quarantining Aggressor Rows at RuntimeMICRO 2022
- Hydra: Enabling Low-Overhead Mitigation of Row-Hammer at Ultra-Low Thresholds via Hybrid TrackingISCA 2022
- Randomized Row-Swap: Mitigating Row Hammer by Breaking Spatial Correlation between Aggressor and Victim RowsASPLOS 2022
- SafeGuard: Reducing the Security Risk from Row-Hammer via Low-Cost Integrity ProtectionHPCA 2022
- Architectural Support for Mitigating Row Hammering in DRAM MemoriesCAL 2014