[
  {
    "id": "p01-01",
    "page": 1,
    "en": "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𝑂( 2𝑛), which makes them infeasible for leaking data in high-entropy scenarios, such as when brute-forcing cryptographic keys.",
    "zh": "## 摘要\n现代系统中的内存页面去重已被证明会引入侧信道泄露。攻击者可以恶意构造页面，并通过 CPU 缓存侧信道探测这些页面是否与系统中的其他页面发生去重，从而间接泄露自己无权访问的内存内容。然而，这类攻击必须先构造出受害者页面的精确副本，才能触发去重。因此，所需工作量的复杂度为 O(2ⁿ)，使其难以用于高熵数据的泄露，例如暴力破解密码学密钥。",
    "type": "text"
  },
  {
    "id": "p01-02",
    "page": 1,
    "en": "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 𝑂( 2𝑛) to𝑂(𝑛) , 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 highentropy 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.",
    "zh": "本文提出 LeakyTree：一种针对 Linux 内核同页合并（Kernel Samepage Merging，KSM）内存去重机制的新型侧信道攻击。它利用 KSM 稳定树的遍历能够被缓存观测这一特点，把整体泄露复杂度从 O(2ⁿ) 降至 O(n)，从而不论受害者页面的熵高低，都能高效地逐位泄露其中的信息。\n攻击分为三个阶段：首先，迫使攻击者控制的页面发生去重，以整理 KSM 内部的数据结构（即红黑树）；其次，把树的排序性质与 CPU 缓存侧信道结合，推断攻击所需的关键布局信息；最后，利用树遍历中的页面比较过程，逐位泄露受害者内存页。\n我们在 Linux 5.15 至 6.18 内核上，从经过 KSM 去重的页面中跨进程、跨虚拟机泄露秘密数据，验证了 LeakyTree 的有效性。特别是，LeakyTree 能够以最高约每秒 30 位的速率泄露 ECC、RSA 私钥及 API 令牌等高熵页面。对于实际使用的密钥长度，提取可在数分钟内完成；此前的去重攻击无法在这种场景下做到这一点。",
    "type": "text"
  },
  {
    "id": "p01-03",
    "page": 1,
    "en": "CCS Concepts •Security and privacy→Operating systems security. This work is licensed under a Creative Commons Attribution 4.0 International License. CCS ’26, The Hague, Netherlands ©2026 Copyright held by the owner/author(s). ACM ISBN 979-8-4007-2871-6/2026/11 https://doi.org/10.1145/3830454.3846575",
    "zh": "### CCS 分类与出版许可\n安全与隐私 → 操作系统安全。\n本作品采用知识共享署名 4.0 国际许可协议（CC BY 4.0）。CCS ’26，荷兰海牙。© 2026，版权由所有者／作者持有。ACM ISBN：979-8-4007-2871-6/2026/11。DOI：10.1145/3830454.3846575。",
    "type": "text"
  },
  {
    "id": "p01-04",
    "page": 1,
    "en": "Keywords Linux Kernel, Memory Deduplication, KSM",
    "zh": "### 关键词\nLinux 内核、内存去重、KSM。",
    "type": "text"
  },
  {
    "id": "p01-05",
    "page": 1,
    "en": "ACM Reference Format: Ernesto Martínez García, Lukas Maar, Martin Unterguggenberger, Mathias Oberhuber, and Stefan Mangard. 2026. LeakyTree: Cross-VM Bit-by-Bit Deduplicated Page Leakage via Linux Kernel Samepage Merging Internals . InProceedings of the 2026 ACM SIGSAC Conference on Computer and Communications Security (CCS ’26), November 15–19, 2026, The Hague, Netherlands. ACM, New York, NY, USA, 14 pages. https://doi.org/10.1145/3830454.3846575",
    "zh": "### ACM 引用格式\nErnesto Martínez García、Lukas Maar、Martin Unterguggenberger、Mathias Oberhuber、Stefan Mangard，2026：《LeakyTree：利用 Linux 内核同页合并内部机制，跨虚拟机逐位泄露已去重页面》。载于《2026 ACM SIGSAC 计算机与通信安全会议论文集》（CCS ’26），2026 年 11 月 15—19 日，荷兰海牙。ACM，美国纽约，14 页。DOI：10.1145/3830454.3846575。",
    "type": "text"
  },
  {
    "id": "p01-06",
    "page": 1,
    "en": "1 Introduction Modern operating systems increasingly employ resource overcommitment mechanisms to improve utilization and efficiency. Techniques such as swapping, filesystem compression, and Copy-on- Write (CoW) provide applications with the abstraction of larger available physical resources. Among these, transparent memory deduplication techniques scan system memory for identical pages across processes and merge them into a single shared physical frame. This page-sharing typically marks the merged pages as read-only, triggering CoW on memory writes. The Linux kernel implements this functionality through the Kernel Samepage Merging (KSM) [2, 23, 55] mechanism since Linux v2.6 [40] through the madvise andprctl system call. Modern open-source virtualization platforms, such as Proxmox VE, make use of KSM transparently by default.",
    "zh": "## 1 引言\n现代操作系统越来越多地采用资源超量承诺机制，以提高资源利用率和效率。交换、文件系统压缩、写时复制（Copy-on-Write，CoW）等技术，使应用看到的可用物理资源似乎比实际更多。其中，透明内存去重技术扫描系统内存，寻找不同进程中内容完全相同的页面，并把它们合并为一个共享物理页框。这种页面共享通常将合并后的页面标记为只读，在写入时触发 CoW。Linux 从 v2.6 起通过内核同页合并机制 KSM [2, 23, 55] 实现这一功能 [40]，并提供 madvise 和 prctl 系统调用接口。Proxmox VE 等现代开源虚拟化平台默认透明地使用 KSM。",
    "type": "text"
  },
  {
    "id": "p01-07",
    "page": 1,
    "en": "From the user’s perspective, KSM is transparent; that is, applications behave as if they still own private pages, while the system reclaims redundant memory in the background. However, the kernel is a shared resource, and prior research has demonstrated attacks on transparent memory deduplication. The traditional side channel on KSM [35, 61] works as follows: the adversary creates a payload to guess memory content and marks it eligible for memory deduplication. The side channel is based on observing whether a subsequent write causes CoW, as indicated by the slower timing behavior of merged pages. Thereby, an adversary can learn sensitive data from the victim’s process memory.",
    "zh": "从用户角度看，KSM 是透明的：应用的行为仍然像拥有私有页面一样，而系统在后台回收重复内存。但是，内核是一种共享资源；已有研究展示了针对透明内存去重的攻击。传统 KSM 侧信道 [35, 61] 的过程如下：攻击者构造一个载荷来猜测内存内容，并将其标记为可进行内存去重。随后观察写入是否引发 CoW；已合并页面的写入耗时较长，由此暴露侧信道。这样，攻击者就能获知受害者进程内存中的敏感数据。",
    "type": "text"
  },
  {
    "id": "p01-08",
    "page": 1,
    "en": "This concept has been extended to cross-VM covert channels [29] and cross-VM fingerprinting attacks [26, 44], because these systems still share the same host kernel. Two works are particularly relevant here. Bosman et al. [5] and, subsequently, Schwarzl et al. [56]",
    "zh": "由于不同虚拟机仍共享同一个宿主内核，这一思路也被扩展为跨虚拟机隐蔽信道 [29] 和跨虚拟机指纹识别攻击 [26, 44]。这里尤其相关的是两项工作：Bosman 等人 [5]，以及随后 Schwarzl 等人 [56] 的研究——（下页续）。",
    "type": "text"
  },
  {
    "id": "p02-01",
    "page": 2,
    "en": "showed that an attacker can leak data byte by byte when having strong control over the alignment and padding of victim data. Bosman et al. [5] demonstrated Address Space Layout Randomization (ASLR) and password leakage in settings where such control is available, e.g., in JavaScript and nginx-based server scenarios. Schwarzl et al. [56] extended this approach to remote leakage of database records and Kernel ASLR (KASLR) [ 12] within VMs by exploiting a similar control primitive in database systems such as InnoDB. However, because these attacks depend on such a strong alignment and padding primitive on the victim side, their applicability to leaking high-entropy data, such as cryptographic key material, remains limited to such controlled scenarios.",
    "zh": "他们表明，当攻击者能够强力控制受害者数据的对齐与填充时，可以逐字节泄露数据。Bosman 等人 [5] 在具备这种控制能力的环境中，例如 JavaScript 和基于 nginx 的服务器场景，展示了地址空间布局随机化（ASLR）信息与密码的泄露。Schwarzl 等人 [56] 利用 InnoDB 等数据库系统中类似的控制原语，把这种方法扩展到远程泄露数据库记录，以及虚拟机内部的内核 ASLR（KASLR）[12]。然而，这些攻击依赖在受害者一侧强力控制对齐与填充，因此，泄露密码学密钥材料等高熵数据的适用范围仍受限于这类可控场景。",
    "type": "text"
  },
  {
    "id": "p02-02",
    "page": 2,
    "en": "All these prior KSM side channels reveal only whether an identical page already exists in the victim’s memory. For high-entropy targets such as cryptographic keys, this severely limits the attacker’s capabilities, as the attacker must guess theexact pagecontents to trigger deduplication. Since secret keys consist of random bits, constructing such an exact matching page is infeasible in practice without this strong alignment and padding primitive. Recovering an𝑛-bit secret therefore requires exhaustive search over a space of a time complexity𝑂(2 𝑛), where𝑛is the page size in bits.",
    "zh": "此前所有这些 KSM 侧信道只会揭示：受害者内存中是否已经存在一张完全相同的页面。对于密码学密钥等高熵目标，这严重限制了攻击者能力，因为必须猜中整页的精确内容才能触发去重。秘密密钥由随机位组成；如果没有上述强力对齐与填充原语，实践中不可能构造出完全匹配的页面。因此，恢复 n 位秘密需要穷举，时间复杂度为 O(2ⁿ)，其中 n 表示页面的位数。",
    "type": "text"
  },
  {
    "id": "p02-03",
    "page": 2,
    "en": "In this paper, we present LeakyTree, a novel exploitation technique that enables bit-by-bit leakage from deduplicated pages by leveraging Linux KSM internals. LeakyTree does not require this control over victim-memory alignment or padding. It reduces the leakage complexity from 𝑂( 2𝑛) to𝑂(𝑛) for an 𝑛-bit target, and allows leakage in cross-process and cross-VM settings. The key idea is to shift from a page equality oracle to a content-dependent greater-or-lesser traversal oracle inside KSM’s stable tree, aredblack tree[4, 6, 38] that tracks already deduplicated user pages.",
    "zh": "本文提出 LeakyTree：一种利用 Linux KSM 内部机制，逐位泄露已去重页面的新型利用技术。LeakyTree 无须控制受害者内存的对齐或填充。对于 n 位目标，它把泄露复杂度从 O(2ⁿ) 降到 O(n)，并支持跨进程和跨虚拟机场景。核心思路是：把“页面相等判定器”变成 KSM 稳定树中依赖内容的“大于／小于遍历判定器”。稳定树是一棵红黑树 [4, 6, 38]，用来记录已经去重的用户页面。",
    "type": "text"
  },
  {
    "id": "p02-04",
    "page": 2,
    "en": "At its core, LeakyTree relies on four observations: (1) KSM’s stable-tree ordering is keyed by sensitive page contents (i.e., deduplicated user pages), (2) KSM traversal operations induce cache traces that depend on those contents, (3) these traces can be correlated with sensitive content, and (4) by strategically triggering unprivileged KSM operations, an attacker can leak the contents of deduplicated victim pages.",
    "zh": "LeakyTree 的核心基于四个观察：（1）KSM 稳定树以敏感页面内容，即已去重的用户页，作为排序键；（2）KSM 遍历会产生依赖这些内容的缓存痕迹；（3）这些痕迹可以与敏感内容关联；（4）攻击者通过有策略地触发无特权 KSM 操作，可以泄露已去重受害者页的内容。",
    "type": "text"
  },
  {
    "id": "p02-05",
    "page": 2,
    "en": "With these observations, LeakyTree proceeds in three stages. First, we shape the layout of KSM’s stable tree around the victim page. We do so by forcing deduplication of attacker-controlled pages through user-space operations, which insert corresponding nodes into the tree. These pages approximate lower and upper bounds of plausible victim-page contents. Hence, they are placed in the victim node’s left and right subtrees and moved closer to the victim node through iterative red-black-tree rebalancing. Second, we infer the layout information of the red-black stable tree using a CPU cache side channel, such as Flush+Reload [69] or Flush+Flush [18]. From the inserted attacker-controlled pages, we select suitable deterministic nodes as traversal oracles. The observed cache activity determines whether the left or right subtree is accessed to traverse the stable tree, including the victim node. Third, we exploit KSM’s comparison operations and tree-ordering properties to leak victimpage contents bit by bit. We craft and measure candidate queries that force a lookup directly through the victim node. By observing which oracle is accessed, we determine whether the queried value is smaller or larger than the victim value bit by bit.",
    "zh": "基于这些观察，LeakyTree 分三阶段执行。首先，塑造受害者页周围的 KSM 稳定树布局。具体做法是通过用户态操作，迫使攻击者控制的页面去重，在树中插入对应节点。这些页面逼近受害者页可能内容的上下界，因此会落入受害者节点的左右子树；反复触发红黑树重平衡，又会使它们逐渐接近受害者节点。\n其次，利用 Flush+Reload [69] 或 Flush+Flush [18] 等 CPU 缓存侧信道，推断红黑稳定树的布局信息。从插入的攻击者页面中，选择行为确定且合适的节点作为遍历判定器。观察缓存活动，就能判断包含受害者节点的稳定树遍历访问了左子树还是右子树。\n第三，利用 KSM 比较操作与树的排序性质，逐位泄露受害者页面内容。我们构造并测量候选查询，使查找路径直接经过受害者节点。通过观察哪个判定器被访问，逐步确定查询值比受害者值更小还是更大。",
    "type": "text"
  },
  {
    "id": "p02-06",
    "page": 2,
    "en": "To show the practicality and applicability, we provide a detailed attack evaluation and analysis. We further demonstrate end-to-end leakage of cryptographic key material across process-isolation and VM-isolation boundaries. Our attack is applicable to perform hostto-host, guest-to-guest, and guest-to-host leakage. In particular, we are able to leak high-entropy pages bit-by-bit, e.g., ECC and RSA private keys as well as API tokens, with a throughput of up to 30 bits per second. Additionally, we demonstrate that our attack works for KSM-deduplicated pages on systems with both synthetic (i.e., stress-ng) and realistic noise (i.e., Phoronix Test Suite [ 48]) as well as on Linux kernel versions 5.15 to 6.18.",
    "zh": "为展示实用性和适用性，我们给出详细的攻击评估与分析，并演示跨越进程隔离和虚拟机隔离边界，端到端泄露密码学密钥材料。攻击可用于主机侧到主机侧、来宾到来宾以及来宾到宿主的泄露。尤其是，我们可以最高约每秒 30 位的吞吐率，逐位泄露 ECC、RSA 私钥以及 API 令牌等高熵页面。此外，攻击在存在合成噪声（stress-ng）和真实工作负载噪声（Phoronix Test Suite [48]）的系统上仍然有效，并覆盖 Linux 5.15 至 6.18 内核。",
    "type": "text"
  },
  {
    "id": "p02-07",
    "page": 2,
    "en": "Contributions.The main contributions of this work are: (1) KSM Primitives & Synchronization:We introduce primitives that enable unprivileged control over KSM’s data structures and synchronization with its scanning behavior. These primitives allow precise interaction with KSM internals, forming the basis for our leakage attack. (2) A Novel KSM Leakage Attack:Using our massaging and layout leakage primitives, we present a novel attack capable of leaking KSM deduplicated pages bit by bit in𝑂(𝑛) , where previous attacks on similar conditions required an infeasible complexity of𝑂( 2𝑛) or specific victim memory alignment properties. (3) Evaluation and End-to-End Case Studies:We evaluate our attack on an up-to-date Ubuntu 24.04 machine, where we successfully leaked high-entropy deduplicated pages at rates of up to 30 bits per second. We evaluate our attack within synthetic and a realistic victim scenarios, analyzing the behavior under different KSM workloads and settings.",
    "zh": "### 贡献\n本工作的主要贡献如下。\n（1）KSM 原语与同步：提出能够以无特权方式影响 KSM 数据结构，并与其扫描行为同步的原语。它们支持与 KSM 内部机制精确交互，构成泄露攻击的基础。\n（2）新型 KSM 泄露攻击：结合树整理与布局泄露原语，提出能够以 O(n) 复杂度逐位泄露 KSM 已去重页面的攻击。此前在类似条件下，攻击要么需要不可行的 O(2ⁿ) 复杂度，要么要求受害者内存具有特殊对齐性质。\n（3）评估与端到端案例：在当时最新的 Ubuntu 24.04 机器上评估攻击，成功以最高约每秒 30 位泄露高熵已去重页面。我们分别在合成和真实受害者场景下进行评估，分析不同 KSM 负载与设置下的行为。",
    "type": "text"
  },
  {
    "id": "p02-08",
    "page": 2,
    "en": "Outline.Section 2 provides the background. Section 3 gives a high-level overview of the attack. Section 4 presents our new attack, LeakyTree. Section 5 evaluates the attack, and Section 6 presents two case studies in end-to-end attack scenarios. Section 7 discusses the results, and Section 8 concludes the work.",
    "zh": "### 文章结构\n第 2 节介绍背景；第 3 节概述攻击；第 4 节详细提出 LeakyTree；第 5 节评估攻击；第 6 节给出两个端到端案例研究；第 7 节讨论结果；第 8 节总结全文。",
    "type": "text"
  },
  {
    "id": "p02-09",
    "page": 2,
    "en": "Responsible Disclosure.We disclosed LeakyTree to the Linux Kernel Security Team, the Proxmox Security Team, and Andrea Arcangeli. We evaluated downstream mitigation patches from Andrea Arcangeli and planned a Proxmox VE security advisory.",
    "zh": "### 负责任披露\n我们已向 Linux 内核安全团队、Proxmox 安全团队和 Andrea Arcangeli 披露 LeakyTree。我们评估了 Andrea Arcangeli 提供的下游缓解补丁，并计划发布 Proxmox VE 安全公告。",
    "type": "text"
  },
  {
    "id": "p02-10",
    "page": 2,
    "en": "2 Background This section provides the background on memory deduplication, red-black trees, Linux Kernel Samepage Merging (KSM), and CPU caches.",
    "zh": "## 2 背景\n本节介绍内存去重、红黑树、Linux 内核同页合并（KSM）以及 CPU 缓存的背景知识。",
    "type": "text"
  },
  {
    "id": "p02-11",
    "page": 2,
    "en": "2.1 Memory Deduplication Memory is a crucial resource in modern computer systems. As users require increasingly more complex tasks to run, memory consumption scales accordingly. Memory is a physical hard limit, as a system cannot use more memory than is equipped. Depending on the required resources, it might be unfeasible to scale. Operating systems implement different techniques to reduce the memory footprint of workloads running on the system. For example, techniques such as Copy On Write (CoW) deduplicate memory when a process forks, as both processes share the memory transparently with a shallow copy until a write to it triggers a deep copy [56].",
    "zh": "### 2.1 内存去重\n内存是现代计算机系统中的关键资源。用户需要执行的任务越来越复杂，内存消耗也随之增长。内存构成物理上的硬限制：系统不能使用超过实际配备容量的内存。根据所需资源的不同，扩容可能并不可行。操作系统实现了多种技术，以减少系统上工作负载的内存占用。例如，写时复制（CoW）会在进程 fork 时消除重复内存：两个进程通过浅拷贝透明地共享内存，直到一次写入触发深拷贝 [56]。",
    "type": "text"
  },
  {
    "id": "p03-01",
    "page": 3,
    "en": "Memory deduplication is another approach to reduce the memory footprint. At its core, the operating system scans the entire memory of the system, deduplicating identical chunks into a single one and marking it as CoW. When needed, the operating system reverses the process by duplicating the memory transparently. Multiple operating systems [23, 71] and hypervisors [46, 55, 57] implemented transparent content-based memory deduplication: Linux KSM [2, 23, 55], Windows Memory Combining [71], and VMware ESXi Transparent Page Sharing (TPS).",
    "zh": "内存去重是另一种降低内存占用的方法。其核心是由操作系统扫描系统全部内存，把相同内容的块合并成一个，并标记为 CoW。在需要时，操作系统通过透明地复制内存逆转这一过程。多种操作系统 [23, 71] 和虚拟机监控器 [46, 55, 57] 实现了透明的基于内容的内存去重，例如 Linux KSM [2, 23, 55]、Windows Memory Combining，以及 VMware ESXi Transparent Page Sharing（TPS）。",
    "type": "text"
  },
  {
    "id": "p03-02",
    "page": 3,
    "en": "2.2 Red-Black Trees A red-black tree is a self-balancingbinary search treethat guarantees logarithmic time complexity for queries, insertions, and deletions [4, 6, 38], with a maximum height of2 log2(𝑛+ 1)[8]. Compared to other binary search trees, red-black trees include a color field for nodes—red or black—, and establish a set of properties that the tree must follow. Basic operations are carried out the same way as in standard binary search trees, with the exception that the properties of the red-black tree are verified afterwards. In case an operation causes a violation of the properties, the tree applies self-balancing techniques to restore them.",
    "zh": "### 2.2 红黑树\n红黑树是一种自平衡二叉搜索树，保证查询、插入和删除具有对数时间复杂度 [4, 6, 38]，最大高度为 2 log₂(n + 1) [8]。与其他二叉搜索树相比，红黑树为节点增加红／黑颜色字段，并规定树必须遵循的一组性质。基本操作与普通二叉搜索树相同，只是在操作后还要检查红黑树性质。若某次操作违反这些性质，树就利用自平衡技术恢复它们。",
    "type": "text"
  },
  {
    "id": "p03-03",
    "page": 3,
    "en": "Red-black trees must always satisfy the following properties: (1) every node is either red or black, (2) the root node is always black, (3) allnilleaves are black, (4) no red node can have a red child, (5) for each node, all simple paths from the node to the descendant leaves must contain the same number of black nodes [8].",
    "zh": "红黑树必须始终满足：（1）每个节点不是红色就是黑色；（2）根节点始终为黑色；（3）所有 nil 叶节点均为黑色；（4）红节点不能有红色子节点；（5）对任意节点，从它到各后代叶节点的所有简单路径都必须包含相同数量的黑色节点 [8]。",
    "type": "text"
  },
  {
    "id": "p03-04",
    "page": 3,
    "en": "To preserve red-black tree properties, the tree utilizes two operations: rotations and recoloring. Rotations are operations on nodes that cause changes to the layout of the tree; there are two types of rotations:right-rotateandleft-rotate. Another complementary operation, recoloring, is used to change the color property of nodes.",
    "zh": "为保持这些性质，红黑树使用两种操作：旋转与重新着色。旋转作用于节点并改变树的布局，分为右旋和左旋。另一种配套操作是重新着色，用来改变节点的颜色属性。",
    "type": "text"
  },
  {
    "id": "p03-05",
    "page": 3,
    "en": "2.3 Kernel Samepage Merging KSM is the Linux transparent page deduplication mechanism, introduced in Linuxv2.6.32 [40] and bundled in common distributions, such as Ubuntu 24.04 and Fedora 43 [42]. Kernels with KSM support spawn a kernel thread namedksmd, which scans memory regions that were marked for deduplication. It iterates over processes, then over their Virtual Memory Area (VMA)s, and finally over pages within each VMA in increasing address order. During this scan, KSM skips pages that are not eligible for deduplication. To keep track of processed and deduplicated pages, KSM maintains two red-black trees ordered by memcmp: thestable treeandunstable tree.",
    "zh": "### 2.3 内核同页合并\nKSM 是 Linux 的透明页面去重机制，于 Linux v2.6.32 引入 [40]，并随 Ubuntu 24.04、Fedora 43 等常见发行版提供 [42]。支持 KSM 的内核会启动名为 ksmd 的内核线程，扫描被标记为可去重的内存区域。它先遍历进程，再遍历各进程的虚拟内存区域（VMA），最后按地址递增顺序遍历每个 VMA 中的页面。扫描时，KSM 跳过不符合去重条件的页面。为跟踪已处理和已去重页面，KSM 维护两棵按 memcmp 排序的红黑树：稳定树与不稳定树。",
    "type": "text"
  },
  {
    "id": "p03-06",
    "page": 3,
    "en": "The KSMstable treeis a red-black tree whose nodes represent pages that have been deduplicated and are managed by KSM. KSM enforces that the pages stored in this stable tree are read-only at the OS level, utilizing special page fault routines to capture user writes and revert the deduplication on the written page. Each node represents one physically-backed KSM page that can have multiple references—from different deduplications—up to a configurable upper limit, in which case a linked list of page nodes is created.",
    "zh": "KSM 稳定树的节点代表已去重、由 KSM 管理的页面。KSM 在操作系统层面强制这些页面只读，通过专门的缺页处理例程捕获用户写入，并撤销被写页面的去重。每个节点代表一个有物理内存支撑的 KSM 页；该页可以因不同的去重操作拥有多个引用，直到达到可配置的上限，此时会创建页面节点链表。",
    "type": "text"
  },
  {
    "id": "p03-07",
    "page": 3,
    "en": "The KSMunstable treeis a red-black tree keeping processed pages for which no duplicate has yet been found. Unlike the stable tree, its nodes refer to user-controlled pages rather than KSM-managed deduplicated pages. Because these pages may change under normal user writes, the tree ordering is not guaranteed to remain valid. Hence, when KSM finishes a full scan of the system, this tree is discarded as a best-effort to tackle tree corruptions caused by users.",
    "zh": "KSM 不稳定树保存已处理但尚未找到副本的页面。与稳定树不同，它的节点引用用户控制的页，而不是 KSM 管理的已去重页。由于用户正常写入就可能改变这些页面，树的排序并不保证一直有效。因此，KSM 每完成一次全系统扫描，就丢弃这棵树，尽力应对用户修改造成的树结构失序。",
    "type": "text"
  },
  {
    "id": "p03-08",
    "page": 3,
    "en": "KSM processes each opted-in page for deduplication in turn. First, it queries the stable tree to locate an already deduplicated page. If a match is found, the queried page is deduplicated with the KSM page from the stable tree, discarding the processed page. Otherwise, KSM calculates a non-cryptographic hash (i.e., xxHash) of the page and compares it against the previously stored value as a heuristic to avoid processing rapidly changing pages. Third, KSM queries the unstable tree. If a matching page is found there, the pages are deduplicated and the processed page is promoted into the stable tree. Otherwise, the page is inserted into the unstable tree.",
    "zh": "KSM 依次处理每张主动加入去重的页面。首先查询稳定树，寻找已去重页面。若找到匹配，便把查询页与稳定树中的 KSM 页合并，丢弃被处理页原来的副本。否则，KSM 计算该页的非密码学哈希值（xxHash），与此前保存的值比较，作为避免处理快速变化页面的启发式检查。第三，查询不稳定树；若找到匹配页，就合并这两个页面，并把处理页提升至稳定树。若仍未匹配，则将该页插入不稳定树。",
    "type": "text"
  },
  {
    "id": "p03-09",
    "page": 3,
    "en": "Once a page has been deduplicated, the resulting shared KSM page is marked read-only. A later write triggers a write-protection fault, causing the page to be duplicated again through CoW. The write is then applied to the newly created private copy.",
    "zh": "页面去重后，得到的共享 KSM 页被标记为只读。之后的写入触发写保护异常，通过 CoW 再次复制页面。写操作随后应用于新建的私有副本。",
    "type": "text"
  },
  {
    "id": "p03-10",
    "page": 3,
    "en": "KSM’s scans operate in configurable bursts: pages_to_scan determines how many pagesksmd processes per pass, after which the process is put to sleep forsleep_millisecsmilliseconds.",
    "zh": "KSM 采用可配置的分批扫描：pages_to_scan 决定 ksmd 每批处理多少页；之后线程休眠 sleep_millisecs 毫秒。",
    "type": "text"
  },
  {
    "id": "p03-11",
    "page": 3,
    "en": "Deployment.Despite the security concerns raised by prior memorydeduplication attacks [ 3, 5, 16, 29, 56], KSM remains deployed in production-oriented environments. Proxmox Virtual Environment (Proxmox VE), with over two million hosts globally [50] in mission-critical environments [49], enables and utilizes KSM by default through theksmtuned service and marks QEMU guest memory as mergeable. KSM has also been used to mitigate memory pressure in large-scale application deployments, such as Instagram workloads at Meta [ 58]. Moreover, continued upstream development from corporations and developers indicates that KSM remains an actively maintained and relevant subsystem.",
    "zh": "### 部署情况\n尽管此前的内存去重攻击已引起安全担忧 [3, 5, 16, 29, 56]，KSM 仍用于面向生产的环境。Proxmox Virtual Environment（Proxmox VE）在全球拥有超过两百万台主机 [50]，用于关键任务环境 [49]；它通过 ksmtuned 服务默认启用 KSM，并将 QEMU 来宾内存标记为可合并。KSM 还用于缓解大规模应用部署的内存压力，例如 Meta 的 Instagram 工作负载 [58]。企业和开发者持续进行上游开发，也表明 KSM 仍是一个受到积极维护的重要子系统。",
    "type": "text"
  },
  {
    "id": "p03-12",
    "page": 3,
    "en": "2.4 CPU Caches CPU caches are hardware structures (constructed from a fast memory technology like SRAM [36]) that temporarily store copies of frequently used data between the processor and the main memory (i.e., the DRAM [20]) to improve system performance [20, 47]. Cache access either results in a cache hit, i.e., when the requested data is found in cache memory, or a cache miss, i.e., when the data does not reside within the cache and must be fetched from main memory. Therefore, caches exploit the principle of locality [9, 10], that is, computer programs have the tendency to repeatedly access the same set of memory resources.",
    "zh": "### 2.4 CPU 缓存\nCPU 缓存是由 SRAM 等快速存储技术 [36] 构成的硬件结构，在处理器和主存（即 DRAM [20]）之间临时保存经常使用的数据副本，以提升系统性能 [20, 47]。访问缓存可能命中，即请求的数据已在缓存中；也可能未命中，即数据不在缓存中，必须从主存取回。因此，缓存利用了局部性原理 [9, 10]：计算机程序倾向于反复访问同一组内存资源。",
    "type": "text"
  },
  {
    "id": "p03-13",
    "page": 3,
    "en": "The system’s memory subsystem connects the CPU and memory components via a hierarchical structure, i.e., multiple levels of cache memory [11, 13]. In particular, the memory subsystem typically consists of a private L1 (instruction and data) cache and L2 cache, alongside a shared L3 cache serving as Last-Level Cache (LLC) [60], while maintaining cache coherence across multiple cores [39]. Modern processors commonly use a set-associative cache architecture, where the L1 data cache is typically Virtually-Indexed and Physically-Tagged (VIPT), allowing a parallel indexing of the L1 cache lookup [27, 31, 72]. Additionally, the L2 and L3 cache is often Physically-Indexed and Physically-Tagged (PIPT) [34, 66].",
    "zh": "系统内存子系统通过分层结构，即多级缓存 [11, 13]，连接 CPU 和内存组件。具体来说，典型结构包括私有的 L1 指令／数据缓存和 L2 缓存，以及共享的 L3 缓存，后者作为末级缓存（LLC）[60]；同时维持多核之间的缓存一致性 [39]。现代处理器通常采用组相联缓存。L1 数据缓存一般采用虚拟索引、物理标记（VIPT），允许 L1 查询的索引过程并行进行 [27, 31, 72]。L2 和 L3 则通常采用物理索引、物理标记（PIPT）[34, 66]。",
    "type": "text"
  },
  {
    "id": "p04-01",
    "page": 4,
    "en": "Kernel Userspace Hardware Software Attacker Victim Userspace KSM Stable Tree Load Hit Miss Hardware Cache ①Interact ②Traces ③Side channel ④Leak Figure 1: Interaction between unprivileged attacker code, privileged KSM operations, and hardware-cache observations in LeakyTree.",
    "zh": "### 图 1：LeakyTree 的软件与硬件交互\n无特权攻击者代码、有特权 KSM 操作以及硬件缓存观测之间的交互。\n图内标签：Kernel＝内核；Userspace＝用户空间；Hardware／Software＝硬件／软件；Attacker／Victim＝攻击者／受害者；KSM Stable Tree＝KSM 稳定树；Load＝加载；Hit／Miss＝命中／未命中；Hardware Cache＝硬件缓存；① Interact＝交互；② Traces＝留下痕迹；③ Side channel＝侧信道；④ Leak＝泄露。",
    "type": "visual"
  },
  {
    "id": "p04-02",
    "page": 4,
    "en": "3 High-Level Overview This section provides a high-level overview of LeakyTree. LeakyTree makes memory-deduplication attacks practical for high-entropy pages by exploiting observable software internals of Linux KSM. In contrast, prior attacks primarily relied on CoW behavior and required brute-force page matching for high-entropy leakage.",
    "zh": "## 3 高层概览\n本节概述 LeakyTree。它利用 Linux KSM 软件内部机制可被观测的特性，使针对高熵页面的内存去重攻击变得可行。相比之下，既有攻击主要依赖 CoW 行为，对高熵内容必须暴力匹配整页。",
    "type": "text"
  },
  {
    "id": "p04-03",
    "page": 4,
    "en": "Figure 1 highlights how LeakyTree combines software behavior in KSM with hardware-cache observations: ① the attacker triggers KSM operations from user space using crafted pages marked for deduplication; ② KSM performs content-dependent stable-tree traversals over deduplicated pages (i.e., sensitive user data), leaving hardware-cache traces;③ the attacker observes these traces through a hardware-cache side channel and correlates them with traversal decisions; and ④ by repeating this process with specifically crafted KSM operations, the attacker leaks the contents of deduplicated victim pages. By combining these observations, LeakyTree recovers deduplicated page contentsbit by bitwith complexity 𝑂(𝑛) across multiple attack scenarios. This substantially improves practicality over prior work, which either required𝑂( 2𝑛) effort (i.e., impractical for large high-entropy pages) or requires a strong alignment and padding primitive for victim memory.",
    "zh": "图 1 展示了 LeakyTree 如何结合 KSM 软件行为和硬件缓存观测：① 攻击者在用户态用精心构造并标记为可去重的页面触发 KSM 操作；② KSM 对已去重页面，即敏感用户数据，执行依赖内容的稳定树遍历，留下硬件缓存痕迹；③ 攻击者经由硬件缓存侧信道观测痕迹，并把它们与遍历决策相关联；④ 重复执行特定构造的 KSM 操作，从而泄露已去重受害者页的内容。\n结合这些观察，LeakyTree 能在多种攻击场景中，以 O(n) 复杂度逐位恢复已去重页面内容。这显著提高了实用性：此前方法要么需要 O(2ⁿ) 工作量，对较大的高熵页面并不可行；要么要求对受害者内存具备强力的对齐与填充原语。",
    "type": "text"
  },
  {
    "id": "p04-04",
    "page": 4,
    "en": "The following part first introduces the key KSM primitives used by LeakyTree (see Section 3.1) and then presents an overview of LeakyTree’s multi-stage attack (see Section 3.2).",
    "zh": "下面先介绍 LeakyTree 所需的关键 KSM 原语（第 3.1 节），随后概述其多阶段攻击（第 3.2 节）。",
    "type": "text"
  },
  {
    "id": "p04-05",
    "page": 4,
    "en": "3.1 Attack Primitives LeakyTree relies on three essential attack primitives that are used to carry out the attack. The primitives operate on KSM tree nodes, which represent memory pages of the system. (P1) Insertion.This primitive inserts a new node into the KSM stable tree, which is a KSM-managed red-black tree and tracks already deduplicated pages. To achieve this, the attacker obtains two memory pages and initializes them with the same random contents. The contents are chosen such that no other page in the system is likely to contain the same data, for example, by using randomized values on the least significant byte (LSB) of the page. The attacker also marks both memory pages as candidates for KSM deduplication. As a result, KSM will process both pages and merge them into a single shared physical page, inserting a corresponding node into the stable tree representing the deduplicated page.",
    "zh": "### 3.1 攻击原语\nLeakyTree 依赖三个关键原语完成攻击。这些原语操作 KSM 树节点，而节点代表系统中的内存页。\n（P1）插入：向 KSM 稳定树插入一个新节点。稳定树是一棵由 KSM 管理、记录已去重页面的红黑树。攻击者先取得两张内存页，用相同的随机内容初始化它们。这些内容要使系统中的其他页面不太可能相同，例如随机化页面最低有效字节（LSB）。再将两页标记为 KSM 去重候选。KSM 因而处理这两页，把它们合并为一个共享物理页，并在稳定树中插入代表该去重页的节点。",
    "type": "text"
  },
  {
    "id": "p04-06",
    "page": 4,
    "en": "(P2) Query.This primitive queries the KSM stable tree for a node. To achieve this, the attacker obtains one memory page and initializes it with the contents to be queried in the tree. It is important that the queried content does not fully match an already existing page in the system, e.g., by randomizing the LSB of the page. During a subsequent scan, KSM processes the page and attempts to locate a matching entry in the stable tree via a tree lookup. As no matching node is found, KSM will continue performing the lookup during subsequent cycles.",
    "zh": "（P2）查询：在 KSM 稳定树中查询某个节点。攻击者取得一张内存页，将其初始化为要查询的内容。重要的是，查询内容不能与系统中已有页完全相同，例如可随机化页面 LSB。后续扫描时，KSM 处理此页并通过树查找尝试定位匹配项。由于不存在匹配节点，KSM 会在之后的扫描周期里继续进行查找。",
    "type": "text"
  },
  {
    "id": "p04-07",
    "page": 4,
    "en": "(P3) Measure.This primitive determines whether KSM has accessed a node in the stable tree during a query or a non-deduplicated page during a KSM scan. To achieve this, the attacker must have the reference to the page, i.e., its user-space virtual address. The attacker then applies a CPU cache side-channel, such as Flush+Reload [69], to that address. Because stable-tree queries compare page contents using memcmp (see Section 2.3), KSM accesses the corresponding page contents during tree traversal and deduplication processing. These accesses bring the page into the CPU cache and therefore leave a measurable trace that can be observed from user space.",
    "zh": "（P3）测量：判断 KSM 是否在查询期间访问过稳定树中的某个节点，或在扫描期间访问过某张未去重页。攻击者必须持有该页的引用，也就是它的用户态虚拟地址。然后对这个地址应用 Flush+Reload [69] 等 CPU 缓存侧信道。由于稳定树查询使用 memcmp 比较页面内容（见第 2.3 节），KSM 会在树遍历和去重处理时访问对应页面。这些访问将页面带入 CPU 缓存，留下用户态可测量的痕迹。",
    "type": "text"
  },
  {
    "id": "p04-08",
    "page": 4,
    "en": "The measurement is possible because the attacker and KSM access the same physical cache line of the deduplicated page. Combined with the fact that we do not assume core colocation between the attacker and theksmdthread, this requires a side channel that exposes accesses through the shared LLC. On modern systems, this effect is observable through the LLC, which is typically PIPT [34, 66]. Although we use Flush+Reload [69] in this paper, LeakyTree is not tied to a specific cache side channel, as discussed in Section 7.1.",
    "zh": "测量之所以可行，是因为攻击者与 KSM 访问的是已去重页中同一条物理缓存行。又由于我们不假设攻击者与 ksmd 线程在同一个 CPU 核心上运行，因此侧信道必须能够通过共享 LLC 暴露访问。现代系统通常采用 PIPT LLC [34, 66]，该效果可经 LLC 观测。尽管本文使用 Flush+Reload [69]，LeakyTree 并不绑定某一种缓存侧信道，第 7.1 节会进一步讨论。",
    "type": "text"
  },
  {
    "id": "p04-09",
    "page": 4,
    "en": "3.2 Overview LeakyTree leaks the contents of a deduplicated victim page bit by bit with overall complexity 𝑂(𝑛) . The attack targets KSM’s stable tree, which stores deduplicated pages and is ordered by page contents. We assume that the target victim page has previously been deduplicated and that its node is therefore present in this tree. This requires at least two identical instances of the page to occur in KSM-eligible memory, a condition that can arise naturally (see Section 7.3). We briefly introduce the attack in three stages, while Section 4 presents each stage in detail.",
    "zh": "### 3.2 概览\nLeakyTree 以总体 O(n) 复杂度逐位泄露一张已去重受害者页。攻击目标是 KSM 稳定树：它保存已去重页，并按页面内容排序。我们假设目标受害者页此前已经去重，因此其节点已在树中。这要求可被 KSM 处理的内存中至少出现两份完全相同的页面；这一条件可能自然形成，见第 7.3 节。下面简要介绍三个阶段，第 4 节详述。",
    "type": "text"
  },
  {
    "id": "p04-10",
    "page": 4,
    "en": "First, in thestable tree massagingstage, we shape the layout of KSM’s stable tree around the victim node using only unprivileged user-space operations. Using primitive(P1), we insert attackercontrolled nodes to manipulate the local tree layout around the victim node. Specifically, based on the known victim’s page prefix, we generate pages with contents close to the lower and upper bounds of plausible victim-page values. For example, for an RSA private key with known header —–BEGIN RSA PRI, we define bounds —–BEGIN RSA PRI00...0and—–BEGIN RSA PRIFF...F, which set the victim search range. Due to the tree ordering, these pages are inserted into the victim node’s left and right subtrees. Inserting",
    "zh": "首先，在“稳定树整理”阶段，仅利用无特权用户态操作塑造受害者节点周围的稳定树布局。借助 P1 插入攻击者控制的节点，改变局部布局。具体地，依据已知的受害者页面前缀，生成接近其可能取值上下界的页面。例如，针对已知头部为 -----BEGIN RSA PRI 的 RSA 私钥，定义 -----BEGIN RSA PRI00…0 与 -----BEGIN RSA PRIFF…F 两个边界，限定搜索范围。根据树的排序，这些页分别进入受害者节点的左右子树。插入——（下页续）。",
    "type": "text"
  },
  {
    "id": "p05-01",
    "page": 5,
    "en": "LeakyTree ... ... ... ... Stage 1: Massaging (Section 4.1) Stage 2: Oracles (Section 4.2) Stage 3: Leakage (Section 4.3) 𝑇𝑚𝑖𝑛 𝑇𝑚𝑎𝑥 ≤ ≤ ksmd 𝑇: Figure 2: Three-stage LeakyTree. First, an attacker inserts pages under 𝑇 ’s subtree by bounding its value range with a prefix. Second, the attacker selects the closest controlled left and right page to 𝑇 such that any query within the defined 𝑇 has a path crossing a page. Third, the attacker finds𝑇with a binary search using the comparison oracle constructed with𝑂 𝐿 and𝑂𝑅.",
    "zh": "### 图 2：LeakyTree 的三个阶段\n第一阶段，攻击者利用前缀限定目标 T 的取值范围，在 T 的子树中插入页面。第二阶段，选择左右两侧距离 T 最近且由攻击者控制的页面，使限定范围内的查询路径会经过相应页面。第三阶段，利用 O_L、O_R 构成的比较判定器，进行二分搜索找出 T。\n图内标签：Stage 1: Massaging＝阶段一：树整理（4.1）；Stage 2: Oracles＝阶段二：寻找判定器节点（4.2）；Stage 3: Leakage＝阶段三：泄露（4.3）；ksmd＝KSM 扫描线程；T_min、T_max＝目标取值上下界；L_x＝同步页；C_i＝测量用查询页。图中省略号表示未展开的页或树结构。",
    "type": "visual"
  },
  {
    "id": "p05-02",
    "page": 5,
    "en": "many attacker-controlled pages near these range boundaries triggers red-black-tree rebalancing, which moves attacker-controlled nodes closer to the victim node. As a result, both the left and right subtrees of the victim node contain attacker-controlled nodes.",
    "zh": "大量接近上下界的攻击者页会触发红黑树重平衡，使攻击者控制的节点逐渐靠近受害者节点。最终，受害者的左右子树中都会包含攻击者控制的节点。",
    "type": "text"
  },
  {
    "id": "p05-03",
    "page": 5,
    "en": "Second, in thefinding oracle nodesstage, we identify two attacker-controlled nodes in the victim node’s left and right subtrees, which we denote as the left oracle𝑂𝐿 and the right oracle𝑂𝑅. Due to the ordering property of the stable tree, any traversal within the victim’s search range that passes through the victim node must continue into either its left or right subtree. We therefore select one node from each subtree such that these traversals also access either 𝑂𝐿 or𝑂𝑅. To identify suitable candidates, we partially infer the local subtree structure around the victim node. This is achieved by combining primitives(P2)and(P3): we issue boundary-value queries for the victim’s search range while monitoring cache accesses to attacker-controlled nodes. From the observed accesses, we select the highest-valued left-side candidate as𝑂𝐿 and the lowest-valued right-side candidate as𝑂𝑅.",
    "zh": "其次，在“寻找判定器节点”阶段，识别位于受害者左右子树中的两个攻击者可控节点，分别记为左判定器 O_L 和右判定器 O_R。由于稳定树的排序性质，在受害者搜索范围内、经过受害者节点的遍历，接下来必定进入其左子树或右子树。因此，从两侧各选一个节点，使这些遍历还会访问 O_L 或 O_R。\n为找到合适候选，先部分推断受害者周围的局部子树结构。具体结合 P2 与 P3：发出搜索范围边界值查询，同时监测攻击者节点的缓存访问。根据观察，选择左侧候选中值最大的节点作为 O_L，右侧候选中值最小的节点作为 O_R。",
    "type": "text"
  },
  {
    "id": "p05-04",
    "page": 5,
    "en": "Third, in theoracle-assisted key space searchstage, we exploit KSM’s comparison operations to leak the victim-page content bit by bit. Because the stable tree is ordered by page contents, each lookup compares page values along the traversal path. Using(P2), we issue crafted candidate queries that cause the traversal to pass through the victim node. Depending on the comparison result, the traversal continues into either the left or the right subtree of the victim node. As established in the second stage, accesses to oracle nodes𝑂𝐿 and𝑂𝑅 leave observable cache traces that the attacker can detect using(P3). By observing which oracle is accessed, the attacker learns whether the queried value is smaller or larger than the victim-page value. By repeating this process and refining the queries accordingly, the attacker recovers the victim page contents bit by bit, with overall complexity𝑂(𝑛).",
    "zh": "第三，在“判定器辅助的键空间搜索”阶段，利用 KSM 比较操作逐位泄露受害者页内容。稳定树按页面内容排序，因此每次查找都会沿路径比较页面值。使用 P2 发出精心构造的候选查询，使遍历经过受害者节点。根据比较结果，路径进入其左或右子树。第二阶段选出的 O_L、O_R 被访问时会留下可观测缓存痕迹，攻击者用 P3 检测。观察哪一侧判定器被访问，就知道查询值小于还是大于受害者页。重复此过程并调整查询，可按总体 O(n) 复杂度逐位恢复页面。",
    "type": "text"
  },
  {
    "id": "p05-05",
    "page": 5,
    "en": "4 LeakyTree This section presents the detailed three stages of our LeakyTree attack while Figure 2 shows the internals of the stages.",
    "zh": "## 4 LeakyTree\n本节详细介绍攻击的三个阶段，图 2 展示各阶段的内部过程。",
    "type": "text"
  },
  {
    "id": "p05-06",
    "page": 5,
    "en": "4.1 Stable Tree Massaging The attack begins by restricting the search to a finite key space that contains the unknown target page𝑇 . We define this key space as",
    "zh": "### 4.1 稳定树整理\n攻击首先把搜索限制在一个包含未知目标页 T 的有限键空间中。我们把该键空间定义为——（本页图 3 后续接下文）。",
    "type": "text"
  },
  {
    "id": "p05-07",
    "page": 5,
    "en": "𝑇 prefix 𝐴min & 𝐴max min and max counter -----BEGIN RSA PRI 000000000000000000 000000000000000000 000000000000000000 000000000000000000 ... 000000000000000000 000000000000000000 000000000000000000 000000000000000000 000000000000000001 ≤ -----BEGIN RSA PRI VATE KEY-----\\nMII G5AIBAAKCAYEAr6jJn c6q3wAFLARWZMTNxTz zZZfdBGg44dGcwotW6 ... GFYfPIN8CldDsj0IO+ M4SmOcDeQ4axHd0tAZ bvHd1GnNcr/cyw00W8 VVg==\\n-----END RS A PRIVATE KEY----- ≤ -----BEGIN RSA PRI FFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFF ... FFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFE 𝑇min 𝑇max 𝐴min 𝐴maxPossible 𝑇 Values Figure 3:minandmaxpages.",
    "zh": "### 图 3：min 页与 max 页\n图示以 ASCII 编码 RSA 私钥为例，用已知前缀 -----BEGIN RSA PRI 固定页面开头；其余字节在全 0x00 与全 0xFF 间取值。左边 A_min 接近 T_min，右边 A_max 接近 T_max，中间是 T 的可能取值。最低有效端的递增／递减计数器使攻击者页彼此不同。\n图内标签：T prefix＝T 的前缀；A_min & A_max＝两类攻击者页；min and max counter＝最小端／最大端计数器；Possible T Values＝T 的可能取值。RSA 私钥样本文本、十六进制值及比较符号保留原样；示例并非需读者使用的真实密钥。",
    "type": "visual"
  },
  {
    "id": "p05-08",
    "page": 5,
    "en": "an interval[𝑇𝑚𝑖𝑛,𝑇𝑚𝑎𝑥] that bounds the contents of𝑇 . The interval is constructed by fixing a prefix of the page to a known value—e.g., headers—while leaving the remaining bytes unconstrained. This defines the class of victim pages that LeakyTree targets for leakage. Figure 3 illustrates this process for an ASCII-encoded RSA private key. In this example, the interval is defined by fixing part of the known RSA header, while all remaining bytes span values between 0x00 and0xFF. Although this constraint reduces the search space, it remains infeasible for naive enumeration (e.g., an𝑂( 2𝑛) key-space search), as it would require testing all possible keys. As LeakyTree reduces the leakage complexity to 𝑂(𝑛) , the key space becomes tractable.",
    "zh": "区间 [T_min, T_max]，用它界定 T 的内容。构造方式是把页面前缀固定为某个已知值，例如文件头，而其余字节不加限制。这定义了 LeakyTree 要泄露的一类受害者页面。\n图 3 用 ASCII 编码的 RSA 私钥说明这个过程：固定已知 RSA 头部的一部分，其余字节可取 0x00 至 0xFF。虽然范围缩小，朴素枚举仍不可行，例如 O(2ⁿ) 键空间搜索需要测试所有可能密钥。LeakyTree 将泄露复杂度降为 O(n)，使这个键空间变得可处理。",
    "type": "text"
  },
  {
    "id": "p05-09",
    "page": 5,
    "en": "After defining the range[𝑇𝑚𝑖𝑛,𝑇𝑚𝑎𝑥], the attacker allocates pages whose contents correspond to the lower and upper bounds of the defined interval. These pages are organized into two classes, referred to asminpages andmaxpages, denoted 𝐴𝑚𝑖𝑛 and𝐴𝑚𝑎𝑥 . 𝐴𝑚𝑖𝑛 contains pages with values close to𝑇𝑚𝑖𝑛, whereas𝐴𝑚𝑎𝑥 contain pages with values close to𝑇𝑚𝑎𝑥 . Within each class, pages are ordered:𝐴𝑚𝑖𝑛 is arranged in increasing page-value order, while 𝐴𝑚𝑎𝑥 is arranged in decreasing order. Practically, we increase or decrease the least significant bytes of 𝑇𝑚𝑖𝑛 and𝑇𝑚𝑎𝑥 to generate pages from both classes.",
    "zh": "确定 [T_min, T_max] 后，攻击者分配内容对应上下界的页面，组织成两类，称为 min 页与 max 页，分别记作 A_min、A_max。A_min 中的值接近 T_min，A_max 中的值接近 T_max。每类内部有序：A_min 按页面值递增，A_max 按页面值递减。实践中，通过递增或递减 T_min、T_max 的最低有效字节，生成这两类页面。",
    "type": "text"
  },
  {
    "id": "p05-10",
    "page": 5,
    "en": "With both classes—𝐴𝑚𝑖𝑛 and𝐴𝑚𝑎𝑥 —allocated, we iterate over them and utilize the insertion primitive(P1)to insert the pages onto the stable tree. As the inserted page is relatively close to𝑇 in value—due to the same known header—its insertion will cause a",
    "zh": "分配 A_min、A_max 后，遍历两类页面并利用 P1 把它们插入稳定树。由于页面与 T 拥有相同的已知头部，值相对接近 T，其插入路径会——（下页续）。",
    "type": "text"
  },
  {
    "id": "p06-01",
    "page": 6,
    "en": "path that traverses𝑇 , meaning that the page gets inserted on the subtree formed by𝑇 . Due to the sorted property of the red-black stable tree, pages belonging to𝐴𝑚𝑖𝑛 are inserted on the left branch of𝑇, while pages from𝐴 𝑚𝑎𝑥 are inserted on the right branch of𝑇. These attacker-controlled pages are initially inserted on leaf nodes of the subtree from𝑇.",
    "zh": "经过 T，即页面被插入到以 T 为根的子树中。根据红黑稳定树的有序性，A_min 的页进入 T 左分支，A_max 的页进入 T 右分支。这些攻击者页起初被插在 T 子树的叶节点位置。",
    "type": "text"
  },
  {
    "id": "p06-02",
    "page": 6,
    "en": "With these crafted insertions, we seek to force structural changes in the red-black subtree formed by𝑇 via forced red-black tree rebalancements. As pages are inserted in theworst-casescenario— ordered in content—nodes are inserted as the direct children of the previously inserted one, leading to red-black tree property violations. This forces the red-black tree to rebalance itself, applying rotations and recolorings that lift the attacker-inserted pages further up in the subtree formed by𝑇 . With enough insertions from 𝐴𝑚𝑖𝑛 and𝐴𝑚𝑎𝑥 , we force enough rebalancements to have attackerinserted pages as direct children of𝑇 , or close to𝑇 . Formally, we require that for every page value𝑣 in the interval[𝑇𝑚𝑖𝑛,𝑇𝑚𝑎𝑥], the search path for𝑣 through the tree is guaranteed to traverse𝑇 and at least one attacker-controlled node from𝐴𝑚𝑖𝑛 or𝐴𝑚𝑎𝑥 .",
    "zh": "通过这些精心构造的插入，我们希望强迫红黑树重平衡，使 T 子树发生结构变化。由于页面按内容有序、以“最坏情况”顺序插入，新节点成为此前插入节点的直接子节点，违反红黑树性质。树因此必须旋转、重新着色，把攻击者节点逐渐提升到 T 子树的更高位置。插入足够多的 A_min、A_max 页面后，就能强制足够多次重平衡，让攻击者节点成为 T 的直接子节点或接近 T。\n形式上，我们要求：对区间 [T_min, T_max] 中每个页面值 v，其搜索路径保证经过 T，并经过 A_min 或 A_max 中至少一个攻击者控制的节点。",
    "type": "text"
  },
  {
    "id": "p06-03",
    "page": 6,
    "en": "∀𝑣∈[𝑇 min,𝑇max]: path(𝑟𝑜𝑜𝑡,𝑣)⊇{𝑇}∪{𝑎|𝑎∈𝐴 min∪𝐴max}(1)",
    "zh": "式（1）（按原文保留符号）：\n∀v ∈ [T_min, T_max]：path(root, v) ⊇ {T} ∪ {a | a ∈ A_min ∪ A_max}。",
    "type": "text"
  },
  {
    "id": "p06-04",
    "page": 6,
    "en": "The number of attacker-controlled insertions required to achieve the state in Equation (1) depends on both the total size of the tree and the depth of the target node 𝑇 in the tree. As we lack direct introspection into the fine-grain tree structure, we must rely on an estimate. We can conservatively under-approximate the required number of insertions, and increase it if the attack does not proceed or stops at a certain point. Most of our evaluations required only 1− 16node insertions per subtree, with none requiring more than 256nodes. Inserting a low number of pages carries no impact and can further be adjusted.",
    "zh": "达到式（1）状态所需的攻击者插入次数，同时取决于整棵树的大小和目标节点 T 的深度。由于无法直接观察细粒度结构，只能依赖估计。可以先保守地低估所需次数，若攻击无法继续或在某处停止，再增加插入。我们大多数评估中，每个子树仅需插入 1—16 个节点，没有一次超过 256 个。少量插页不会带来影响，而且可以继续调整。",
    "type": "text"
  },
  {
    "id": "p06-05",
    "page": 6,
    "en": "Target Page.Crucially, establishing the interval range does not imply the knowledge of𝑇 . Defining the interval allows us to target the leakage of a page in the system with specific data, such as keys or images. This gives us a more granular leakage attack, although we can also define the interval range as the minimum and maximum page value in order to leak a generic system page.",
    "zh": "### 目标页面\n关键是，确定区间并不意味着已经知道 T。区间使我们能够针对含有密钥、图像等特定数据的系统页面进行泄露，因此攻击粒度更细。但也可以把区间设为整个页面的最小值到最大值，以泄露一般的系统页面。",
    "type": "text"
  },
  {
    "id": "p06-06",
    "page": 6,
    "en": "4.2 Finding Oracle Nodes In this stage, we use the structural manipulation in Section 4.1 to build reliable primitives for a practical side channel that, for any query𝑣∈[𝑇 𝑚𝑖𝑛,𝑇𝑚𝑎𝑥], reveals whether𝑇 proceeds to the left or right subtree. This side channel can be interpreted as a branch side channel because it leaks information about the branch being taken.",
    "zh": "### 4.2 寻找判定器节点\n本阶段利用 4.1 节的结构操纵，建立可靠的实用侧信道原语：对任意 v ∈ [T_min, T_max]，揭示经过 T 后继续走左子树还是右子树。由于暴露所走分支，它可以被理解为一种分支侧信道。",
    "type": "text"
  },
  {
    "id": "p06-07",
    "page": 6,
    "en": "After the massaging stage, the target page node 𝑇 contains attacker-inserted pages in both its left and right subtrees. Now, we aim to find the most favorable attacker-inserted page to build the branch side channel. We denote the most favorable page as𝑂𝐿 for the left branch and𝑂𝑅 for the right branch; both are referred to as oracle nodes. For any queried value within our defined range, the path must contain at least𝑂𝐿 or𝑂𝑅 (see Equation (1)). As an illustrative example, an optimal pick for 𝑂𝐿 and𝑂𝑅 nodes is the direct children of𝑇 . In this case, any query branching on 𝑇 will always result in a path containing one of the selected oracle nodes, following our defined rule (see Equation (1)).",
    "zh": "树整理完成后，T 的左右子树都含有攻击者插入的页。现在要从中选出最适合建立分支侧信道的页面：左侧记为 O_L，右侧记为 O_R，统称判定器节点。限定范围内的任何查询，其路径必须至少经过 O_L 或 O_R，见式（1）。最理想的例子是选择 T 的两个直接子节点；此时任何在 T 处分支的查询路径都会包含其中一个，满足上述规则。",
    "type": "text"
  },
  {
    "id": "p06-08",
    "page": 6,
    "en": "Practically, we do not require the oracle nodes to be the direct children of𝑇 , as the condition is more relaxed. Hence, we can find suitable oracle nodes deeper in the subtree, which are easier to find than the optimal ones. Finding nodes that can be candidates for being an oracle node involves the partial leakage of the subtree structure. Specifically, we partially leak the structure to infer which of the inserted nodes from𝐴𝑚𝑖𝑛 and𝐴𝑚𝑎𝑥 are the closest to𝑇 within its subtree. In order to obtain this information, we use the measure primitive(P3)on a limited, tractable subset of the attacker-inserted pages, while using the query primitive(P2)for the extreme values of the range (e.g.,𝑇𝑚𝑖𝑛 and𝑇𝑚𝑎𝑥 ). The query for the aforementioned extreme values causes analways-leftandalways-rightaccess pattern over the attacker-inserted pages, as they are the minimum and maximum value of the range, respectively. By using the measure primitive(P3), we observe the resulting access pattern of the query on𝐴𝑚𝑖𝑛 and𝐴𝑚𝑎𝑥 page nodes. Afterwards, we group all pages where we measure an access on the sets𝐻𝑚𝑖𝑛 and𝐻𝑚𝑎𝑥 , containing accessedminandmaxpages, respectively. Finally, considering the caused path follows analways-leftandalways-rightfor branches on nodes𝐻𝑚𝑖𝑛 and𝐻𝑚𝑎𝑥 , and the red-black tree ordering, we define 𝑂𝐿 and𝑂𝑅 by Equation (2). 𝑂𝐿 =max(𝐻 𝑚𝑖𝑛), 𝑂 𝑅 =min(𝐻 𝑚𝑎𝑥)(2)",
    "zh": "实践中，无须判定器就是 T 的直接子节点，条件比这更宽松。因此可以在子树较深处寻找合适节点，它们比最优节点更容易找到。候选的寻找涉及对子树结构的部分泄露：从 A_min、A_max 中推断哪些插入节点在子树内最接近 T。\n为获取这些信息，利用 P3 测量一组规模有限、可处理的攻击者页，同时用 P2 查询范围极值，例如 T_min、T_max。由于分别是范围最小值与最大值，它们在攻击者节点上的访问模式分别为“一直向左”和“一直向右”。用 P3 观测 A_min、A_max 的访问模式，把测到访问的页分别收集到 H_min、H_max。最后，结合两条极值路径及红黑树排序，按式（2）定义：\nO_L = max(H_min)，O_R = min(H_max)。",
    "type": "text"
  },
  {
    "id": "p06-09",
    "page": 6,
    "en": "The selection rule in Equation (2) follows directly from the tree ordering invariant. For𝐻𝑚𝑖𝑛, the node that is placed at the highest level from the set within the subtree formed by𝑇 is the one with the highest value from the set. As we queried for the minimum value of the range, the branch taken is always the left, meaning the one with a page node of smaller value than the current one. This causes the query to traverse nodes in decreasing order always, meaning that the highest node from the resulting path is the one of higher value. The opposite occurs for𝐻𝑚𝑎𝑥 , based on the same principle, the query searches the maximum value of the branch, always taking the right branch, where nodes are larger in value. We end up with a path of nodes in increasing value, meaning that the highest node in the subtree for𝐻𝑚𝑎𝑥 is the minimum page in value, as all the rest were taken after a right branch.",
    "zh": "式（2）的选择规则直接来自树的排序不变性。对于 H_min，在 T 子树中位置最高的节点，就是该集合中值最大的节点。因为查询的是范围最小值，每次都向左，即进入比当前节点值更小的一侧，路径上的值持续递减，所以路径最上方节点的值最大。H_max 则相反：查询最大值，每次向右，进入值更大的节点，路径上的值递增。因此，H_max 中在子树内位置最高的节点值最小，其余节点都在它之后经右分支访问。",
    "type": "text"
  },
  {
    "id": "p06-10",
    "page": 6,
    "en": "Query & Measure Primitives.For this stage of the attack, we combined the query(P2)and measure(P3)primitives in order to partially leak the structure of the subtree formed by𝑇 . The combination of these primitives into an operation that lets an attacker measure the access pattern of the executed query is not straightforward and requires additional considerations, as we will later explain in Section 4.3.1.",
    "zh": "### 查询与测量原语\n本阶段结合 P2、P3，部分泄露 T 子树的结构。要把两者组合成“测量一次给定查询的访问模式”的操作并不直接，还需要额外考虑，详见 4.3.1 节。",
    "type": "text"
  },
  {
    "id": "p06-11",
    "page": 6,
    "en": "4.3 Oracle-Assisted Key Space Search The last stage of LeakyTree leverages the previously obtained nodes 𝑂𝐿 and𝑂𝑅 to construct agreater-or-lesseroracle for any query 𝑞∈[𝑇 𝑚𝑖𝑛,𝑇𝑚𝑎𝑥] against𝑇 . We then leverage this oracle to perform a binary search of𝑇 on the range[𝑇𝑚𝑖𝑛,𝑇𝑚𝑎𝑥]. Effectively, every usage of thegreater-or-lesseroracle leaks one bit of the target page at a time.",
    "zh": "### 4.3 判定器辅助的键空间搜索\nLeakyTree 的最后阶段利用此前找到的 O_L、O_R，为范围内任意查询 q 与 T 构建“大于／小于”判定器。随后用它在 [T_min, T_max] 内二分搜索 T。实际上，每调用一次大小判定器，就泄露目标页的一位信息。",
    "type": "text"
  },
  {
    "id": "p06-12",
    "page": 6,
    "en": "The subtree formed by node𝑇 contains the attacker-controlled node𝑂𝐿 on the subtree formed by the left child, and 𝑂𝑅 on the subtree formed by the right child. As𝑂𝐿 and𝑂𝑅 follow Equation (1),",
    "zh": "以 T 为根的子树中，攻击者控制的 O_L 位于左孩子的子树内，O_R 位于右孩子的子树内。由于 O_L、O_R 满足式（1）——（下页续）。",
    "type": "text"
  },
  {
    "id": "p07-01",
    "page": 7,
    "en": "we model𝑇 as a node with 𝑂𝐿 and𝑂𝑅 as left and right children nodes.",
    "zh": "我们把 T 抽象为以 O_L、O_R 分别作为左右孩子的节点。",
    "type": "text"
  },
  {
    "id": "p07-02",
    "page": 7,
    "en": "An attacker queries a value in the range[𝑇𝑚𝑖𝑛,𝑇𝑚𝑎𝑥] via(P2). KSM queries the stable tree for the value, arriving at target node𝑇 as part of the query path. Then, branches left or right depending on the result of thememcmpbetween the queried page and 𝑇 , i.e., depending if the value is lesser or bigger. This constitutes a branch over secret data contained by 𝑇 . Based on the result of the branch, KSM continues traversing the subtree formed by 𝑇 on the left or right side of the tree. As per Equation (1), 𝑂𝐿 or 𝑂𝑅 will form part of the traversed path for the query afterwards. Whether𝑂𝐿 or𝑂𝑅 form part of the path depends on the branch taken on𝑇 , as the left side of the subtree containsminpages—close to𝑇𝑚𝑖𝑛 in value—, and the right side containsmaxpages—close to𝑇𝑚𝑎𝑥 in value. When either of the oracle nodes gets processed by KSM as part of the query, the page gets accessed in order to perform the memory comparison to decide on which branch to take. This memory comparison causes a memory load, leaving an observable trace by the attacker via the primitive(P3). Based on this measurement, the attacker constructs thegreater-or-lesseroracle shown in Equation (3), where hit represents an observed memory access.",
    "zh": "攻击者通过 P2 查询范围 [T_min, T_max] 内某个值。KSM 在稳定树中查询该值，路径经过目标 T。随后，根据查询页与 T 的 memcmp 结果，即查询值更小还是更大，选择左分支或右分支。这就是一次由 T 中秘密数据决定的分支。\nKSM 根据结果继续遍历 T 的左侧或右侧子树。根据式（1），后续路径会包含 O_L 或 O_R。具体包含哪一个，取决于在 T 处所走的分支，因为左子树含接近 T_min 的 min 页，右子树含接近 T_max 的 max 页。\n当某个判定器作为查询路径的一部分被 KSM 处理时，KSM 为决定下一分支，必须访问它并比较内存。该比较引发内存加载，留下可通过 P3 观察的痕迹。基于测量，攻击者构建式（3）的大小判定器，其中 hit 表示观察到一次内存访问。",
    "type": "text"
  },
  {
    "id": "p07-03",
    "page": 7,
    "en": "hit(𝑂𝐿) ⇒𝑞<𝑇,hit(𝑂 𝑅) ⇒𝑞>𝑇.(3)",
    "zh": "式（3）：hit(O_L) ⇒ q < T；hit(O_R) ⇒ q > T。",
    "type": "text"
  },
  {
    "id": "p07-04",
    "page": 7,
    "en": "With the constructed oracle, an attacker performs a binary search of𝑇 over the range[𝑇𝑚𝑖𝑛,𝑇𝑚𝑎𝑥]. First, it picks a value𝑣 in the middle of the range, and queries the constructed oracle, determining if𝑣 is greater or lesser than𝑇 . Based on the obtained result, the attacker picks the next middle value of the upper or lower half of the range, repeating the query. With each query, the attacker halves the range by two, effectively searching in 𝑂(𝑙𝑜𝑔 2(2𝑛)) which is𝑂(𝑛) . The attacker continues until it finds𝑇in the range.",
    "zh": "有了此判定器，攻击者在 [T_min, T_max] 内二分搜索 T。先选区间中点 v，查询它比 T 大还是小。再根据结果选上半区间或下半区间的中点，重复查询。每次查询把范围减半，因此搜索复杂度为 O(log₂(2ⁿ))，即 O(n)。持续到在区间内找到 T 为止。",
    "type": "text"
  },
  {
    "id": "p07-05",
    "page": 7,
    "en": "Practically, the attacker sets the first unknown bit after the fixed header to one, and utilizes the oracle to compare against𝑇 . If the value islower, it unsets the bit to zero. If the value ishigher, it keeps the bit set. Afterwards, it sets the next bit and proceeds again. Each query leaks one bit of the contents of the secret page𝑇 , from the Most Significant Bit (MSB) to the Least Significant Bit (LSB).",
    "zh": "实际操作时，攻击者将固定头部之后第一个未知位置为 1，并用判定器与 T 比较。如果该值“更低”，就将该位清零；如果“更高”，则保留该位为 1。随后设置下一位，继续执行。每次查询泄露秘密页 T 的一位内容，从最高有效位（MSB）到最低有效位（LSB）。",
    "type": "text"
  },
  {
    "id": "p07-06",
    "page": 7,
    "en": "4.3.1 Precise Measurements.In Section 4.2 and Section 4.3 we utilized the combination of the query(P2)and measure(P3)primitives. When combining both primitives, an attacker can leak the path caused by an attacker-controlled query. Combining the query primitive(P2)and the measurement primitive(P3)poses a synchronization problem: the attacker must ensure that the short measurement window of(P3)overlaps the exact instant whenksmdperforms the stable tree lookup caused by the attacker’s(P2)query. Asksmd is a separate privileged kernel thread, standard synchronization techniques are not available.",
    "zh": "#### 4.3.1 精确测量\n第 4.2、4.3 节结合 P2 查询与 P3 测量。二者结合后，攻击者能泄露由可控查询产生的路径。但这带来同步问题：必须确保 P3 很短的测量窗口，覆盖 ksmd 执行该 P2 查询所触发的稳定树查找的准确时刻。ksmd 是独立的有特权内核线程，因此无法使用普通同步技术。",
    "type": "text"
  },
  {
    "id": "p07-07",
    "page": 7,
    "en": "We synchronized the attacker andksmd’s kernel thread by making use of the predictable scan order of KSM. KSM processes the candidate system memory in a stable, predictable order. For each candidate VMA within a struct mm , all contained anonymous pages are processed in an increasing order within its range. We utilize this property as a distinguisher to detect KSM processing within a VMA.",
    "zh": "我们利用 KSM 扫描顺序可预测的性质，同步攻击者与 ksmd。KSM 以稳定、可预测的顺序处理候选系统内存。对于 struct mm 中每个候选 VMA，其范围内的匿名页均按地址递增顺序处理。我们利用这一性质，区分并检测 KSM 正在处理某个 VMA 的时刻。",
    "type": "text"
  },
  {
    "id": "p07-08",
    "page": 7,
    "en": "Synchronization Primitive.To synchronize a query 𝑄 of a page 𝑣 with measurement primitives, we allocate𝑁 contiguous pages viammap.First, we fill the contents of all allocated pages with the contents of𝑣, randomizing the least significant integer of the page to avoid deduplication between them.Second, we mark the allocated page for deduplication via madvise [2], as we do in the query primitive.Third, we utilize the measure primitive over a set of𝐿 pages from the range, we repeat the measurements in a loop until we detect an increasing sequential access pattern, ignoring individual hits.Finally, we utilize the measure primitive on selected nodes—such as𝑂𝐿 or𝑂𝑅—, meanwhile KSM processes the end of our allocated range, causing tree lookups. This technique serves as a synchronization primitive between the unprivileged attacker thread and the privilegedksmdkernel thread. In Figure 2, stage 3 visualizes the mentioned page range, showing the pages used for synchronization as𝐿𝑥, while measurement pages are shown as𝐶𝑖.",
    "zh": "### 同步原语\n为了将页面值 v 的查询 Q 与测量同步，先通过 mmap 分配 N 张连续页面。第一，用 v 填充所有页面，同时随机化页面最低有效端的整数，防止它们彼此去重。第二，像查询原语一样，通过 madvise [2] 把这些页标记为可去重。第三，对范围内 L 张页反复使用测量原语，直到检测到地址递增的顺序访问模式，忽略孤立命中。最后，在 KSM 处理所分配范围尾部、触发树查询时，测量 O_L、O_R 等选定节点。\n这就构成了无特权攻击线程与有特权 ksmd 线程之间的同步原语。图 2 第三阶段画出该页面范围：用于同步的页标作 L_x，用于测量的页标作 C_i。",
    "type": "text"
  },
  {
    "id": "p07-09",
    "page": 7,
    "en": "4.3.2 Multioracles.Performing a combined query and a measure primitive requires to wait for KSM to arrive to the attacker VMA and process its pages. Effectively, an attacker has to wait for a full processing cycle of KSM to complete in order to leak one single bit of𝑇 . On systems with conservative configurations or heavy load, cycles can take longer and thus, decrease the leakage range of 𝑇 . An attacker can overcome this limitation by making use of the property of KSM where it processes VMAs and pages in order.",
    "zh": "#### 4.3.2 多判定器区域\n一次查询与测量的组合，需要等待 KSM 到达攻击者 VMA 并处理页面。实际上，泄露 T 的单个位往往得等待一次完整 KSM 扫描周期。配置保守或负载较重时，周期更长，泄露速率下降。攻击者可以利用 KSM 按顺序处理 VMA 和页面的性质，克服这一限制。",
    "type": "text"
  },
  {
    "id": "p07-10",
    "page": 7,
    "en": "An attacker first allocates a large memory range on a VMA (e.g., viammap), and subdivides it in oracle regions, consisting of𝑁 pages each. Each oracle region is separated from the next one by𝐺 dummy pages containing randomized contents. When KSM arrives to the attacker VMA, it will process each oracle region in order, and waste time between regions by processing the dummy pages. The attacker can leak one bit from the target page𝑇 on the first oracle region, and adjust the second oracle region with the leaked bit in order to leak the second bit. Meanwhile, KSM is processing the dummy pages, when it finishes it continues processing the second region, leaking another bit for the attacker. This continues for each oracle region contained in the VMA, leaking one bit per oracle region. Afterwards, KSM leaves the attacker VMA region and continues its normal processing, taking longer to leak the next bit based on system configuration and workload.",
    "zh": "攻击者先在一个 VMA 中分配大段内存，例如使用 mmap，并将其划分为多个判定器区域，每区含 N 页。相邻区域间用 G 张随机内容的占位页隔开。KSM 到达此 VMA 后，按序处理各区域，并在区域间花时间处理占位页。\n攻击者在第一区域泄露 T 的第一位，再用已知的这一位调整第二区域，以泄露第二位。调整期间，KSM 正在处理中间的占位页；完成后进入第二区域，泄露下一位。此过程在 VMA 的各区域重复，每个区域泄露一位。随后 KSM 离开攻击者 VMA，继续正常处理；在下一位可泄露前，要根据系统配置和负载等待更长时间。",
    "type": "text"
  },
  {
    "id": "p07-11",
    "page": 7,
    "en": "By employing this technique, an attacker is able to leak multiple bits per KSM cycle, increasing the leakage rate on all conditions. On unfavorable conditions, such as high KSM workload or conservative KSM configurations, this technique can make the attack suitable where previously the leakage rate would have not been feasible.",
    "zh": "利用这一技术，攻击者可在每个 KSM 周期泄露多位，在各种条件下提高泄露率。在高 KSM 负载或保守配置等不利条件下，它甚至能把此前速率不可行的攻击变成可行攻击。",
    "type": "text"
  },
  {
    "id": "p07-12",
    "page": 7,
    "en": "5 Evaluation This section evaluates LeakyTree in a controlled synthetic setting that emulates different victim conditions, allowing us to systematically analyze the resulting attack metrics. The goal is to provide an isolated evaluation of LeakyTree, while realistic attack scenarios are explored separately in Section 6.",
    "zh": "## 5 评估\n本节在受控合成环境中模拟不同受害者条件，以系统分析攻击指标。目的是隔离评估 LeakyTree；真实攻击场景另在第 6 节研究。",
    "type": "text"
  },
  {
    "id": "p07-13",
    "page": 7,
    "en": "Environment.We conduct all experiments on an Ubuntu 24.04 desktop system running an upstream-compiled Linux 6.6.133 longtermkernel, released the 6th of April 2026. We also evaluate on other, recentlongtermkernels between 5.15.202 and 6.18.21.",
    "zh": "### 环境\n所有实验均在 Ubuntu 24.04 桌面系统上进行，运行由上游源码编译的 Linux 6.6.133 长期支持内核，原文记载其发布日期为 2026 年 4 月 6 日。此外，还评估了 5.15.202 至 6.18.21 之间较新的其他长期支持内核。",
    "type": "text"
  },
  {
    "id": "p08-01",
    "page": 8,
    "en": "0 10 20 30 40 50 0 10 20 30 Number of Oracle Regions (𝑂) Throughput (bps) Ideal (1×𝑂,≤6.10) Measured (6.6) Figure 4: Multioracle speedup on KSM with3 · 106 shared and unshared pages. Dashed line: ideal linear scaling per oracle region. Measured throughput scales linearly at a lower rate.",
    "zh": "### 图 4：多判定器加速\n在含有 3 × 10⁶ 张共享和非共享页面的 KSM 上，多判定器区域带来的加速。虚线表示每增加一个区域的理想线性扩展；实测吞吐量以较低斜率线性增长。\n图内标签：Number of Oracle Regions (O)＝判定器区域数量；Throughput (bps)＝吞吐率，位／秒；Ideal (1×O, ≤6.10)＝理想值（1×O，内核 ≤6.10）；Measured (6.6)＝内核 6.6 实测值。刻度及曲线数值保留原图。",
    "type": "visual"
  },
  {
    "id": "p08-02",
    "page": 8,
    "en": "0 5 10 15 20 25 29 101 102 103 KSM sync: 1441.50 ms Oracle Index Unlock Time (ms) Figure 5: Time to leak bit per oracle index. Oracle 0 waits for a full KSM cycle, while subsequent oracles unlock quicker, yielding the higher throughput observed in Figure 4.",
    "zh": "### 图 5：各判定器区域泄露一位所需时间\n区域 0 要等待一个完整 KSM 周期，后续区域则更快产出结果，由此得到图 4 的较高吞吐量。\n图内标签：Oracle Index＝判定器区域编号；Unlock Time (ms)＝产出结果时间，毫秒；KSM sync: 1441.50 ms＝KSM 同步耗时 1441.50 毫秒。纵轴采用对数刻度。",
    "type": "visual"
  },
  {
    "id": "p08-03",
    "page": 8,
    "en": "The used CPU is an Intel Core i7-13700 (13th Gen) paired with 32GB of RAM.",
    "zh": "所用 CPU 为第 13 代 Intel Core i7-13700，配备 32 GB 内存。",
    "type": "text"
  },
  {
    "id": "p08-04",
    "page": 8,
    "en": "Synthetic Victim.To precisely emulate different KSM workload scenarios, we implement the victim target as a tweakable unprivileged userspace program. The victim program induces controllable KSM activity and embeds a target page for leakage. It allocates and initializes duplicate memory pages to force their insertion into the stable tree, enabling control over its size. At the same time, it allocates randomized, non-duplicate pages to regulate the size of the unstable tree. Finally, a randomly selected page pair from the duplicated set is initialized with an ASCII-encoded RSA private key, ensuring its insertion into the stable tree as the target of the attack.",
    "zh": "### 合成受害者\n为精确模拟不同 KSM 工作负载，我们将受害者实现为一个可调节的无特权用户态程序。它引发可控 KSM 活动，并包含待泄露目标页。程序分配并初始化重复页面，强制把它们插入稳定树，以控制稳定树大小；同时分配随机且不重复的页面，以调节不稳定树大小。最后，从重复页集合随机选一对，用 ASCII 编码 RSA 私钥初始化，确保这对页面作为攻击目标进入稳定树。",
    "type": "text"
  },
  {
    "id": "p08-05",
    "page": 8,
    "en": "5.1 Performance Evaluation This experiment evaluates the core performance of LeakyTree under different conditions and attack parameters. We prepare different KSM workload scenarios with our synthetic setup and run LeakyTree, varying the attack parameters and observing the leakage result. To ensure consistent evaluation, we setpages_to_scan to100 ,000on all experiments, while showing the effect of this parameter on leakage rates in Section 5.4.",
    "zh": "### 5.1 性能评估\n本实验评估不同条件和参数下的核心性能。我们用合成设置准备不同 KSM 负载，改变攻击参数、运行 LeakyTree 并观察泄露结果。为使评估一致，所有实验将 pages_to_scan 设为 100,000；第 5.4 节另展示该参数对速率的影响。",
    "type": "text"
  },
  {
    "id": "p08-06",
    "page": 8,
    "en": "Table 1 summarizes the observed performance of LeakyTree across a range of workload scenarios. Overall, our results demonstrate that the attack is feasible, both in small-scale settings with stable and unstable trees on the order of10 3 nodes, and in larger settings with millions of nodes (106). We observe that the optimal parameterization of LeakyTree depends strongly on the underlying",
    "zh": "表 1 总结不同负载场景下的性能。总体上，稳定树和不稳定树只有约 10³ 节点的小规模环境，以及拥有百万级节点（10⁶）的大规模环境中，攻击均可行。最佳参数强烈依赖底层——（表 1 后续接下文）。",
    "type": "text"
  },
  {
    "id": "p08-07",
    "page": 8,
    "en": "Table 1: LeakyTree Performance Evaluation. Scenario LeakyTree Results 𝐾𝑠ℎ 𝐾𝑢𝑛 𝐼 𝑀 𝐿 𝑊 𝑂 𝐺 𝑂 𝑡(1)𝑂 𝑚 𝑂𝑠 Rollb.Throughp. (ms) (bps) Baseline 105 105 0 103 3 3 50 103 1020.42 4 0 3 31.315 105 105 010 3 3 1 5010 3 1033.18 3 0 1 30.067 105 105 0 103 5 1 50 103 810.16 7 0 2 15.258 105 105 010 3 5 1 50500 1246.54 12 0 1 0.826 Different KSM Workloads 1 0 0 103 3 3 50 103 274.00 0 11 2 4.684 103 103 010 3 3 3 5010 3 198.12 0 1 2 18.683 104 104 0 103 3 3 50 103 224.71 0 1 2 61.293 105 105 010 3 3 3 5010 3 1189.26 0 0 2 31.216 106 106 0 103 3 3 50 103 9799.00 0 1 0 4.208 Multioracle Speedup 105 105 0 103 3 3 1 103 1158.73 0 0 0 0.846 105 105 010 3 3 3 1010 3 1202.64 0 0 1 6.766 105 105 0 103 3 3 20 103 1093.55 1 0 2 15.389 105 105 010 3 3 3 3010 3 1093.37 0 0 4 21.638 105 105 0 103 3 3 40 103 1095.64 5 0 2 28.852 105 105 010 3 3 3 5010 3 1050.28 4 1 4 30.147 𝐾𝑠ℎ: stable tree size; 𝐾𝑢𝑛: unstable tree size; 𝐼: inserted𝐴𝑚𝑖𝑛 and𝐴𝑚𝑎𝑥 pages as 2𝐼 ;𝑀: pages per oracle region; 𝐿: number of locks;𝑊 : required hits on oracle; 𝑂: number of oracle regions;𝐺: garbage (pad) between oracles;𝑂𝑡(1): leak time of first oracle (ms);𝑂𝑚: total oracle misses;𝑂𝑠 : total oracle skips; Rollb.: rollbacks needed; Throughp.: throughput (bps).",
    "zh": "### 表 1：LeakyTree 性能评估\n完整数据见保留的原表。三组场景分别为：基线（Baseline）、不同 KSM 负载（Different KSM Workloads）、多判定器加速（Multioracle Speedup）。\n表头及符号：K_sh＝稳定树大小；K_un＝不稳定树大小；I＝A_min、A_max 插入页数的指数，以 2ᴵ 表示；M＝每个判定器区域页数；L＝同步锁数量；W＝判定器所需命中次数；O＝区域数量；G＝区域间垃圾／填充页数；O_t(1)＝第一个判定器泄露耗时（毫秒）；O_m＝判定器未命中总数；O_s＝跳过的判定器总数；Rollb.＝所需回滚次数；Throughp.＝吞吐率（位／秒）。\n表内 15 行数字完整保留在原表图中，包括 31.315、30.067、15.258、0.826、4.684、18.683、61.293、31.216、4.208、0.846、6.766、15.389、21.638、28.852、30.147 bps；不要将这些特定配置结果当作所有场景的统一速度。",
    "type": "visual"
  },
  {
    "id": "p08-08",
    "page": 8,
    "en": "KSM workload. For instance, configurations with𝑂= 50oracle regions performed well for tree sizes around10 4, whereas in smaller trees the leakage rate decreased. This effect is primarily due to faster scan cycles, which may skip oracle regions, causing a desync between ksmd and the attacker process. In such scenarios, parameters such as the gap size𝐺 between oracle regions must be adjusted accordingly. Finally, Figure 4 illustrates the near-linear performance improvement achieved through the presented multioracle technique.",
    "zh": "KSM 负载。例如 O＝50 个区域在树大小约 10⁴ 时表现良好，而在较小树上泄露率反而下降。主要原因是扫描周期更快，可能跳过判定器区域，导致 ksmd 与攻击进程失去同步。这时必须相应调整区域间隔 G 等参数。图 4 则说明多判定器技术带来的近线性性能提升。",
    "type": "text"
  },
  {
    "id": "p08-09",
    "page": 8,
    "en": "In practice, this parameter dependency does not preclude exploitation, as an attacker can adapt these parameters during runtime to the observed KSM behavior. By monitoring whether oracle regions are processed reliably and whether synchronization with ksmd is maintained, the attacker can tune parameters such as the number of oracle regions𝑂 and the gap size𝐺 to better suit the current scenario.",
    "zh": "实践中，这种参数依赖并不阻止利用，因为攻击者可以根据观测到的 KSM 行为在运行时调整参数。监测区域是否被可靠处理、是否持续与 ksmd 同步，即可调整区域数 O、间隔 G 等，以适应当前场景。",
    "type": "text"
  },
  {
    "id": "p08-10",
    "page": 8,
    "en": "Multioracle Unlock Time.LeakyTree benefits from the use of multiple oracle regions, particularly on systems with high KSM workloads, where scan cycles take longer before attacker-controlled pages are processed again. To observe this behavior, we evaluate LeakyTree with 30 oracle regions (𝑂) on a system containing3· 105 nodes across the stable and unstable trees, and measure the time required for each region to leak a single bit. Figure 5 illustrates the results. The first oracle region exhibits the highest latency, as it reflects the time elapsed from the last attacker-controlled region until KSM completes a full scan cycle and revisits the first attacker-controlled region. In contrast, subsequent oracle regions yield results almost immediately, as they are processed sequentially within the same scan pass. We further observe periodic latency spikes of approximately 200 ms, which we attribute to the KSM configuration parametersleep_millisecs, whose default value is 200 ms.",
    "zh": "### 多判定器产出时间\n多个区域对 LeakyTree 有益，尤其在 KSM 负载较高、再次处理攻击者页前扫描周期较长时。我们在稳定树与不稳定树合计包含 3 × 10⁵ 节点的系统中，使用 30 个判定器区域，测量各区域泄露一位所需时间，见图 5。\n第一个区域延迟最高，因为它包含从上次最后一个攻击区域结束，到 KSM 完成全扫描并回到首个区域的时间。后续区域则几乎立即给出结果，因为它们在同一批扫描中被顺序处理。我们还观察到约 200 毫秒的周期性延迟峰值，认为来源于 KSM 参数 sleep_millisecs；其默认值为 200 毫秒。",
    "type": "text"
  },
  {
    "id": "p09-01",
    "page": 9,
    "en": "Table 2: Evaluation results for synthetic noise using stress-ngand realistic noise using the Phoronix Test Suite. Workload Results 𝑂𝑡(1)𝑂 𝑚 𝑂𝑠 Rollb.Throughp. (ms) (bps) Baseline Idle 1176.32 0 0 4 6.382 Synthetic Noise (stress-ng) 50% CPU load 22562.82 1 0 4 0.220 70% CPU load19472.23 0 0 4 0.348 90% CPU load 24724.46 1 0 6 0.098 Realistic Noise (Phoronix Test Suite) pts/nginx-3.0.1(c=100) 11495.09 2 0 1 0.479 pts/build-imagemagick-1.7.21882.84 0 0 3 3.179 pts/build-linux-kernel-1.16.0 3645.35 13 1 6 1.512",
    "zh": "### 表 2：噪声评估\n使用 stress-ng 的合成噪声和 Phoronix Test Suite 的真实工作负载噪声评估结果。列从左到右为：工作负载、第一个判定器耗时 O_t(1)（毫秒）、未命中总数 O_m、跳过总数 O_s、回滚次数 Rollb.、吞吐率（位／秒）。完整数据保留于原表图。\n基线 Idle＝空闲；Synthetic Noise＝合成噪声；50%／70%／90% CPU load＝对应 CPU 利用率；Realistic Noise＝真实工作负载噪声；nginx、ImageMagick 构建、Linux 内核构建的基准标识保留原样。各行速率依次为 6.382、0.220、0.348、0.098、0.479、3.179、1.512 bps。",
    "type": "visual"
  },
  {
    "id": "p09-02",
    "page": 9,
    "en": "5.2 Noise Evaluation To assess the robustness of LeakyTree under varying system workloads, we evaluate its performance in the presence of both synthetic noise and noise induced by real workloads. We reuse the experiment setup from Section 5.1 and introduce controlled synthetic noise using stress-ng, as well as realistic workload noise using the Phoronix Test Suite [48]. The results are summarized in Table 2.",
    "zh": "### 5.2 噪声评估\n为评估不同系统负载下的稳健性，我们测试合成噪声和真实负载噪声下的性能。复用 5.1 节设置，用 stress-ng 引入受控合成噪声，用 Phoronix Test Suite [48] 引入真实负载噪声。结果汇总于表 2。",
    "type": "text"
  },
  {
    "id": "p09-03",
    "page": 9,
    "en": "Overall, we observe that LeakyTree’s progress primarily depends on two conditions: whether the attacker remains synchronized with ksmd, and whether the attacker is scheduled long enough to carry out the corresponding measurement and update steps. Consequently, system load mainly affects throughput by disturbing this synchronization or by reducing the runtime available to the attacker, rather than changing the underlying attack mechanism.",
    "zh": "总体而言，LeakyTree 能否推进主要依赖两个条件：攻击者能否与 ksmd 保持同步；攻击者能否获得足够长的调度时间，完成对应测量与更新步骤。因此，系统负载主要通过打乱同步或减少攻击者运行时间影响吞吐量，而不是改变攻击的底层机制。",
    "type": "text"
  },
  {
    "id": "p09-04",
    "page": 9,
    "en": "Synthetic Noise.We introduce synthetic noise using stress-ng, executing stress-ng –cpu 0 –cpu-method fft –cpu-load N –cache 4 with varying values of 𝑁 , which controls overall CPU utilization. As shown in Table 2, system load has a significant impact on the performance of LeakyTree, although the leakage rate is still feasible. At 50 % CPU utilization, throughput drops to 0.220 bps, from the baseline 6.382 bps. The primary source of slowdown is the time to reach the first oracle region 𝑂𝑡(1), which drastically increases from 1176.32 ms, to 22562.82 ms.",
    "zh": "### 合成噪声\n使用 stress-ng，运行 stress-ng –cpu 0 –cpu-method fft –cpu-load N –cache 4，并改变控制整体 CPU 利用率的 N。表 2 表明，系统负载会显著影响性能，但泄露仍然可行。CPU 利用率为 50% 时，吞吐率从基线 6.382 bps 降到 0.220 bps。减速的主要来源是到达首个区域的时间 O_t(1)，从 1176.32 毫秒大幅增至 22562.82 毫秒。",
    "type": "text"
  },
  {
    "id": "p09-05",
    "page": 9,
    "en": "Phoronix Test Suite Noise.We further evaluate LeakyTree under realistic system workloads using benchmarks from the Phoronix Test Suite. The results in Table 2 show that the slowdown is less pronounced compared to synthetic noise. This behavior is primarily due to the dynamic nature of real workloads, which involve frequent context switches and fluctuating resource utilization. For example, during workloads such as the Linux kernel compilation (pts/build-linux-kernel), we observe short periods of reduced system load during which LeakyTree achieves temporary higher leakage rates. Overall, we observe that LeakyTree adapts to varying system conditions and leaks in short bursts when pressure is reduced—even for very short slices—and both the attacker process andksmdobtain CPU time.",
    "zh": "### Phoronix Test Suite 噪声\n进一步用 Phoronix 测试套件的基准模拟真实负载。表 2 显示，与合成噪声相比，减速没有那么明显。主要原因是真实负载动态变化，包含频繁上下文切换与波动的资源占用。例如编译 Linux 内核（pts/build-linux-kernel）时，出现短暂的低负载时期，LeakyTree 在其中可达到暂时较高的速率。总体上，它能适应系统变化：一旦压力降低，哪怕时间片很短，只要攻击进程和 ksmd 都获得 CPU 时间，就可以短促地突发泄露。",
    "type": "text"
  },
  {
    "id": "p09-06",
    "page": 9,
    "en": "Table 3: LeakyTree evaluation results across different Linux kernel versions from5.15to6.18. Kernel Scenario LeakyTree Leakage Version𝐾 𝑠ℎ 𝐾𝑢𝑛 smart𝑂Variant𝑂 𝑡(1)𝑂 𝑚 𝑂𝑠 Rollb.bps (ms) 5.15.202 105 105 − 1 base 1062.90 0 0 0 0.924 5.15.20210 5 105 −4base1082.07 0 1 2 2.985 6.1.167 105 105 − 1 base 1077.40 0 0 0 0.906 6.1.16710 5 105 −4base1404.92 0 1 0 2.652 6.6.133 105 105 − 1 base 1083.59 0 0 0 0.902 6.6.13310 5 105 −4base1057.86 0 0 1 3.296 6.12.80 105 105 × 1 base 1890.98 0 0 0 0.518 6.12.8010 5 105 ✓1base10755.27 0 0 0 0.009 6.12.80 105 105 ✓ 1 base+F1 1456.54 0 2 0 0.648 6.12.8010 5 105 ✓4base+F16472.00 7 1 0 0.147 6.12.80 105 105 ✓ 4 base+F1+F2 1441.00 0 0 0 1.300 6.18.2110 5 105 ✓1base+F1+F21279.22 1 0 0 0.642 6.18.21 105 105 ✓ 4 base+F1+F2 1529.11 0 0 0 1.147",
    "zh": "### 表 3：不同 Linux 内核的评估\nLinux 5.15 至 6.18 内核的完整结果保留于原表。表头：Kernel Version＝内核版本；Scenario＝场景；K_sh／K_un＝稳定／不稳定树大小；smart＝smart_scan 状态；O＝区域数；Variant＝变体；base＝基础版本；F1、F2＝文中适配；O_t(1)＝首区域耗时，毫秒；O_m／O_s＝未命中／跳过；Rollb.＝回滚次数；bps＝位／秒。✓＝开启；×＝关闭；−＝该项不适用。\n13 行吞吐率依次为 0.924、2.985、0.906、2.652、0.902、3.296、0.518、0.009、0.648、0.147、1.300、0.642、1.147 bps。所有内核版本、参数与其他数值均保留在原图中。",
    "type": "visual"
  },
  {
    "id": "p09-07",
    "page": 9,
    "en": "5.3 Multiple Kernels We evaluate the behavior of LeakyTree across five Linux kernel long-termversions, ranging from 5.15 to6.18. For each kernel, we replicate the performance evaluation setup described in Section 5.1 and execute the attack with𝑂= 1and 𝑂= 4. We further evaluate the impact of KSM’ssmart_scanfeature on newer kernels.",
    "zh": "### 5.3 多种内核\n我们评估五个 Linux 长期支持内核版本，覆盖 5.15 至 6.18。对每个内核，复现 5.1 节设置，分别以 O＝1、O＝4 执行攻击，并评估新内核 smart_scan 特性的影响。",
    "type": "text"
  },
  {
    "id": "p09-08",
    "page": 9,
    "en": "Table 3 presents the obtained results. Kernels5.15,6.1, and6.6 present consistent behavior with past evaluations. The baseline configuration (𝑂= 1) yields stable leakage rates around 0.924 bps, while increasing the number of oracle regions to𝑂= 4improves throughput approximately by the rate of𝑂. Starting from kernel 6.12, we observe a substantial degradation in performance, bisected to the commits 5e924ff54d08 [59] andd58a361b0350 [7]. These changes are not intended as defenses against LeakyTree. However, they introduce artifacts in KSM’s behavior that affect how LeakyTree interacts with the subsystem and therefore require minor adaptations of the attack. Therefore, we present the following tailored attack variants:",
    "zh": "表 3 给出结果。5.15、6.1、6.6 的行为与先前评估一致：基线 O＝1 的泄露率稳定在约 0.924 bps，增至 O＝4 后吞吐量约按 O 倍提升。从 6.12 开始，性能显著下降；二分定位到提交 5e924ff54d08 [59] 和 d58a361b0350 [7]。\n这些改动不是为防御 LeakyTree 而设计，但改变了 KSM 的行为，影响攻击与该子系统的交互，因此需要小幅适配。我们提出如下定制变体。",
    "type": "text"
  },
  {
    "id": "p09-09",
    "page": 9,
    "en": "Variant F1.Commit 5e924ff54d08 [59], introduced in Linux 6.7, introduces the default smart_scan heuristic in KSM, which skips pages that repeatedly fail to merge. As shown in Table 3, enablingsmart_scan on the base LeakyTree significantly degrades the throughput, as attacker VMAs are skipped after some scan cycles. To address this, we designed a lightweight variation of LeakyTree (F1), which bypasses thesmart_scan heuristic. We maintain two copies of the attacker-controlled VMA of LeakyTree’s third stage (see Section 4.3.1). While one VMA is actively used for leakage on the current KSM scan, the other gets marked as MADV_UNMERGEABLE, which removes the associated KSM metadata and resets the corresponding smart_scan counters. By alternating between the two VMAs, we partly regain the speed lost by smart_scan as attacker VMAs are not skipped due to the counter reset, recovering the original throughput, as shown in Table 3.",
    "zh": "### 变体 F1\nLinux 6.7 引入的提交 5e924ff54d08 [59] 为 KSM 增加默认启用的 smart_scan 启发式策略，跳过反复合并失败的页。表 3 显示，基础 LeakyTree 启用此策略后吞吐量明显下降，因为若干轮扫描后，攻击者 VMA 会被跳过。\n为此，我们设计轻量变体 F1，绕过 smart_scan 启发式。为第三阶段（见 4.3.1）维护两份攻击者 VMA：当前扫描用一份泄露时，另一份标记为 MADV_UNMERGEABLE，删除关联 KSM 元数据并重置 smart_scan 计数器。交替使用两份 VMA，借计数器重置避免被跳过，部分恢复被 smart_scan 消耗的速度，表 3 展示了吞吐率恢复情况。",
    "type": "text"
  },
  {
    "id": "p09-10",
    "page": 9,
    "en": "Variant F2.Commit d58a361b0350 [7], introduced in Linux6.12, modifies the KSM scan behavior to recompute and check the page hash value before performing a stable tree lookup. This change breaks LeakyTree configurations with𝑂> 1, as the result obtained",
    "zh": "### 变体 F2\nLinux 6.12 引入的提交 d58a361b0350 [7] 改变扫描流程：在稳定树查找之前重新计算并检查页面哈希。这会破坏 O > 1 的 LeakyTree 配置，因为——（下页续）。",
    "type": "text"
  },
  {
    "id": "p10-01",
    "page": 10,
    "en": "1000 2500 5000 10000 20000 350005000075000100000 0 50 100 1.585 bps 111.816 bps 68.159 bps 221.73 ms /sys/kernel/mm/ksm/pages_to_scan LeakyTree Throughput (bps) C1 (bps) C2 (bps) C1 (ms) C2 (ms) 0 0.2 0.4 0.6 0.8 1 ·104 Unlock𝑂 𝑡(1)(ms) Figure 6: Impact of pages_to_scan on LeakyTree throughput.",
    "zh": "### 图 6：扫描配置的影响\npages_to_scan 对 LeakyTree 吞吐率的影响。\n横轴：/sys/kernel/mm/ksm/pages_to_scan，每批扫描页数；左纵轴 LeakyTree Throughput (bps)＝吞吐率，位／秒；右纵轴 Unlock O_t(1) (ms)＝首区域产出耗时，毫秒；C1／C2 的 bps 曲线为吞吐率，ms 曲线为耗时。图中标注 1.585、111.816、68.159 bps 以及 221.73 ms，均是具体配置下的结果。",
    "type": "visual"
  },
  {
    "id": "p10-02",
    "page": 10,
    "en": "from oracle region𝑁 must be written into oracle region𝑁+ 1. Writing the required value alters the page contents and consequently its hash, preventing the modified page from being queried against the stable tree. To address this change, we designed a variant of LeakyTree (F2), which avoids runtime modifications of oracle regions. Instead, F2 precomputes combinations of candidate bits for each oracle region in advance. As a result, no dynamic writes are required during the attack, preserving the hash value and the stable tree query. This approach reduces the theoretical speedup of the multioracle technique from linear in𝑂 to log2(𝑂) . Our evaluations show how𝑂= 4with patches F1 and F2 on Linux 6.18 approximately doubled the speedup from the𝑂= 1, expected with the new log2 speedup.",
    "zh": "区域 N 得到的结果必须写入区域 N＋1。写入会改变页面内容及哈希，阻止修改页被用于查询稳定树。\n为适应该变化，F2 避免运行时修改判定器区域，而是提前为每个区域预计算候选位的各种组合。攻击中不再需要动态写入，因此保持哈希值与稳定树查询有效。这使多判定器技术的理论加速从关于 O 的线性关系降为 log₂(O)。在 Linux 6.18 上应用 F1、F2 的评估显示：O＝4 相比 O＝1 大致加速两倍，符合新的 log₂ 加速预期。",
    "type": "text"
  },
  {
    "id": "p10-03",
    "page": 10,
    "en": "5.4 KSM Configuration We evaluate how KSM’s scan configuration influences LeakyTree by varyingpages_to_scan under two configurations: C1, using the default sleep_milliseconds of200ms and C2, using a reduced sleep interval of100ms. For the environment and workload simulation, we use the same setup as in Section 5.1, with𝐾𝑠ℎ and𝐾𝑢𝑛 both set to10 4. Figure 6 visualizes the results. Aspages_to_scan increases, throughput improves, while the first oracle unlock time 𝑂𝑡(1)decreases accordingly. This highlights𝑂 𝑡(1)as the primary bottleneck of LeakyTree under different KSM configurations. In particular, lower scan budgets causeksmdto spend more time processing unrelated pages, increasing𝑂𝑡(1) and reducing throughput.",
    "zh": "### 5.4 KSM 配置\n我们改变 pages_to_scan，测试两种配置下扫描参数的影响：C1 使用默认的 200 毫秒休眠间隔，C2 缩短为 100 毫秒。环境与工作负载模拟和 5.1 节相同，K_sh、K_un 均为 10⁴。图 6 展示结果。随着 pages_to_scan 增加，吞吐率提高，而首区域耗时 O_t(1) 相应下降。这说明，在不同 KSM 配置下，O_t(1) 是主要瓶颈。扫描预算较小时，ksmd 花更多时间处理无关页，导致 O_t(1) 增加、吞吐率降低。",
    "type": "text"
  },
  {
    "id": "p10-04",
    "page": 10,
    "en": "Reducing sleep_millisecs (C2) consistently improves throughput by decreasing the wait time between pages_to_scan bursts. We observe occasional throughput drops, which are caused by temporal desynchronization between the attacker and theksmdthread. These effects can be easily mitigated by tuning LeakyTree with parameters correspondent to the current workload—i.e., faster scans, lower scans. However, we intentionally keep LeakyTree parameters fixed to ensure comparability across configurations.",
    "zh": "减小 sleep_millisecs（C2）会缩短各批扫描之间的等待，始终有助于提高吞吐量。偶发吞吐率下降来自攻击者与 ksmd 的暂时失同步。针对当前负载调整参数，例如适应更快或更慢的扫描，可以较容易缓解。不过，为保证配置间可比性，我们有意固定 LeakyTree 参数。",
    "type": "text"
  },
  {
    "id": "p10-05",
    "page": 10,
    "en": "6 Case Studies In this section, we present two case studies with threat models that arise in realistic workloads, where we apply LeakyTree from a fully unprivileged attack end-to-end scenario. First, we show how LeakyTree is used to leak pages between two processes. Second, we",
    "zh": "## 6 案例研究\n本节提出两个源于真实工作负载的威胁模型，从完全无特权的端到端攻击场景出发应用 LeakyTree。首先演示两个进程间的页面泄露；其次——（表 4 后续接下文）。",
    "type": "text"
  },
  {
    "id": "p10-06",
    "page": 10,
    "en": "Table 4: Case Studies Evaluation. Scenario LeakyTree Results Scenario𝐾 𝑠ℎ 𝐾𝑢𝑛 𝐼Target / LeakedThroughp. (bps) Process-to-Process (Section 6.1.3) S1-firefox 7782 8183 4 sourceURL=https://en.wikipedia. 2.737 S2-codex8857 97018You communicate reasoning expl7.011 S3-zsh/docker186 10412export STRIPE_SECRET_KEY=\"sk_l10.671 Guest-to-Guest (Section 6.2.3) S4-Ubuntu 398854 911811 0 root:x:0:0:root:/root:/bin/bas 4.282 S4-Ubuntu364494 10704364-----BEGIN CERTIFICATE-----\\nM0.858 S4-Ubuntu343325 10840966-----BEGIN EC PRIVATE KEY-----1.452 S5-Windows689360 13400333C:\\Windows\\Microsoft.NET\\Frame1.423 S5-Windows802844 10779690MicrosoftTelemetryAssertTrigge1.864 Guest-to-Host (Section 6.2.3) S6-Synthetic 153651 1552667 0 -----BEGIN RSA PRIVATE KEY----- 1.147",
    "zh": "### 表 4：案例评估\n完整数值与实际泄露片段见原表图。表头：Scenario＝场景；K_sh／K_un＝稳定／不稳定树大小；I＝插页指数；Target / Leaked＝目标／已泄露片段；Throughp.＝吞吐率，位／秒。\n进程到进程（6.1.3）：S1 Firefox 网页片段，2.737 bps；S2 Codex 提示片段，7.011 bps；S3 zsh／Docker 环境变量 API 密钥片段，10.671 bps。来宾到来宾（6.2.3）：S4 Ubuntu 的 passwd 条目，4.282 bps；证书，0.858 bps；EC 私钥材料，1.452 bps；S5 Windows 的 .NET 路径，1.423 bps；遥测片段，1.864 bps。来宾到宿主（6.2.3）：S6 合成 RSA 私钥目标，1.147 bps。\n原表内代码、路径、URL、密钥头部以及英文内容片段不翻译，以保持逐字对应；所有其他参数、片段与数值完整保留于原图。",
    "type": "visual"
  },
  {
    "id": "p10-07",
    "page": 10,
    "en": "show how we can alter the primitives and use LeakyTree to leak pages between two different virtual machine guests.",
    "zh": "演示如何调整原语，利用 LeakyTree 在两个不同虚拟机来宾之间泄露页面。",
    "type": "text"
  },
  {
    "id": "p10-08",
    "page": 10,
    "en": "Environment.We perform all case study evaluations on the same hardware and software configurations described in Section 5. To validate the correctness of the leaked page with LeakyTree, we employ a privileged kernel module that allows dumping the selected pages from the KSM stable tree on demand. The module requires a minimal kernel patch to export the necessary symbols for linking. Importantly, this instrumentation is solely used for validation and does not influence or interfere with the execution of LeakyTree or its evaluation.",
    "zh": "### 环境\n所有案例沿用第 5 节硬件和软件配置。为验证泄露页面的正确性，我们使用有特权内核模块，按需导出稳定树中选定页面。该模块需要最小内核补丁，导出链接所需符号。重要的是，这套插桩仅用于验证，不影响、不干扰 LeakyTree 的执行或评估。",
    "type": "text"
  },
  {
    "id": "p10-09",
    "page": 10,
    "en": "6.1 Cross-Process Leakage 6.1.1 Threat Model.We consider a Linux system with KSM enabled, where multiple privileged and unprivileged processes execute concurrently on the same host. The attacker controls an unprivileged process with no permissions beyond standard userlevel access and can interact with the host kernel through regular syscalls. The objective is to recover the contents of memory pages belonging to other processes on the system, including both privileged and unprivileged targets, without any direct interaction or communication. Victim pages are assumed to be subject to KSM deduplication, either explicitly or implicitly through common mechanisms. These include invoking madvise with MADV_MERGEABLE (e.g., in applications such as QEMU or Tensorflow [62]); enabling KSM via prctl with PR_SET_MEMORY_MERGE; inheriting mergeable properties through process forking; being part of asystemd service configured with MemoryKSM=y [14]; or system-wide configurations enforced by the administrator (e.g., viaLD_PRELOAD) [58].",
    "zh": "### 6.1 跨进程泄露\n#### 6.1.1 威胁模型\n考虑一个启用 KSM 的 Linux 系统，有特权与无特权进程在同一宿主上并发执行。攻击者控制一个无特权进程，仅具有普通用户权限，通过常规系统调用与宿主内核交互。目标是在没有直接交互或通信的情况下，恢复其他进程内存页的内容，包括有特权和无特权受害者。\n假设受害者页经由常见机制显式或隐式参与 KSM 去重，包括：以 MADV_MERGEABLE 调用 madvise，例如 QEMU、Tensorflow [62]；通过带 PR_SET_MEMORY_MERGE 的 prctl 启用 KSM；通过 fork 继承可合并属性；属于配置 MemoryKSM=y 的 systemd 服务 [14]；或管理员施加的全系统配置，例如 LD_PRELOAD [58]。",
    "type": "text"
  },
  {
    "id": "p10-10",
    "page": 10,
    "en": "6.1.2 Primitive Implementation.In the cross-process setting, all primitives of LeakyTree can be implemented directly from an unprivileged process using standard system interfaces. LeakyTree requires two main capabilities: interaction with KSM and the allocation of virtually contiguous memory. Interaction with KSM is necessary to mark pages as candidates for deduplication, while contiguous memory is required to ensure a predictable scanning order by KSM. Since the attacker can directly interact with the KSM-enabled kernel, marking pages for deduplication is straightforward and can be achieved through existing interfaces such as",
    "zh": "#### 6.1.2 原语实现\n跨进程时，LeakyTree 所有原语均可由无特权进程通过标准系统接口直接实现。主要需要两种能力：与 KSM 交互，以及分配虚拟地址连续的内存。前者用于把页面标为去重候选，后者用于保证 KSM 扫描顺序可预测。攻击者可直接与启用 KSM 的内核交互，因此标记很直接，可使用已有接口，例如——（下页续）。",
    "type": "text"
  },
  {
    "id": "p11-01",
    "page": 11,
    "en": "madvise or prctl. Allocating virtually contiguous memory is likewise a standard operation, which can be achieved using common interfaces (e.g., withmmap).",
    "zh": "madvise 或 prctl。分配虚拟地址连续的内存同样是标准操作，可以通过 mmap 等常见接口完成。",
    "type": "text"
  },
  {
    "id": "p11-02",
    "page": 11,
    "en": "6.1.3 Evaluation.We evaluate the cross-process case study on a KSM-enabled Linux system using the same hardware and software environment as described in Section 5.1. The attacker and victim run as independent processes on the same host, without any direct interaction. We consider multiple scenarios (S1-S3), each targeting a different victim process under memory deduplication, reflecting diverse scenarios. Table 4 presents the results. In scenario(S1), we target afirefoxprocess with Wikipedia open in two instances, manually enabling memory deduplication viaprctl. From a separate unprivileged process on the same host running LeakyTree, we successfully leak parts of the loaded webpage, recovering the visited URL fragment. In scenarios(S2,S3), we enableMemoryKSM=y on thesshdsystem service, activating deduplication forsshdand sshd-spawned processes (i.e.,sshclients). In(S2), we establish multiplesshsessions runningCodex, triggering deduplication of prompt data. Using LeakyTree, we recover fragments of the internal Codex gpt5.4 prompt from deduplicated pages. In(S3), we embed API secrets as environment variables in the shell configuration file and initiate multiplesshsessions. We then execute LeakyTree from an unprivileged Docker container without capabilities and successfully recover an API key from the host. Overall, we show that LeakyTree is able to leak both structured application data and bounded highentropy secrets without alignment primitives over the victim process, and within restricted cross-process scenarios (i.e., Docker).",
    "zh": "#### 6.1.3 评估\n在启用 KSM 的 Linux 系统上，沿用 5.1 节软硬件环境。攻击者与受害者作为同机独立进程运行，无直接交互。我们考虑 S1—S3 三种场景，分别针对不同的去重受害者进程，结果见表 4。\nS1：让 Firefox 的两个实例都打开维基百科，并手动通过 prctl 启用内存去重。另一个无特权进程运行 LeakyTree，成功泄露已加载网页的一部分，恢复访问 URL 的片段。\nS2、S3：对 sshd 系统服务启用 MemoryKSM=y，使 sshd 及其派生进程（即 ssh 客户端）参与去重。S2 建立多个运行 Codex 的 ssh 会话，触发提示数据去重；LeakyTree 从已去重页恢复了内部 Codex gpt5.4 提示的片段。S3 在 shell 配置文件中以环境变量写入 API 秘密，启动多个 ssh 会话；随后在没有 capabilities 的无特权 Docker 容器里运行 LeakyTree，成功恢复宿主的 API 密钥。\n总体而言，LeakyTree 无须对受害者进程拥有对齐原语，就能泄露结构化应用数据及有界高熵秘密，而且能在 Docker 等受限跨进程场景下工作。",
    "type": "text"
  },
  {
    "id": "p11-03",
    "page": 11,
    "en": "6.2 Cross-VM Leakage 6.2.1 Threat Model.We consider a cloud environment in which a Linux system acts as a hypervisor and enables memory deduplication via KSM to reduce overall memory consumption. As a hypervisor, multiple Virtual Machine (VM)s managed by QEMU share resources on the same physical host. The attacker has root privileges within its provisioned VM but has no code execution capabilities outside of it, and no direct interaction with other VMs. The goal of the attacker is to recover the contents of a high-entropy, non-guessable page residing in a separate victim VM. This threat model closely reflects realistic cloud environments and aligns with the threat model of prior KSM attacks from the VM [29, 61].",
    "zh": "### 6.2 跨虚拟机泄露\n#### 6.2.1 威胁模型\n考虑云环境：Linux 作为虚拟机监控器，通过 KSM 去重降低整体内存消耗。QEMU 管理的多台虚拟机共享同一物理主机资源。攻击者在自己获配的虚拟机内拥有 root 权限，但无法在该虚拟机之外执行代码，也不直接与其他虚拟机交互。目标是恢复另一台受害者虚拟机中高熵、不可猜测页面的内容。这与真实云环境接近，也与以往从虚拟机发起的 KSM 攻击威胁模型 [29, 61] 一致。",
    "type": "text"
  },
  {
    "id": "p11-04",
    "page": 11,
    "en": "6.2.2 Primitive Implementation.In the cross-VM case study, attackers face two additional challenges.First, they cannot directly interact with the host kernel and thus cannot explicitly mark pages as mergeable using themadvise syscall.Second, they cannot guarantee that memory allocated within the guest VM is laid out contiguously in the host, which is required for predictable KSM scanning behavior. To address these limitations, we rely on two mechanisms. We leverage QEMU’s default behavior to implicitly mark guest memory as mergeable, and we use guest privileges to allocate physically contiguous memory via the Contiguous Memory Allocator (CMA).",
    "zh": "#### 6.2.2 原语实现\n跨虚拟机时，多出两项挑战。第一，攻击者不能直接与宿主内核交互，因此无法显式用 madvise 将页标为可合并。第二，来宾内分配的内存不保证在宿主中连续，而可预测 KSM 扫描需要此条件。\n我们利用两种机制应对：借 QEMU 默认行为隐式地将来宾内存标记为可合并；利用来宾权限，通过连续内存分配器（CMA）分配物理连续内存。",
    "type": "text"
  },
  {
    "id": "p11-05",
    "page": 11,
    "en": "For the first limitation, although the attacker cannot invoke madvise on the host, QEMU defaults to marking all guest memory as MADV_MERGEABLE [52] by default. As a result, pages within the guest VM are automatically considered for deduplication by the host’s KSM subsystem. This provides an implicit implementation of the insertion primitive(P1): by carefully crafting page contents, the attacker can influence the host’s stable tree without requiring direct kernel interaction. Pages without a duplicate are processed each cycle as normally, enabling for a implicit query primitive(P2). For the second limitation, ensuring predictable scanning order requires that attacker-controlled pages appear contiguous from the host’s perspective, where KSM operates. Standard user space allocations inside the guest do not guarantee this property, as memory that is contiguous in the guest’s virtual address space may be fragmented in the host. In QEMU/KVM, guest memory is managed as RAM- Blocks backed by mmap allocation in the host process [ 53]. As a result, contiguity in the guest physical address space translates to contiguity in the host virtual address space within a given RAM- Block. Leveraging full control over the guest kernel, we allocate memory via the Contiguous Memory Allocator (CMA) [63], reserving a sufficiently large physically contiguous region at boot time. This ensures that attacker-controlled pages are virtually contiguous from the host’s perspective. Together, these techniques allow us to recover the required primitives for LeakyTree in the cross-VM setting despite the lack of direct interaction with the host kernel.",
    "zh": "针对第一项限制，虽然攻击者不能在宿主调用 madvise，但 QEMU 默认将全部来宾内存标为 MADV_MERGEABLE [52]。因此来宾页自动成为宿主 KSM 的去重候选。这隐式实现了 P1：精心构造页面内容，就能影响宿主稳定树，无须直接与内核交互。没有副本的页在每轮照常处理，从而也隐式提供 P2。\n针对第二项限制，必须让攻击者控制的页面在执行 KSM 的宿主视角连续，以保证扫描顺序。来宾用户态普通分配无法保证：来宾虚拟连续的内存，在宿主上可能碎片化。\nQEMU/KVM 把来宾内存作为 RAMBlock 管理，由宿主进程中的 mmap 分配支撑 [53]。因此，在给定 RAMBlock 内，来宾物理地址连续会转化为宿主虚拟地址连续。利用对来宾内核的完全控制，我们通过 CMA [63] 分配，在启动时预留足够大的物理连续区域，保证攻击者页面在宿主视角虚拟连续。两种技术结合，即使不直接与宿主内核交互，也能在跨虚拟机场景恢复 LeakyTree 所需原语。",
    "type": "text"
  },
  {
    "id": "p11-06",
    "page": 11,
    "en": "6.2.3 Evaluation.We evaluate the cross-VM case study using QEMU KVM virtual machines managed vialibvirt, following the same hardware and host software setup described in Section 5.1. The attacker is confined to a single guest VM and has no direct interaction with the host or any co-located VMs. We consider multiple scenarios (S4-S6) covering guest-to-guest and guest-to-host leakage. Table 4 presents the results. In scenario(S4)we start two Ubuntu 24.04 VMs: one corresponding to the victim and the other to the attacker. Without manually constructing victim pages, we recover sensitive system data that was naturally deduplicated by KSM, including /etc/passwd entries, as well as found private key material and certificates. In scenario(S5), we start two Windows 11 VMs acting as victims and one Ubuntu 24.04 VM as the attacker. We show that LeakyTree remains effective by leaking Windows-specific data such as.NET-related paths and internal telemetry-related logs. Finally, in scenario(S6), we target the host (hypervisor) on which we allocate a page twice and initialize it to an RSA private key. From within the attacker VM, we successfully recover the host-resident RSA key with no interaction. Overall, LeakyTree reliably leaks high-entropy data across VMs and host boundaries, breaking the isolation guarantees in virtualized environments with KSM.",
    "zh": "#### 6.2.3 评估\n使用 libvirt 管理的 QEMU/KVM 虚拟机，沿用 5.1 节硬件和宿主软件设置。攻击者被限制在单个来宾内，不与宿主或同机其他虚拟机直接交互。S4—S6 覆盖来宾到来宾及来宾到宿主，见表 4。\nS4：启动两台 Ubuntu 24.04 虚拟机，分别作为受害者与攻击者。没有人工构造受害者页，我们恢复了经 KSM 自然去重的敏感系统数据，包括 /etc/passwd 条目，以及找到的私钥材料和证书。\nS5：两台 Windows 11 虚拟机作为受害者，一台 Ubuntu 24.04 作为攻击者。LeakyTree 仍可泄露 Windows 特有数据，例如 .NET 相关路径和内部遥测日志。\nS6：以宿主（虚拟机监控器）为目标，在宿主上分配同一内容的两张页，并初始化为 RSA 私钥。攻击者从虚拟机内部、无直接交互地成功恢复了宿主 RSA 密钥。\n总体上，LeakyTree 能可靠地跨虚拟机和宿主边界泄露高熵数据，破坏启用 KSM 的虚拟化环境中的隔离保证。",
    "type": "text"
  },
  {
    "id": "p11-07",
    "page": 11,
    "en": "7 Discussion 7.1 Hardware Cache Side-Channel Primitive LeakyTree relies on an LLC-based cache side-channel primitive to detect whetherksmdaccessed selected deduplicated pages during stable tree queries. This side-channel primitive is used solely to probe the cache state and is not specific to the LeakyTree attack logic. Unlike prior cache attacks targeting shared memory, LeakyTree does not rely on pre-existing shared memory. Instead, ksmdmerges two previously separate anonymous pages with identical contents such that both map to the same physical page, thereby creating a shared-memory mapping. This allows LeakyTree to use established shared-memory LLC side-channel techniques such as Flush+Reload [69] or Flush+Flush [ 18] to observe accesses to",
    "zh": "## 7 讨论\n### 7.1 硬件缓存侧信道原语\nLeakyTree 依靠基于 LLC 的缓存侧信道，检测 ksmd 在稳定树查询中是否访问选定的已去重页。此原语仅探测缓存状态，并不专属于 LeakyTree 的攻击逻辑。\n与针对共享内存的先前缓存攻击不同，LeakyTree 不依赖预先存在的共享内存。ksmd 会把原本分离、内容相同的两张匿名页合并，使它们映射同一个物理页，因而创建共享映射。这就能使用 Flush+Reload [69]、Flush+Flush [18] 等已有的共享内存 LLC 侧信道，观测——（下页续）。",
    "type": "text"
  },
  {
    "id": "p12-01",
    "page": 12,
    "en": "attacker-selected oracle pages without assuming core co-location between the attacker andksmd. Our evaluation focuses on a system with an inclusive LLC, where the victim’s memory accesses are directly visible through the shared LLC. However, LeakyTree is not fundamentally restricted to inclusive LLCs. Specifically, prior work has shown that, even on systems with non-inclusive LLCs, core-private cache contents can be made observable through the shared LLC [51, 65, 68], suggesting LeakyTree could be adapted.",
    "zh": "攻击者选定的判定器页的访问，而不假设攻击者与 ksmd 在同一核心。我们的评估集中于包含式 LLC 系统，在其中受害者内存访问可直接经共享 LLC 看到。不过，LeakyTree 在原理上不局限于包含式 LLC。已有研究显示，在非包含式 LLC 系统中，也能使核心私有缓存的内容通过共享 LLC 可观测 [51, 65, 68]，说明 LeakyTree 可能适配这类系统。",
    "type": "text"
  },
  {
    "id": "p12-02",
    "page": 12,
    "en": "7.2 Related Work Memory-deduplication Attacks.Suzaki et al. [ 61] were the first to demonstrate a practical attack on deduplicated CoW KSM pages by measuring write-access timing differences. Their attack crafts 4 KB pages identical to victim pages and uses the resulting CoW timing differences to infer whether the victim VM is running specific programs or has cached particular files. Xiao et al. [67] introduced the first cross-VM covert channel based on write-latency variations of deduplicated pages. Similarly, Lindemann et al. [29] presented cross- VM software- and operating system version fingerprinting [44], and Kim et al. [26] a KASLR break on virtual machines. Subsequently, Gruss et al. [16] showed that page deduplication attacks can also be performed from sandboxed JavaScript, enabling application and website fingerprinting. These page-deduplication attacks generally require the attacker to craft a page identical to the victim page in order to trigger deduplication, which makes them most practical for coarse-grained, low-entropy fingerprinting tasks and difficult to apply to high-entropy targets such as cryptographic material. Subsequent work presented the first attacks recovering high-entropy victim data. In particular, Bosman et al. [5] demonstrated that an attacker with strong control over data alignment and padding, can leak high-entropy data byte-by-byte. Without the strong alignment and padding ability, the attack falls back to a birthday-paradox primitive that relies on extensive spraying and probabilistic collisions. Subsequently, Schwarzl et al. [56] demonstrated the first fully remote memory-deduplication attack, where an attacker infers deduplication events by timing HTTP requests. Similarly, their attack requires the strong assumption of attacker-controlled data alignment and padding, which they achieved by inserting attackercrafted queries into dedicated programs, such as a database system. Palfinger et al. [45] showed that CoW also introduces a side channel for modern file systems, thereby detecting files cross-VM in the cloud. Moreover, Bae et al. [3] proposed a KSM-based primitive that, unlike traditional CoW attacks [35, 61], does not require writing to the page. Their attack exploited KSM’s limit on shared pages per node in the stable-tree, meaning that once the limit is exceeded, KSM has to create a linked list of duplicate nodes. This serves as a gadget to determine whether a specific page is already present in the system, i.e., by observing if the list creation was triggered.",
    "zh": "### 7.2 相关工作\n### 内存去重攻击\nSuzaki 等人 [61] 最早通过写访问时间差，展示针对已去重 CoW KSM 页的实用攻击。他们构造与受害者相同的 4 KB 页面，利用 CoW 延迟判断受害虚拟机是否运行特定程序或缓存特定文件。Xiao 等人 [67] 首次利用去重页写延迟变化建立跨虚拟机隐蔽信道。类似地，Lindemann 等人 [29] 展示了跨虚拟机软件与操作系统版本指纹识别 [44]；Kim 等人 [26] 展示了虚拟机上的 KASLR 破解。随后，Gruss 等人 [16] 表明沙箱 JavaScript 也能实施页面去重攻击，识别应用与网站。\n这些攻击通常要构造与受害者完全相同的页面，才能触发去重，因此最适合粗粒度、低熵指纹识别，难以用于密码学材料等高熵目标。后续工作首次恢复了高熵受害者数据：Bosman 等人 [5] 表明，在能强力控制数据对齐和填充时，可逐字节泄露高熵数据。若没有这种能力，攻击就退回到依赖大量喷射和概率碰撞的生日悖论原语。\n随后，Schwarzl 等人 [56] 首次实现完全远程的内存去重攻击，通过 HTTP 请求耗时推断去重事件。同样，这要求攻击者可控制对齐和填充；他们通过向数据库等特定程序插入精心构造的查询实现这一点。Palfinger 等人 [45] 还说明现代文件系统的 CoW 会引入侧信道，能在云中跨虚拟机检测文件。\n此外，Bae 等人 [3] 提出的 KSM 原语与传统 CoW 攻击 [35, 61] 不同，不需要写页面。它利用稳定树节点共享页数量的上限：超过上限时，KSM 必须创建重复节点链表。通过观测是否触发链表创建，就能判断系统中是否已有特定页面。",
    "type": "text"
  },
  {
    "id": "p12-03",
    "page": 12,
    "en": "Overall, LeakyTree improves over prior memory-deduplication attacks by removing the need for exact page matching, or strong victim-memory alignment and padding control, thereby enabling practical bit-by-bit leakage of high-entropy pages.",
    "zh": "总之，LeakyTree 不再要求整页精确匹配，也不要求强力控制受害者内存对齐和填充，从而相对既有内存去重攻击，实现了高熵页面的实用逐位泄露。",
    "type": "text"
  },
  {
    "id": "p12-04",
    "page": 12,
    "en": "Cache Attacks.Cache attacks exploit observable effects caused by CPU caches [54], which temporarily store copies of data from main memory to reduce memory-access latency. A particularly important class of cache attacks observes timing differences caused by whether specific data is cached. A prominent subclass of these timing-based attacks relies on shared memory between attacker and victim. Flush+Reload [69] flushes target cache lines using a dedicated instruction such asclflush and detects subsequent victim memory accesses via timing differences. Evict+Reload [19] follows a similar concept but replaces the dedicated flush instruction with a cacheeviction strategy. Flush+Flush [18] exploits the timing variation of the flush instruction itself, depending on whether a victim memory is cached. Furthermore, techniques like Prime+Probe [22, 32, 43] do not require shared memory between the attacker and victim. However, cache attacks not relying on a shared-memory assumption often depend on reverse-engineering microarchitectural hash functions [15, 21, 33, 37, 70]. Although these attacks make weaker assumptions, they are more susceptible to noise and cache replacement policies [17]. Moreover, prior work has demonstrated cache attacks targeting Intel [69], ARM [30] and AMD [65] architectures.",
    "zh": "### 缓存攻击\n缓存攻击利用 CPU 缓存造成的可观测效应 [54]。缓存临时保存主存数据副本，以降低访问延迟。其中重要的一类攻击通过数据是否被缓存造成的时间差进行观测；一个主要子类依赖攻击者与受害者之间的共享内存。\nFlush+Reload [69] 使用 clflush 等专用指令清除目标缓存行，并通过时间差检测受害者后续访问。Evict+Reload [19] 思路类似，但以缓存驱逐策略代替专用清除指令。Flush+Flush [18] 利用清除指令本身耗时随目标是否在缓存中而变化的特性。Prime+Probe [22, 32, 43] 则不要求共享内存。\n然而，不依赖共享内存的缓存攻击往往需要逆向微架构哈希函数 [15, 21, 33, 37, 70]。尽管假设更弱，它们更易受噪声和缓存替换策略影响 [17]。已有研究也分别展示针对 Intel [69]、ARM [30]、AMD [65] 架构的缓存攻击。",
    "type": "text"
  },
  {
    "id": "p12-05",
    "page": 12,
    "en": "7.3 Real-world Applicability LeakyTree requires KSM to be enabled, target secrets to be deduplicated and boundable, and page-aligned memory. These conditions arise naturally, for example, cloned VMs such as workers in a build farm may load identical sshd server keys, or other secrets. File access can be done viammap, which aligns the secrets to the page, satisfying LeakyTree’s requirement. During our evaluation, we found the sshd scenario naturally and recoveredsshd’s key material. Furthermore, KSM remains enabled in production platforms, for example, Proxmox Virtual Environment (Proxmox VE) activates KSM by default with ksmtuned. Hence, LeakyTree is not limtied to attacker-constructed secrets or synthetic victim workloads.",
    "zh": "### 7.3 现实适用性\nLeakyTree 要求 KSM 开启、秘密已经去重且可被取值范围界定，以及页面对齐的内存。这些条件可能自然出现。例如，构建农场中的克隆工作虚拟机可能加载相同 sshd 服务器密钥或其他秘密。通过 mmap 访问文件会把秘密按页对齐，满足要求。在评估中，我们自然遇到 sshd 场景，并恢复了其密钥材料。此外，KSM 仍在生产平台启用，例如 Proxmox VE 默认通过 ksmtuned 激活。因此，LeakyTree 并不局限于攻击者人工构造的秘密或合成受害者负载。",
    "type": "text"
  },
  {
    "id": "p12-06",
    "page": 12,
    "en": "7.4 Limitations and Future Work Broadening the Leakable Pages.This work focuses on the leakage of already deduplicated pages by the Linux KSM mechanism. This implies that the attack targets pages residing in the stable tree, the red-black tree holding deduplicated pages. However, the primitives constructed for the attack do not rely on any special feature or behavior from the stable tree. Used primitives could be constructed to also target the unstable tree, allowing the leakage of pages that have not been deduplicated yet. Due to the corruptible nature of the unstable tree, we expect this variant to be noisier, possibly slowing down overall performance, or requiring additional filtering.",
    "zh": "### 7.4 局限与未来工作\n### 扩大可泄露页面范围\n本工作聚焦 Linux KSM 已去重页面，即位于保存去重页面的红黑稳定树中的页。然而，攻击原语并不依赖稳定树特有的功能或行为，也可能被构造成针对不稳定树，从而泄露尚未去重的页面。由于不稳定树容易失序，我们预期此变体噪声更高，可能减慢整体性能，或需要额外过滤。",
    "type": "text"
  },
  {
    "id": "p12-07",
    "page": 12,
    "en": "Defenses.In the past, defenses against memory deduplication attacks have been proposed [1, 28, 41]. For instance, VUSion [41] protects against merge-based and unmerge-based attacks, and FakeDD [28] modifies KSM’s logic to remove the unstable tree, eliminating the CoW side channel. However, we believe the most effective mitigation for LeakyTree would be to modify KSM’s internals so that it hashes page contents rather than comparing each page’s contents directly. A similar change was previously discussed within the Linux community [24, 25], but they ultimately chose to use the current approach, leveraging two separate red-black trees instead of a hash table. Note that this decision has been partly influenced by a VMWare patent [64]—now expired— covering an algorithm that uses hash values to identify identical pages in the system.",
    "zh": "### 防御\n此前已有针对内存去重攻击的防御 [1, 28, 41]。例如 VUSion [41] 防御基于合并与解除合并的攻击；FakeDD [28] 修改 KSM 逻辑，移除不稳定树，以消除 CoW 侧信道。\n不过，我们认为对 LeakyTree 最有效的缓解，是修改 KSM 内部机制：使用页面内容的哈希，而不是直接逐页比较明文内容。Linux 社区此前讨论过类似改动 [24, 25]，但最终选择当前方案，使用两棵独立红黑树而非哈希表。该决定部分受到 VMware 专利 [64] 影响；专利覆盖利用哈希值识别相同页面的算法，如今已经到期。",
    "type": "text"
  },
  {
    "id": "p13-01",
    "page": 13,
    "en": "8 Conclusion This paper presented LeakyTree, a novel side-channel attack on the Linux KSM [2, 23, 55] memory deduplication mechanism. LeakyTree enables practical bit-by-bit leakage of high-entropy deduplicated pages from an unprivileged context without memory alignment primitives over the victim memory. At its core, the attack massages KSM’s red-black trees to trigger deduplication of attackercontrolled pages and subsequently exploits tree-ordering properties to infer layout information through a CPU cache side channel. This procedure allows LeakyTree to leak victim memory bit by bit, exploiting the page comparison of KSM upon tree traversal.",
    "zh": "## 8 结论\n本文提出针对 Linux KSM [2, 23, 55] 的新型侧信道攻击 LeakyTree。它可从无特权环境中，实用地逐位泄露高熵已去重页，而不需要对受害者内存具备对齐原语。\n核心是整理 KSM 红黑树，触发攻击者页去重；随后结合排序性质和 CPU 缓存侧信道推断布局信息；最后利用树遍历中的页面比较，逐位泄露受害者内存。",
    "type": "text"
  },
  {
    "id": "p13-02",
    "page": 13,
    "en": "Compared with previous memory deduplication research, this paper presented an alternative attack that does not rely on thecopyon-writededuplication behavior. We presented an approach that does not require an identical copy of the page to trigger the leakage, reducing the leakage complexity from𝑂( 2𝑛) to𝑂(𝑛) . Furthermore, we showcase LeakyTree’s efficacy for cross-process and cross-VM leakage of secret (high-entropy) data, such as ECC and RSA private keys as well as API tokens, at rates of up to 30 bits per second.",
    "zh": "相较既有内存去重研究，本文提供一种不依赖去重的写时复制行为的替代攻击。该方法无需拥有目标页的完全相同副本即可触发泄露，把复杂度从 O(2ⁿ) 降到 O(n)。此外，我们展示跨进程、跨虚拟机泄露 ECC、RSA 私钥和 API 令牌等高熵秘密的有效性，速率最高约每秒 30 位。",
    "type": "text"
  },
  {
    "id": "p13-03",
    "page": 13,
    "en": "We demonstrated the leakage of high-entropy pages from the Linux KSM mechanism in different scenarios, motivating the reevaluation of KSM in shared computing environments.",
    "zh": "我们在不同场景中展示 Linux KSM 高熵页面泄露，说明有必要重新评估在共享计算环境中使用 KSM 的安全性。",
    "type": "text"
  },
  {
    "id": "p13-04",
    "page": 13,
    "en": "Acknowledgments We thank the anonymous reviewers and the Shepherd for their valuable feedback that improved this work. This project has received funding from the Austrian Research Promotion Agency (FFG) via the CREIS project (FFG grant number 926841), and from the Austrian Science Fund (FWF) via the SFB project SPyCoDe (10.55776/F85).",
    "zh": "## 致谢\n感谢匿名审稿人和论文指导审稿人（Shepherd）的宝贵反馈，帮助改进本工作。本项目获得奥地利研究促进署（FFG）的 CREIS 项目资助，编号 926841，以及奥地利科学基金（FWF）SFB 项目 SPyCoDe 资助，标识 10.55776/F85。",
    "type": "text"
  },
  {
    "id": "p13-05",
    "page": 13,
    "en": "References [1] Abdullah Albalawi, Vassilios Vassilakis, and Radu Calinescu. 2021. Memory deduplication as a protective factor in virtualized systems. InACNS. [2] Andrea Arcangeli, Izik Eidus, and Chris Wright. 2009. Increasing memory density by using KSM. InLinux Symposium. [3] Seungyeon Bae, Taehun Kim, Woomin Lee, and Youngjoo Shin. 2023. Exploiting Memory Page Management in KSM for Remote Memory Deduplication Attack. InInternational Conference on Information Security Applications. [4] Juan Besa and Yadran Eterovic. 2013. A concurrent red–black tree.J. Parallel and Distrib. Comput.73, 4 (2013), 434–449. [5] Erik Bosman, Kaveh Razavi, Herbert Bos, and Cristiano Giuffrida. 2016. Dedup Est Machina: Memory Deduplication as an Advanced Exploitation Vector. In S&P. [6] Russell A Brown. 2025. Comparative Performance of the AVL Tree and Three Variants of the Red-Black Tree.Software: Practice and Experience55, 9 (2025), 1607–1615. [7] Chengming Zhou. 2024. mm/ksm: don’t waste time searching stable tree for fast changing page. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/ linux.git/commit?id=d58a361b0350128bf5a5cf47773edaedbb6ea838. Accessed: 2026-04-16. [8] Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. 2022. Introduction to algorithms. MIT press. [9] Peter J. Denning. 2005. The Locality Principle.Commun. ACM48, 7 (2005), 19–24. [10] Peter J. Denning and Stuart C. Schwartz. 1972. Properties of the Working-Set Model.Commun. ACM15, 3 (1972), 191–198. [11] Ulrich Drepper. 2007.What Every Programmer Should Know About Memory. Technical Report. [12] Jake Edge. 2013. Kernel address space layout randomization. https://lwn.net/ Articles/569635/ [13] Agner Fog. 2022.The Microarchitecture of Intel, AMD and via CPUs: An optimization guide for assembly programmers and compiler makers. Technical Report. [14] Freedesktop. 2026. systemd.exec manpage. https://www.freedesktop.org/ software/systemd/man/latest/systemd.exec.html Accessed: 2026-04-29. [15] Lukas Gerlach, Simon Schwarz, Nicolas Faroß, and Michael Schwarz. 2024. Efficient and generic microarchitectural hash-function recovery. InSP. [16] Daniel Gruss, David Bidner, and Stefan Mangard. 2015. Practical Memory Deduplication Attacks in Sandboxed JavaScript. InESORICS. [17] Daniel Gruss, Clémentine Maurice, and Stefan Mangard. 2016. Rowhammer.js: A Remote Software-Induced Fault Attack in JavaScript. InDIMV A. [18] Daniel Gruss, Clémentine Maurice, Klaus Wagner, and Stefan Mangard. 2016. Flush+Flush: A Fast and Stealthy Cache Attack. InDIMV A. [19] Daniel Gruss, Raphael Spreitzer, and Stefan Mangard. 2015. Cache Template Attacks: Automating Attacks on Inclusive Last-Level Caches. InUSENIX Security. [20] John L. Hennessy and David A. Patterson. 2012.Computer Architecture - A Quantitative Approach, 5th Edition. Morgan Kaufmann. [21] Mehmet Sinan Inci, Berk Gulmezoglu, Gorka Irazoqui, Thomas Eisenbarth, and Berk Sunar. 2016. Cache Attacks Enable Bulk Key Recovery on the Cloud. In CHES. [22] Gorka Irazoqui, Thomas Eisenbarth, and Berk Sunar. 2015. S$A: A Shared Cache Attack that Works Across Cores and Defies VM Sandboxing – and its Application to AES. InS&P. [23] Izik Eidus, Hugh Dickins. 2009. Kernel Samepage Merging. https://docs.kernel. org/admin-guide/mm/ksm.html. Accessed: 2026-03-31. [24] Jonathan Corbet. 2009. KSM tries again. https://lwn.net/Articles/330589/. Accessed: 2026-03-31. [25] Jonathan Corbet. 2023. Process-level kernel samepage merging control. https: //lwn.net/Articles/928510/. Accessed: 2026-03-31. [26] Taehun Kim, Taehyun Kim, and Youngjoo Shin. 2021. Breaking KASLR Using Memory Deduplication in Virtualized Environments.Electronics10, 17 (2021). [27] Jongmin Lee and Soontae Kim. 2012. Adopting TLB Index-based Tagging to Data Caches for Tag Energy Reduction. InISLPED. [28] Jens Lindemann. 2024. Faking deduplication to prevent timing side-channel attacks on memory deduplication. InACSAC. [29] Jens Lindemann and Mathias Fischer. 2018. A Memory-Deduplication Side- Channel Attack to Detect Applications in Co-Resident Virtual Machines. In Symposium on Applied Computing. [30] Moritz Lipp, Daniel Gruss, Raphael Spreitzer, Clémentine Maurice, and Stefan Mangard. 2016. ARMageddon: Cache Attacks on Mobile Devices. InUSENIX Security. [31] Moritz Lipp, Vedad Hadzic, Michael Schwarz, Arthur Perais, Clémentine Maurice, and Daniel Gruss. 2020. Take A Way: Exploring the Security Implications of AMD’s Cache Way Predictors. InASIACCS. [32] Fangfei Liu, Yuval Yarom, Qian Ge, Gernot Heiser, and Ruby B. Lee. 2015. Last- Level Cache Side-Channel Attacks are Practical. InS&P. [33] Clémentine Maurice, Christoph Neumann, Olivier Heen, and Aurélien Francillon. 2015. C5: Cross-Cores Cache Covert Channel. InDIMV A. [34] Clémentine Maurice, Nicolas Scouarnec, Christoph Neumann, Olivier Heen, and Aurélien Francillon. 2015. Reverse Engineering Intel Last-Level Cache Complex Addressing Using Performance Counters. InRAID. [35] Grzegorz Miłós, Derek G Murray, Steven Hand, and Michael A Fetterman. 2009. Satori: Enlightened page sharing. InProceedings of the 2009 conference on USENIX Annual technical conference. [36] Baker Mohammad. 2014.Embedded Memory Design for Multi-Core and Systems on Chip. Vol. 116. Springer. [37] Bradley Morgan, Gal Horowitz, Sioli O’Connell, Stephan van Schaik, Chitchanok Chuengsatiansup, Daniel Genkin, Olaf Maennel, Paul Montague, Eyal Ronen, and Yuval Yarom. 2025. Slice+ slice baby: Generating last-level cache eviction sets in the blink of an eye. InSP. IEEE. [38] Sourav Mukhopadhyay. 2020. Red-black Trees, Rotations, Insertions, Deletions. https://web.archive.org/web/20250527123427/http://www.facweb.iitkgp. ac.in/~sourav/Lecture-10.pdf [39] Vijay Nagarajan, Daniel J. Sorin, Mark D. Hill, and David A. Wood. 2020.A Primer on Memory Consistency and Cache Coherence, Second Edition. [40] Linux Newbies. 2009. Linux 2.6.32 Prominent Features. https://kernelnewbies.org/Linux_2_6_32. [41] Marco Oliverio, Kaveh Razavi, Herbert Bos, and Cristiano Giuffrida. 2017. Secure Page Fusion with VUsion. InProceedings of the 26th Symposium on Operating Systems Principles. [42] Oracle. 2026. Distribution Kernel Configs. https://oracle.github.io/kconfigs/ ?config=UTS_RELEASE&config=KSM Accessed: 2026-04-27. [43] Dag Arne Osvik, Adi Shamir, and Eran Tromer. 2006. Cache Attacks and Countermeasures: the Case of AES. InCT-RSA. [44] Rodney Owens and Weichao Wang. 2011. Non-interactive OS fingerprinting through memory de-duplication technique in virtual machines. InIPCCC. [45] Gerald Palfinger, Bernd Prünster, and Dominik Ziegler. 2019. Prying CoW: Inferring Secrets across Virtual Machine Boundaries. InICETE. [46] Luciano Patrão. 2024.VMware vSphere essentials: A practical approach to vSphere deployment and management. Springer Nature. [47] David A. Patterson and John L. Hennessy. 2012.Computer Organization and Design - The Hardware / Software Interface (Revised 4th Edition). Academic Press. [48] Phoronix. 2022. Phoronix Test Suite. https://www.phoronix-test-suite.com/",
    "zh": "## 参考文献 [1]—[48]\n以下参考文献保留原文书目信息、作者、标题、编号和链接，未逐条翻译，便于检索；[49]—[72] 见下一页。完整的 72 项参考文献均收录在本译稿中。",
    "type": "references"
  },
  {
    "id": "p14-01",
    "page": 14,
    "en": "[49] Proxmox. 2026. Open Source in Hospital Operations: University Hospital Essen relies on Proxmox VE. https://www.proxmox.com/en/about/about-us/stories/ story/ume Accessed: 2026-08-06. [50] Proxmox. 2026. Proxmox Virtual Environment 9.2 with Dynamic Load Balancer released. https://www.proxmox.com/en/about/company-details/press-releases/ proxmox-virtual-environment-9-2 Accessed: 2026-08-06. [51] Antoon Purnal, Furkan Turan, and Ingrid Verbauwhede. 2022. Double Trouble: Combined Heterogeneous Attacks on Non-Inclusive Cache Hierarchies. In USENIX Security. [52] QEMU. 2026. QEMU Source Code - Merging. https://github.com/qemu/qemu/ blob/45cad8beca3ad75ebe63a36fdc60c98395fd2df1/system/physmem.c#L2015 Accessed: 2026-04-14. [53] QEMU. 2026. QEMU Source Code - mmap. https://github.com/qemu/qemu/blob/ 759c456b1d22fe4083c8b384da27d3f56fd53f82/util/oslib-posix.c#L215 Accessed: 2026-04-30. [54] Fabian Rauscher, Carina Fiedler, Andreas Kogler, and Daniel Gruss. 2025. A Systematic Evaluation of Novel and Existing Cache Side Channels. InNDSS. [55] Red Hat. 2017.Red Hat Enterprise Linux 7 - Virtualization Tuning and Optimization Guide. [56] Martin Schwarzl, Erik Kraft, Moritz Lipp, and Daniel Gruss. 2022. Remote Page Deduplication Attacks. InNDSS. [57] Furquan Shaikh, Fangzhou Yao, Indranil Gupta, and Roy H Campbell. 2014. Vmdedup: Memory de-duplication in hypervisor. In2014 IEEE International Conference on Cloud Engineering. [58] Stefan Roesch. 2023. Kernel Samepage Merging (KSM) at Meta and Future Improvements to KSM. https://lpc.events/event/17/contributions/1625/ attachments/1320/2649/KSM.pdf Accessed: 2026-08-06. [59] Stefan Roesch. 2023. mm/ksm: add \"smart\" page scanning mode. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id= 5e924ff54d088828794d9f1a4d5bf17808f7270e. Accessed: 2026-04-14. [60] David Suggs, Mahesh Subramony, and Dan Bouvier. 2020. The AMD \"Zen 2\" Processor.IEEE Micro40 (2020), 45–52. [61] Kuniyasu Suzaki, Kengo Iijima, Toshiki Yagi, and Cyrille Artho. 2011. Memory Deduplication as a Threat to the Guest OS. InEuroSys. [62] Tensorflow. 2026. Tensorflow - OpData4Bit Struct. https://github.com/ tensorflow/tensorflow/blob/e688ea02af5ba6bf08da1e27538a6802e8baa026/ tensorflow/lite/kernels/internal/optimized/fully_connected_4bit.h#L78 Accessed: 2026-04-29. [63] Toradex. 2026. Contiguous Memory Allocator - CMA (Linux). https: //developer.toradex.com/software/linux-resources/linux-features/contiguousmemory-allocator-cma-linux/ Accessed: 2026-04-30. [64] Carl A Waldspurger. 2004. Content-based, transparent sharing of memory units. US Patent 6,789,156. [65] Han Wang, Ming Tang, Quancheng Wang, Ke Xu, and Yinqian Zhang. 2025. Zen- Leak: Practical Last-Level Cache Side-Channel Attacks on AMD Zen Processors. InDAC. [66] Jun Xiao, Andy D Pimentel, and Xu Liu. 2019. CPpf: A prefetch aware LLC partitioning approach. InInternational Conference on Parallel Processing. [67] Jidong Xiao, Zhang Xu, Hai Huang, and Haining Wang. 2013. Security implications of memory deduplication in a virtualized environment. InInternational Conference on Dependable Systems and Networks (DSN). [68] Mengjia Yan, Read Sprabery, Bhargava Gopireddy, Christopher Fletcher, Roy Campbell, and Josep Torrellas. 2019. Attack directories, not caches: Side channel attacks in a non-inclusive world. InS&P. [69] Yuval Yarom and Katrina Falkner. 2014. Flush+Reload: a High Resolution, Low Noise, L3 Cache Side-Channel Attack. InUSENIX Security. [70] Yuval Yarom, Qian Ge, Fangfei Liu, Ruby B. Lee, and Gernot Heiser. 2015. Mapping the Intel Last-Level Cache.Cryptology ePrint Archive, Report 2015/905(2015). [71] Pavel Yosifovich, Alex Ionescu, Mark E Russinovich, and David A Solomon. 2017. Windows Internals: System architecture, processes, threads, memory management, and more, Part 1. Microsoft Press. [72] Tianhao Zheng, Haishan Zhu, and Mattan Erez. 2018. SIPT: Speculatively Indexed, Physically Tagged Caches. InHPCA.",
    "zh": "## 参考文献 [49]—[72]\n以下继续保留原文书目信息，不作中文翻译。",
    "type": "references"
  },
  {
    "id": "p14-02",
    "page": 14,
    "en": "A Ethical Considerations We disclosed our findings to the Linux Kernel Security Team on May 8, 2026, including a copy of this article. On May 9, 2026, we received an initial response that interpreted our report as a proposal for a KSM defense rather than as the disclosure of an attack. We clarified the nature of our initial report on May 15, 2026. However, as of August 2026, we had not received a further response.",
    "zh": "## 附录 A：伦理考量\n我们于 2026 年 5 月 8 日向 Linux 内核安全团队披露发现，并附上本文副本。5 月 9 日收到初步答复，但对方将报告理解为 KSM 防御建议，而不是攻击披露。我们于 5 月 15 日澄清了初始报告的性质。然而，截至 2026 年 8 月，尚未收到进一步答复。",
    "type": "text"
  },
  {
    "id": "p14-03",
    "page": 14,
    "en": "We reported LeakyTree to the Proxmox Security Team on July 3, 2026, due to their default use of KSM in Proxmox VE. Proxmox responded on July 4, 2026, indicating that it would reconsider enabling KSM by default in future Proxmox VE releases.",
    "zh": "由于 Proxmox VE 默认使用 KSM，我们于 2026 年 7 月 3 日向 Proxmox 安全团队报告 LeakyTree。Proxmox 于 7 月 4 日回应，表示将重新考虑未来版本是否继续默认开启 KSM。",
    "type": "text"
  },
  {
    "id": "p14-04",
    "page": 14,
    "en": "Finally, we contacted Andrea Arcangeli, who has prior experience developing downstream mitigations for KSM-related sidechannel attacks. Arcangeli provided us with a KSM kernel patch and asked us to assess its interaction with LeakyTree. The patch introduces a new KSM operating mode that restricts deduplication to zero-filled pages only. We concluded the new operating mode mitigates LeakyTree and previous KSM attacks, as KSM cannot process secret or private pages anymore. All other default and current operation modes remain vulnerable.",
    "zh": "最后，我们联系了有开发 KSM 相关侧信道下游缓解经验的 Andrea Arcangeli。他提供了一个 KSM 内核补丁，请我们评估与 LeakyTree 的交互。补丁引入一种新的运行模式，只允许全零页去重。\n我们认为，这一新模式可以缓解 LeakyTree 及此前 KSM 攻击，因为 KSM 不再处理秘密页或私有页。原文所述的其他默认及当时现有运行模式仍存在漏洞。",
    "type": "text"
  },
  {
    "id": "p14-05",
    "page": 14,
    "en": "B Open Science We are committed to making all artifacts required to reproduce the experimental results of this work available upon acceptance. Additionally, we include all the artifacts related to our submission in https://anonymous.4open.science/r/342950843895273495. Specifically, our artifact package includes a visual demonstration, in the form of a video, of the bit-by-bit leakage of a high-entropy RSA key, an API key, and OS internal memory on different scenarios. Additionally, we include the synthetic evaluation and proofs of concept for the cross-process and cross-VM leakage experiments.",
    "zh": "## 附录 B：开放科学\n我们承诺在论文录用后公开复现实验结果所需的全部材料。此外，与投稿有关的材料已放在 https://anonymous.4open.science/r/342950843895273495。\n具体而言，材料包包含视频演示，展示在不同场景下逐位泄露高熵 RSA 密钥、API 密钥以及操作系统内部内存。此外，还包含合成评估，以及跨进程、跨虚拟机泄露实验的概念验证。",
    "type": "text"
  }
]