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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a1b641a7-da17-45c6-a351-224f29eea892Cited 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
