Oreo : Protecting ASLR Against Microarchitectural Attacks (Extended Version)

Shixin Song, Joseph Zhang, Mengjia Yan · 2024

Read Oreo : Protecting ASLR Against Microarchitectural Attacks (Extended Version) by Shixin Song, Joseph Zhang, Mengjia Yan (2024) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2412-07135.txt.

Introduction

Song, Zhang, and Yan defended a core security feature in this paper from twenty twenty-four. ASLR shuffles a program's memory layout so attackers cannot find targets. Tiny hardware side channels, though, can leak the shuffle secret. The authors catalogued the known leak paths across processor structures.

Their fix, Oreo, changes how memory addresses are handed to the hardware. The secret shuffled bits are stripped before address translation, so internal structures never see them. Programs need no changes to benefit. A prototype on Linux, tested in a hardware simulator, kept overhead low. The authors present the co-design as a broad shield against this class of leaks.

Catalog record

CREATORShixin Song, Joseph Zhang, Mengjia Yan
YEAR2024
COLLECTIONPAPERS
FORMATTXT
FILE SIZE119 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2412-07135

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Oreo : Protecting ASLR Against Microarchitectural Attacks (Extended Version) Shixin Song, Joseph Zhang, Mengjia Yan Abstract Address Space Layout Randomization (ASLR) is one of the most prominently deployed mitigations against memory corruption attacks. ASLR randomly shuffles program virtual addresses to prevent attackers from knowing the location of program contents in memory. Microarchitectural side channels have been shown to defeat ASLR through various hardware mechanisms. We systematically analyze existing microarchitectural attacks and identify multiple leakage paths. Given the vast attack surface exposed by ASLR, it is challenging to effectively prevent leaking the ASLR secret against microarchitectural attacks. Motivated by this, we present Oreo , a software-hardware co-design mitigation that strengthens ASLR against these attacks. Oreo uses a new memory mapping interface to remove secret randomized bits in virtual addresses before translating them to their corresponding physical addresses. This extra step hides randomized virtual addresses from microarchitecture structures, preventing side channels from leaking ASLR secrets. Oreo is transparent to user programs and incurs low overhead. We prototyped and evaluated our design on Linux using the hardware simulator gem5. \pdf@shellescape PubID: pubid: Network and Distributed System Security (NDSS) Symposium 2025 24-28 February 2025, San Diego, CA, USA ISBN 979-8-9894372-8-3 https://dx.doi.org/10.14722/ndss.2025.240264 www.ndss-symposium.org I Introduction Memory corruption vulnerabilities are some of the oldest security problems that continue to pose a serious security threat to modern systems [ 72 , 2 ] . Among all the memory safety mechanisms proposed in the last few decades, Address Space Layout Randomization (ASLR) [ 61 , 37 ] , has shown to be effective in raising the barrier of attacks and has become one of the most prominently deployed mitigations in modern systems. ASLR works by randomly arranging the positions of code or data regions for the kernel or user-space applications. If the attackers cannot reliably determine the location of specific code or data, they will have difficulty carrying out control-flow hijacking attacks, such as return-oriented programming [ 63 ] and jump-oriented programming [ 10 ] . With ASLR, the attacker must perform an extra information disclosure step utilizing other existing vulnerabilities to leak ASLR secret before conducting their exploits. However, ASLR has been defeated with various microarchitectural side channels. They pose a real threat, as we witness an increasing number of such attacks being utilized in real-world software exploitations. For example, in 2017, a macOS kernel 0-day exploit [ 70 ] used the prefetch attack [ 31 ] to bypass ASLR. In 2022, a Linux kernel exploit (CVE-2022-42703) [ 39 ] also used side channels to bypass ASLR. In the same blog post, the authors stated that “KASLR is comprehensively compromised on x86 against local attackers, and has been for the past several years, and will be for the indefinite future.” Among these microarchitectural-attack-assisted ALSR bypasses, a wide range of channels can be utilized, including TLBs, caches, and BTBs, using speculative execution, or even power-induced timing information [ 29 , 84 , 28 , 46 , 31 , 53 , 21 , 22 , 48 , 27 , 38 , 34 , 13 , 67 , 12 , 76 , 50 ] . Even worse, given the large attack surface, it seems that almost every newly discovered side-channel attack variant will likely become a new ASLR-bypassing attack vector. Given this phenomenon, two questions present themselves: (1) why has ASLR become such a fragile target for microarchitectural attacks, and (2) how can we secure ASLR to broadly block existing and potential future attack vectors? Challenges. With a detailed investigation of existing ASLR bypasses using microarchitectural side channels, we find that the microarchitecture features that can be leveraged to use as a leakage channel are diverse and continue growing. Therefore, when protecting ASLR against side-channel attacks, addressing each individual channel or feature is not an appealing approach. For example, FLARE [ 13 ] narrowly focuses on closing a single channel, i.e., the address translation latency, while ignoring the abundant other side channels in modern processors, as well as other existing attack vectors. Instead, in this paper, we focus on blocking the leakage at the source by restricting the usage of the ASLR secret in both software and hardware. Consider how the ASLR secret is used. ASLR shifts the location of a memory region by a secret offset . As such, the secret offset determines the virtual memory layout, i.e., which memory region is mapped and which is unmapped. The secret offset is also embedded in code and data pointers that are extensively used while executing a victim program. We systematically analyze and categorize microarchitectural ASLR bypasses into three leakage paths. In the first leakage path, the attacker probes the virtual memory layout. This class of attacks relies on the fact that probing a mapped address versus an unmapped address resolves different microarchitectural side effects and thus distinct latency [ 50 , 27 , 34 , 38 , 78 , 13 , 76 , 67 , 12 ] . Additionally, these probe operations can be stealthy and do not cause system crashes, because they are either conducted under speculation or assisted with cache manipulation instructions such as prefetch . Second, as the ASLR secret offset is embedded in code and data pointers, the attacker can leak the secret by monitoring the victim using its secret-dependent pointers to fetch instructions or perform loads and stores [ 51 , 29 , 84 , 28 , 46 , 31 , 53 , 21 ] . These operations can result in distinguishable side effects on BTB, TLB, page table walker, caches, and DRAM. Finally, the attacker can leak the victim’s pointers by using the Spectre attack gadget and its variants. For example, the attacker may load the secret pointer into a register and then use it as the address of a load or a store instruction. There exists a substantial amount of work to block this leakage path, such as STT [ 82 ] , NDA [ 77 ] , InvisiSpec [ 79 ] , and others [ 5 , 15 , 8 , 23 , 45 , 68 , 80 , 20 , 54 , 59 , 81 , 6 , 40 , 41 , 49 , 64 , 65 , 66 ] . Unfortunately, existing mitigations targeting Spectre and its variants can only block the third leakage path, leaving the other two leakage paths unblocked. Moreover, many mitigations work by selectively delaying secret-dependent speculative execution. Such schemes are applicable to the backend of a processor (at the load/store queue) with moderate performance loss, but they are unappealing to the frontend of the processor, where delaying fetching instructions means leaving the rest of the processor seriously underutilized. Figure 1: Overview of Oreo ’s new memory interface Oreo . The challenges discussed above motivate us to design Oreo , a software-hardware co-design scheme that secures ASLR against wide range of microarchitectural side-channel attacks. Specifically, given a randomized virtual address, Oreo aims to protect selected randomized bits from being leaked via microarchitectural attacks following the first two leakage paths. We refer to these protected bits as microarchitecture oblivious bits . The core of Oreo is a new memory interface, as shown in Figure 1 . The left side of the figure shows the existing memory interface

Read the complete text