arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.10719cs.CR
收藏

逆向工程 Apple M1 条件分支预测器以实现异位 Spectre 误训练

Reverse Engineering the Apple M1 Conditional Branch Predictor for Out-of-Place Spectre Mistraining

Adam Tuby, Adam Morrison

AI总结:

本文逆向分析 Apple M1 的 TAGE 类条件分支预测器,提出缩小搜索空间的 BPU 别名搜索方法,实现异位 Spectre v1 误训练并发现部分硬件缓解证据。

摘要:

利用 CPU 条件分支错误预测的 Spectre v1 信息泄露攻击,在已部署软件中仍未得到解决。某些 Spectre v1 gadget 只能通过异位误训练利用:攻击者通过训练一个在分支预测器单元(BPU)结构中与受害者分支别名的分支,从而控制受害者分支的预测,且可能来自另一个地址空间。然而,为受害者分支构造 BPU 别名十分困难。因此,实际的异位误训练攻击使用暴力搜索来随机实现别名。迄今为止,此类攻击仅在 Intel x86 CPU 上得到演示。本文探究 Apple M 系列 CPU 对实际异位 Spectre v1 误训练的脆弱性。我们表明,暴力异位误训练在 M1 上会失败。我们基于 Apple 专利假设 M1 CPU 使用一种 TAGE 条件分支预测器变体,并通过分析解释失败原因在于搜索空间大小。基于分析,我们设计了一种新的 BPU 别名搜索技术,可缩小搜索空间。该技术需要了解某些 M1 BPU 参数和机制,我们对此进行了逆向工程。我们还利用新获得的执行异位 Spectre v1 误训练的能力,测试 M1 CPU 是否实现了针对跨地址空间异位误训练的硬件缓解措施,并发现了存在部分缓解的证据。

英文摘要:

Spectre v1 information disclosure attacks, which exploit CPU conditional branch misprediction, remain unsolved in deployed software. Certain Spectre v1 gadgets can be exploited only by out-of-place mistraining, in which the attacker controls a victim branch's prediction, possibly from another address space, by training a branch that aliases with the victim in the branch predictor unit (BPU) structure. However, constructing a BPU-alias for a victim branch is hard. Consequently, practical out-of-place mistraining attacks use brute-force searches to randomly achieve aliasing. To date, such attacks have been demonstrated only on Intel x86 CPUs. This paper explores the vulnerability of Apple M-Series CPUs to practical out-of-place Spectre v1 mistraining. We show that brute-force out-of-place mistraining fails on the M1. We analytically explain the failure is due to the search space size, assuming (based on Apple patents) that the M1 CPU uses a variant of the TAGE conditional branch predictor. Based on our analysis, we design a new BPU-alias search technique with reduced search space. Our technique requires knowledge of certain M1 BPU parameters and mechanisms, which we reverse engineer. We also use our newfound ability to perform out-of-place Spectre v1 mistraining to test if the M1 CPU implements hardware mitigations against cross-address space out-of-place mistraining -- and find evidence for partial mitigations.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