Efficient and Generic Microarchitectural Hash-Function Recovery
Lukas Gerlach, Simon Schwarz, Nicolas Faroß, Michael Schwarz
Abstract
Modern CPUs use a variety of undocumented microarchitectural hash functions to efficiently distribute data within microarchitectural structures such as caches. A well-known function is the cache slice function that distributes cache lines to the slices of the last-level cache. Knowing these functions considerally improves microarchitectural attacks, such as Prime+Probe or Rowhammer. However, while several such linear functions have been reverse-engineered, there is no generic or automated approach for reverse-engineering non-linear functions, which are common with modern CPUs.In this paper, we introduce a novel generic approach for automatically reverse-engineering a wide range of microarchitectural hash functions. Our approach combines techniques initially used for logic-gate minimization and from computer algebra to infer the hash functions based on input-output pairs observed via side channels. With our framework, we infer 3 previously unknown non-linear hash functions on both AMD and Intel CPUs, including the new Alder Lake hybrid-CPU architecture. We verify our approach by reproducing known hash functions and evaluating side-channel attacks that rely on these functions, resulting in success rates above 97.65 %. We stress the need to design such functions with both performance and security in mind and discuss alternative designs that can be used in future CPUs.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
12 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- RISCy Cache Coherence: Timer-Free Architectural Cache Attacks via Instruction/Data Cache Incoherence cites CacheWarp: Software-based Fault Injection using Selective State Reset
- RISCy Cache Coherence: Timer-Free Architectural Cache Attacks via Instruction/Data Cache Incoherence cites Spectre Attacks: Exploiting Speculative Execution
- RISCy Cache Coherence: Timer-Free Architectural Cache Attacks via Instruction/Data Cache Incoherence cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
- CacheWarp: Software-based Fault Injection using Selective State Reset cites ZombieLoad: Cross-Privilege-Boundary Data Sampling
- Gaussian Elimination of Side-Channels: Linear Algebra for Memory Coloring cites DRAMA: Exploiting DRAM Addressing for Cross-CPU Attacks
- ZombieLoad: Cross-Privilege-Boundary Data Sampling cites Spectre Attacks: Exploiting Speculative Execution
- ZombieLoad: Cross-Privilege-Boundary Data Sampling cites DRAMA: Exploiting DRAM Addressing for Cross-CPU Attacks
- ZombieLoad: Cross-Privilege-Boundary Data Sampling cites Translation Leak-aside Buffer: Defeating Cache Side-channel Protections with TLB Attacks
- TDXRay: Microarchitectural Side-Channel Analysis of Intel TDX for Real-World Workloads cites Translation Leak-aside Buffer: Defeating Cache Side-channel Protections with TLB Attacks
- TDXRay: Microarchitectural Side-Channel Analysis of Intel TDX for Real-World Workloads cites Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGX
- Translation Leak-aside Buffer: Defeating Cache Side-channel Protections with TLB Attacks cites DRAMA: Exploiting DRAM Addressing for Cross-CPU Attacks
- Translation Leak-aside Buffer: Defeating Cache Side-channel Protections with TLB Attacks cites Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGX
- Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGX cites DRAMA: Exploiting DRAM Addressing for Cross-CPU Attacks
Cited by top-tier papers12
- CacheWarp: Software-based Fault Injection using Selective State ResetRuiyi Zhang, Lukas Gerlach, Daniel Weber, Lorenz Hetterich et al.USENIX Security 2024 · 36 citations
- TDXRay: Microarchitectural Side-Channel Analysis of Intel TDX for Real-World WorkloadsTristan Hornetz, Hosein Yavarzadeh, Albert Cheu, Adrià Gascón et al.S&P 2026 · 5 citations
- Gaussian Elimination of Side-Channels: Linear Algebra for Memory ColoringJana Hofmann, Cédric Fournet, Boris Köpf, Stavros VolosCCS 2024 · 2 citations
- ZenLeak: Practical Last-Level Cache Side-Channel Attacks on AMD Zen ProcessorsHan Wang, Ming Tang, Quancheng Wang, Ke Xu et al.DAC 2025 · 2 citations
- RISCy Cache Coherence: Timer-Free Architectural Cache Attacks via Instruction/Data Cache IncoherenceFabian Thomas, Michael SchwarzS&P 2026 · 1 citation
Builds on18
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
- DRAMA: Exploiting DRAM Addressing for Cross-CPU AttacksPeter Pessl, Daniel Gruss, Clémentine Maurice, Michael Schwarz et al.USENIX Security 2016 · 500 citations
- ZombieLoad: Cross-Privilege-Boundary Data SamplingMichael Schwarz, Moritz Lipp, Daniel Moghimi, Jo Van Bulck et al.CCS 2019 · 464 citations
- Leaky Cauldron on the Dark Land: Understanding Memory Side-Channel Hazards in SGXWenhao Wang, Guoxing Chen, Xiaorui Pan, Yinqian Zhang et al.CCS 2017 · 403 citations
- Translation Leak-aside Buffer: Defeating Cache Side-channel Protections with TLB AttacksBen Gras, Kaveh Razavi, Herbert Bos, Cristiano GiuffridaUSENIX Security 2018 · 357 citations
Related papers
- Rapid Reversing of Non-Linear CPU Cache Slice Functions: Unlocking Physical Address LeakageMikka Rainer, Lorenz Hetterich, Fabian Thomas, Tristan Hornetz et al.S&P 2025
- ρHammer: Reviving RowHammer Attacks on New Architectures via PrefetchingWeijie Chen, Shan Tang, Yulin Tang, Xiapu Luo et al.MICRO 2025 · 1 citation
- DRAMDig: A Knowledge-assisted Tool to Uncover DRAM Address MappingMinghua Wang, Zhi Zhang, Yueqiang Cheng, Surya NepalDAC 2020 · 42 citations
- Slice+Slice Baby: Generating Last-Level Cache Eviction Sets in the Blink of an EyeBradley Morgan, Gal Horowitz, Sioli O'Connell, Stephan van Schaik et al.S&P 2025
- SPOILER: Speculative Load Hazards Boost Rowhammer and Cache AttacksSaad Islam, Ahmad Moghimi, Ida Bruhns, Moritz Krebbel et al.USENIX Security 2019 · 86 citations
