Lune

CCS2026Top-tier venue

LeakyTree: Cross-VM Bit-by-Bit Deduplicated Page Leakage via Linux Kernel Samepage Merging Internals

Ernesto Martinez Garcia, Lukas Maar, Martin Unterguggenberger, Mathias Oberhuber, Stefan Mangard

Abstract

Memory page deduplication in modern systems is known to introduce side-channel leakages. An attacker can maliciously craft pages and probe, via CPU cache side channels, whether the malicious pages got deduplicated with others in the system, implicitly leaking the contents of memory the attacker does not have access to. However, these attacks require crafting an exact replica of the victim's page in order to initiate deduplication. Effort-wise, they thus have a complexity of O(2n), which makes them infeasible for leaking data in high-entropy scenarios, such as when brute-forcing cryptographic keys. In this paper, we present LeakyTree, a novel side-channel attack on the Linux Kernel Samepage Merging (KSM) memory-deduplication mechanism that exploits cache-observable traversals of KSM's stable tree. LeakyTree reduces the overall leakage complexity from O(2n) to O(n), enabling efficient bit-by-bit information leakage from a victim page regardless of its entropy. The attack proceeds in three stages: first, it massages internal KSM data structures (i.e., red-black trees) by forcing the deduplication of attacker-controlled pages; second, it exploits tree-ordering properties, combined with a CPU cache side channel, to infer layout information crucial to the attack; third, it uses KSM's page comparison process during tree traversal to leak bit by bit from victim memory pages. We demonstrate LeakyTree's efficacy by leaking secret data cross-process and cross-VM from KSM-deduplicated pages on Linux kernel versions 5.15 to 6.18. In particular, we show that LeakyTree can leak high-entropy pages, such as ECC and RSA private keys as well as API tokens, at rates of up to 30 bits per second. For realistic key sizes, the extraction time is within minutes, which has been infeasible in this scenario with prior deduplication attacks.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

its abstract · related work

Get the answer

Free to start. No credit card required.

Related papers

  1. DUPEFS: Leaking Data Over the Network With Filesystem Deduplication Side ChannelsAndrei Bacs, Saidgani Musaev, Kaveh Razavi, Cristiano Giuffrida et al.FAST 2022 · 12 citations
  2. Remote Memory-Deduplication AttacksMartin Schwarzl, Erik Kraft, Moritz Lipp, Daniel GrussNDSS 2022
  3. Dedup Est Machina: Memory Deduplication as an Advanced Exploitation VectorErik Bosman, Kaveh Razavi, Herbert Bos, Cristiano GiuffridaS&P 2016 · 252 citations
  4. Lord of the Ring(s): Side Channel Attacks on the CPU On-Chip Ring Interconnect Are PracticalRiccardo Paccagnella, Licheng Luo, Christopher W. FletcherUSENIX Security 2021 · 121 citations
  5. Para-ksm: Parallelized Memory Deduplication with Data Streaming AcceleratorHouxiang Ji, Minho Kim, Seonmu Oh, Daehoon Kim et al.USENIX ATC 2025 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines