ret2spec:使用返回堆栈缓冲区的推测执行
ret2spec: Speculative Execution Using Return Stack Buffers
摘要:
推测性执行是一种优化技术,十多年来一直是CPU的一部分。它预测分支指令的结果和目标,以避免停止执行管道。然而,直到最近,推测性代码执行的安全含义还没有被研究。在本文中,我们研究了一种特殊类型的分支预测器,负责预测返回地址。据我们所知,我们是第一个研究返回地址预测器及其对现代软件安全性的影响的人。在我们的工作中,我们将展示如何返回堆栈缓冲区(RSBs),返回地址预测器的核心单元,可以用来触发误推测。基于这些知识,我们提出了两种新的攻击变种,使用RSBs,使攻击者具有与文件中的Spectre攻击类似的能力。我们展示了本地攻击者如何在进程间获得任意推测性代码执行,例如,泄露其他用户在共享系统上输入的密码。我们的评估表明,最近在操作系统中部署的Spectre对策也可以覆盖这种基于RSB的跨进程攻击。然而,我们证明,攻击者可以触发错误推测在JIT环境中,以泄漏任意内存内容的浏览器进程。使用JIT编译的代码在沙箱内存区域之外读取仍然可以达到平均80%的准确率。
英文摘要:
Speculative execution is an optimization technique that has been part of CPUs for over a decade. It predicts the outcome and target of branch instructions to avoid stalling the execution pipeline. However, until recently, the security implications of speculative code execution have not been studied. In this paper, we investigate a special type of branch predictor that is responsible for predicting return addresses. To the best of our knowledge, we are the first to study return address predictors and their consequences for the security of modern software. In our work, we show how return stack buffers (RSBs), the core unit of return address predictors, can be used to trigger misspeculations. Based on this knowledge, we propose two new attack variants using RSBs that give attackers similar capabilities as the documented Spectre attacks. We show how local attackers can gain arbitrary speculative code execution across processes, e.g., to leak passwords another user enters on a shared system. Our evaluation showed that the recent Spectre countermeasures deployed in operating systems can also cover such RSB-based cross-process attacks. Yet we then demonstrate that attackers can trigger misspeculation in JIT environments in order to leak arbitrary memory content of browser processes. Reading outside the sandboxed memory region with JIT-compiled code is still possible with 80\% accuracy on average.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。