Phoenix: Rowhammer Attacks on DDR5 with Self-Correcting Synchronization

We demonstrate with Phoenix that all DDR5 devices from SK Hynix, currently the largest DRAM manufacturer, are still vulnerable to a new variant of Rowhammer attacks.  Our reverse engineering of their in-DRAM Rowhammer mitigations reveals more sophisticated protection mechanisms, which resist all known Rowhammer patterns. To identify blind spots in the new mitigations, we conducted a series of carefully designed experiments, which revealed that the mitigation does not sample certain refresh intervals. This allowed us to craft two novel Rowhammer patterns that effectively bypass these deployed mitigations.

However, due to the patterns’ extensive length, covering thousands of refresh intervals, we had to come up with a new way of very precisely synchronizing with all these refresh operations. Phoenix’s self-correcting refresh synchronization automatically detects and realigns the pattern’s execution whenever it detects a missed refresh operation during the attack. We evaluate Phoenix on 15 DDR5 DIMMs from SK Hynix and show that it can trigger bit flips on all of them. We also demonstrate that the bit flips are exploitable by building the first Rowhammer privilege escalation exploit running in default settings on a PC in as little as 109 seconds. You can find the demo of this exploit below:

Reverse Engineering DDR5

We designed FPGA-based experiments to study the behavior of the Target Row Refresh (TRR) in-DRAM Rowhammer mitigations. Similar to previous work, we use retention errors as a side channel to determine rows refreshed by TRR. We first zoom out to determine the sampling period of the mitigation before zooming in to understand the sampling strategy.

Zooming Out. We conducted experiments in which we incrementally increased the length of the tested Rowhammer pattern. We performed double-sided hammering of a different aggressor pair in every tREFI interval such that each interval corresponds to another victim row. Afterwards, we determined which victim rows got refreshed by TRR. Using this method, we found that after 128 tREFI intervals, the sampling period repeats, which is 8x larger than the sampling period considered by existing Rowhammer patterns.

Zooming In. Studying the TRR’s sampling mechanism showed no consistent sampling behavior in the first 64 tREFI intervals. In the last 64 tREFI intervals, however, our experiment showed a repeating pattern in every four intervals. More precisely, sampling almost never happens in the first two intervals, which we call lightly sampled intervals. More fine-granular experiments within these lightly sampled intervals, involving up to 59 distinct victim rows, revealed which DRAM activations are always sampled.

Equipped with these insights, we explain how we derived effective Rowhammer patterns leveraging blind spots to evade the mitigations.

New Rowhammer Patterns

From our reverse engineering results, we derived a new Rowhammer pattern. In total, we reverse-engineered two devices, resulting in two new Rowhammer patterns, which together bypass the mitigations of all 15 DDR5 devices from SK Hynix of our test pool.

Our shorter pattern consists of 128 tREFI intervals. Due to the inconsistent sampling behavior, we do not hammer in the first part of the pattern. In the second part, we focus on the lightly sampled intervals (i.e., the first two intervals) but never on the last two intervals. The second part is repeated sixteen times, i.e., we hammer in every pattern repetition for 32 tREFI intervals in total.

Figure: Hammering pattern for DIMM H2.

We successfully tested our patterns on our FPGA infrastructure and found that 8 of 15 DDR5 devices from SK Hynix were vulnerable. We repeated the reverse engineering for another device from which we derived another pattern, covering 2608 tREFI intervals. We refer the interested reader to Appendix A of our paper for more details.

Hitting vulnerable offsets. Our pattern requires a precise alignment with the TRR-internal refresh state. We found that only 2 of 128 (1.56%) refresh offsets are vulnerable. However, the same offset occurs in every bank. Therefore, we increase the probability of proper refresh alignment by hammering shifted pattern instances in parallel on each of the four banks. This increases the probability of hitting a vulnerable offset by 16x, i.e., to 25%.

Figure: Optimized P128 pattern. We hammer four shifted pattern instances on each of four banks in parallel to increase the chance of hitting a vulnerable REF offset by a factor of 16.

Self-Correcting Synchronization

A major challenge of porting the Phoenix patterns to a commodity system like a workstation or laptop is the pattern’s length. As the new patterns are up to 163x longer than current patterns, keeping synchronized with refresh commands becomes challenging. To this end, we evaluated the state-of-the-art refresh synchronization routine from Zenhammer and a multi-threaded variant of it. Our results show that they are both unsuitable to keep synchronized for long enough to induce any bit flips, even when reducing the number of activations per tREFI interval.

We overcame this challenge by designing a new self-correcting refresh synchronization method. Rather than perfectly detecting every refresh command, our method relies on the periodicity of the refresh command for realigning the hammer pattern’s execution whenever it detects that a refresh was missed. This enables us to keep in sync for thousands of refresh intervals.

Figure: Comparison of refresh synchronization methods. We compare Zenhammer’s synchronization against a multi-threaded variant of it and our self-correcting synchronization. We show the probability of reaching a hammer count (x-axis) for two activation rates, given the synchronization method’s error rate (legend). We omit line markers where the probability is below 0.001%.

Results

