The prevalence of memory corruption bugs in the past decades resulted in numerous defenses, such as stack canaries, control flow integrity (CFI), and memory safe languages. These defenses can prevent entire classes of vulnerabilities, and help increase the security posture of a program. In this paper, we show that memory corruption defenses can be bypassed using speculative execution attacks. We study the cases of stack protectors, CFI, and bounds checks in Go, demonstrating under which conditions they can be bypassed by a form of speculative control flow hijack, relying on speculative or architectural overwrites of control flow data. Information is leaked by redirecting the speculative control flow of the victim to a gadget accessing secret data and acting as a side channel send. We also demonstrate, for the first time, that this can be achieved by stitching together multiple gadgets, in a speculative return-oriented programming attack. We discuss and implement software mitigations, showing moderate performance impact.
翻译:在过去几十年中,记忆腐败错误的流行导致大量防御,如堆叠金丝雀、控制流动完整性(CFI)和记忆安全语言等。这些防御可以防止整个类别的弱点,并有助于增强一个程序的安全态势。在本文中,我们表明记忆腐败防御可以用投机性执行攻击绕过。我们研究了堆叠保护者、CFI和Go的界限检查案例,表明在何种情况下他们可以被投机性控制流动的劫持所绕过,依靠投机性或建筑性地过度的控制流动数据。信息通过将受害人的投机性控制流动转向一个获取秘密数据的小工具,并作为侧道发送的方式被泄漏。我们还首次表明,在投机性回报性方案攻击中,可以通过缝合多个小工具来实现这一目标。我们讨论并实施软件减缓,显示适度的性能影响。