arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2107.09833cs.CRcs.AR
收藏

在投机世界中通过现代分支预测器泄露秘密

Leaking Secrets through Modern Branch Predictor in the Speculative World

Md Hafizul Islam Chowdhuryy, Fan Yao

摘要:

利用推测的瞬时执行攻击已经在计算机系统中引起了重大关注。通常,利用分支预测器来触发瞬态执行攻击中的误推测。在这项工作中,我们展示了一类新的投机为基础的攻击目标的分支预测单元(BPU)。我们发现,条件分支的投机性解析(即,在嵌套推测中)改变现代处理器中的模式历史表(PHT)的状态,这些状态在随后压缩相应的分支之后不会恢复。这种特性使得攻击者可以利用BPU作为瞬时执行攻击的秘密传输介质。为了评估发现的漏洞,我们构建了一个新的攻击框架BranchSpectre,通过观察推测性的PHT更新(以隐蔽和侧通道的形式)来实现意外秘密的泄露。我们进一步研究了基于历史的预测器中的PHT碰撞机制以及Intel处理器中的分支预测模式转换。基于这样的知识,我们实现了超高速隐蔽通道(BranchSpectre-cc)以及两个侧通道(即,BranchSpectre-v1和BranchSpectre-v2),其仅依赖于BPU用于推测域中的误推测触发和秘密推断。值得注意的是,BranchSpectre侧通道可以利用比Spectre攻击中使用的更简单的代码模式。我们提出了一个广泛的BranchSpectre代码小工具分析一组流行的现实世界的应用程序代码库,然后在OpenSSL上演示现实世界的侧信道攻击。评估结果表明,大量的更广泛的存在和更高的利用BranchSpectre代码模式在现实世界的软件。最后,我们讨论了几个安全的分支预测机制,可以减轻瞬态执行攻击,利用现代分支预测。

英文摘要:

Transient execution attacks that exploit speculation have raised significant concerns in computer systems. Typically, branch predictors are leveraged to trigger mis-speculation in transient execution attacks. In this work, we demonstrate a new class of speculation-based attack that targets branch prediction unit (BPU). We find that speculative resolution of conditional branches (i.e., in nested speculation) alter the states of pattern history table (PHT) in modern processors, which are not restored after the corresponding branches are later squashed. Such characteristic allows attackers to exploit BPU as the secret transmitting medium in transient execution attacks. To evaluate the discovered vulnerability, we build a novel attack framework, BranchSpectre, that enables exfiltration of unintended secrets through observing speculative PHT updates (in the form of covert and side channels). We further investigate PHT collision mechanism in the history-based predictor as well as the branch prediction mode transitions in Intel processors. Built upon such knowledge, we implement an ultra high-speed covert channel (BranchSpectre-cc) as well as two side channels (i.e., BranchSpectre-v1 and BranchSpectre-v2) that merely rely on BPU for mis-speculation trigger and secret inference in the speculative domain. Notably, BranchSpectre side channels can take advantage of much simpler code patterns than the ones used in Spectre attacks. We present an extensive BranchSpectre code gadget analysis on a set of popular real-world application code bases followed by a demonstration of real-world side channel attack on OpenSSL. The evaluation results show substantial wider existence and higher exploitability of BranchSpectre code patterns in real-world software. Finally, we discuss several secure branch prediction mechanisms that can mitigate transient execution attacks exploiting modern branch predictors.

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

↑