We test our Phoenix attack patterns on 15 DDR5 DIMMs from SK Hynix, manufactured between the end of 2021 and the end of 2024. We found that all 15 DIMMs are vulnerable to exactly one of the two patterns. Generally, the shorter pattern (128 tREFI intervals) is 2.62x more effective than the longer pattern (2608 tREFI intervals), leading to 4989 bit flips on average. We also analyzed the practical exploitability of these bit flips across three previously shown attacks targeting (i) page-table entries (PTEs) to craft an arbitrary memory read/write primitive (all DIMMs are vulnerable); (ii) RSA-2048 keys of a co-located VM to break SSH authentication (73% of vulnerable DIMMs); and (iii) the sudo binary to escalate local privileges to the root user (33% of vulnerable DIMMs). To demonstrate the real-world practicality, we reproduced the privilege escalation exploit from Rubicon for the first time on DDR5 DIMMs and demonstrated that the average time to exploitation is just 5 minutes and 19 seconds.

Table: Evaluation of DDR5 UDIMMs. For each DIMM, we report its manufacturing date (MfD.); size (Sz.); DRAM geometry (number of ranks (RK), bank groups (BG), banks per bank group (BA), and row bits to the power of two(R)); and the Rowhammer pattern it is vulnerable to (§ 5). For each DIMM, we sweep its pattern over 256MB of memory and report the number of one-to-zero (1→0) and zero-to-one (0→1) bit flips. We also report the average time to find the first exploitable bit flip for three Rowhammer attacks: the page table entry (PTE) attack, the RSA key attack, and the sudo binary attack.
IDMfD. Sz.Geom.PatternsSweep [#BFs]Attacks [mm:hh]  
[yy-mm][GiB](P128 / P2608)1→00→1PTERSAsudo
H021-1281,4,4,163 3295 46000:1004:5780:45
H122-07161,8,4,162 9174 58200:1407:0649:37
H222-08161,8,4,162 6294 08200:1506:38
H322-1281,4,4,162 8374 52600:1106:36
H422-12322,8,4,1620731802:55
H522-12322,8,4,163 9225 82100:1104:17
H623-01322,8,4,166 5929 67200:0702:2920:19
H723-01322,8,4,1656686000:39
H823-01322,8,4,1615624004:06
H923-01322,8,4,1631448602:1709:25
H1023-02322,8,4,1630446107:2723:57
H1124-01161,8,4,1612 52318 44600:0601:1912:41
H1224-01161,8,4,1610 83315 91700:0501:2721:17
H1324-04161,8,4,168 52012 7610:00501:38
H1424-12161,8,4,16241920:15

Further Information

Our paper will be presented at IEEE Symposium on Security and Privacy 2026. You can find the artifacts accompanying our publication on GitHub. Google has published a blog post about our joint work in the Google Security Blog.

FAQs

We provide answers to the most frequently asked questions about Phoenix.

Do the results imply that DDR5 devices from other vendors are protected against Rowhammer?|
No, due to the extensive effort of reverse engineering the in-DRAM Rowhammer mitigations, we limited ourselves to devices from the largest DRAM manufacturer, SK Hynix.

Which implications do these new results have for me?
We have proven that reliably triggering Rowhammer bit flips on DDR5 devices from SK Hynix is possible on a larger scale. We also proved that on-die ECC does not stop Rowhammer, and Rowhammer end-to-end attacks are still possible with DDR5. As DRAM devices in the wild cannot be updated, they will remain vulnerable for many years. We recommend increasing the refresh rate to 3x, which stopped Phoenix from triggering bit flips on our test systems.

How can I check if my SK Hynix DDR5 DRAM is vulnerable?
You can use our open-sourced proof-of-concept (POC) code on GitHub that triggers bit flips using the Phoenix attack. This code is tailored to an AMD Zen 4 system. If the POC triggers any bit flips, your DDR5 device is affected by one of our two found patterns.

Why is Rowhammer still not solved with DDR5?
Rowhammer is an DRAM industry-wide, known problem. The Rowhammer patterns used by Phoenix demonstrate that deployed in-DRAM mitigations protect against existing attacks but have not been designed in a principled way that would completely stop Rowhammer.

Does self-correcting refresh synchronization also work on DDR4?
Yes, we think that our new synchronization method should also work on systems with DDR4 DRAM. We have not measured if self-correcting synchronization also improves results on DDR4 systems, but it is likely.

Do DDR5 DIMMs equipped with on-die ECC (ODECC) stop Rowhammer?
No, we show that bit flips accumulate over time as ODECC only corrects bits after writing data or after a certain time (e.g., every 24 hours). Therefore, just hammering for longer—as we show in Section 5.2 of our paper—allows bypassing ODECC.

How can I protect myself against the Phoenix attack?
As a mitigation for existing DRAM modules, we verified that tripling the refresh rate (tREFI ≈ 1.3 us) stops Phoenix from triggering bit flips on our test systems. Running SPEC CPU2017, we have measured that this mitigation incurs an overhead of 8.4%. For future devices, more principled mitigations are required to stop Rowhammer completely.

Did you responsibly disclose your findings?
We started a responsible disclosure of Phoenix through the Swiss NCSC to SK Hynix, CPU vendors, and major cloud providers on June 6, 2025. The issue remained under embargo until September 15, 2025. We were informed on September 12 that there is a BIOS update for AMD client machines to address the issue, but we could not independently verify if this update adequately addresses Phoenix. Phoenix is tracked under CVE-2025-6202. More information, including the source code for all the experiments and the exploit, can be found at the following URL: https://github.com/comsec-group/phoenix.

Acknowledgments

We would like to thank the anonymous reviewers for their feedback and the Vulnerability Management team from the Swiss NCSC, who provided us with significant coordination support for disclosing this issue to the affected parties. This work was supported in part by a generous gift from Google.