Bypassing memory safety mechanisms through speculative control flow hijacks
Authors:
- 1 September 2021
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 633-649
Abstract
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.Keywords
All Related Versions
This publication has 23 references indexed in Scilit:
- ret2spec2018
- DAWG: A Defense Against Cache Timing Attacks in Speculative Execution Processors2018
- Jump over ASLR: Attacking branch predictors to bypass ASLR2016
- The Spy in the Sandbox2015
- Last-Level Cache Side-Channel Attacks are Practical2015
- Practical Timing Side Channel Attacks against Kernel Space ASLR2013
- SoK: Eternal War in Memory2013
- Return-Oriented ProgrammingACM Transactions on Information and System Security, 2012
- Memory Errors: The Past, the Present, and the Future2012
- On the effectiveness of address-space randomization2004