Affiliation:
1. UNSW Sydney, Kensington, Sydney, New South Wales, Australia
2. Huawei Toronto Research Center, Markham, Ontario, Canada
Abstract
Shadow stacks play an important role in protecting return addresses to mitigate ROP attacks. Parallel shadow stacks, which shadow the call stack of each thread at the same constant offset for all threads, are known not to support multi-threading well. On the other hand, compact shadow stacks must maintain a separate shadow stack pointer in
thread-local storage (TLS)
, which can be implemented in terms of a register or the per-thread
Thread-Control-Block (TCB)
, suffering from poor compatibility in the former or high performance overhead in the latter. In addition, shadow stacks are vulnerable to information disclosure attacks.
In this paper, we propose to mitigate ROP attacks for single- and multi-threaded server programs running on general-purpose computing systems by using a novel stack layout, called a
buddy stack
(referred to as
Bustk
), that is highly performant, compatible with existing code, and provides meaningful security. These goals are met due to three novel design aspects in
Bustk
. First,
Bustk
places a parallel shadow stack just below a thread’s call stack (as each other’s buddies allocated together), avoiding the need to maintain a separate shadow stack pointer and making it now well-suited for multi-threading. Second,
Bustk
uses an efficient stack-based thread-local storage mechanism, denoted
STK-TLS
, to store thread-specific metadata in two TLS sections just below the shadow stack in dual redundancy (as each other’s buddies), so that both can be accessed and updated in a lightweight manner from the call stack pointer
rsp
alone. Finally,
Bustk
re-randomizes continuously (on the order of milliseconds) the return addresses on the shadow stack by using a new microsecond-level runtime re-randomization technique, denoted
STK-MSR
. This mechanism aims to obsolete leaked information, making it extremely unlikely for the attacker to hijack return addresses, particularly against a server program that sits often tens of milliseconds away from the attacker.
Our evaluation using web servers,
Nginx
and
Apache Httpd
, shows that
Bustk
works well in terms of performance, compatibility, and security provided, with its parallel shadow stacks incurring acceptable memory overhead for real-world applications and its
STK-TLS
mechanism costing only two pages per thread. In particular,
Bustk
can protect the
Nginx
and
Apache
servers with an adaptive 1-ms re-randomization policy (without observable overheads when IO is intensive, with about 17,000 requests per second). In addition, we have also evaluated
Bustk
using other non-server applications,
Firefox
,
Python
,
LLVM
,
JDK
and
SPEC CPU2006
, to demonstrate further the same degree of performance and compatibility provided, but the protection provided for, say, browsers, is weaker (since network-access delays can no longer be assumed).
Funder
Australian Research Council
Publisher
Association for Computing Machinery (ACM)
Reference96 articles.
1. Control-flow integrity
2. Adobe Flash Player;https://get.adobe.com/flashplayer/,2021
3. Naif Saleh Almakhdhub, Abraham A. Clements, Saurabh Bagchi, and Mathias Payer. 2020. \( \mu \) RAI: Securing embedded systems with return address integrity. In Network and Distributed System Security Symposium. Internet Society, Reston, Virginia, USA, 1–18.
4. Michael Backes and Stefan Nürnberger. 2014. Oxymoron: Making fine-grained memory randomization practical by allowing code sharing. In Proceedings of the 23rd USENIX Security Symposium. USENIX, Berkeley, California, USA, 433–447.
5. Timely Rerandomization for Mitigating Memory Disclosures
Cited by
4 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. VALIDATE: A deep dive into vulnerability prediction datasets;Information and Software Technology;2024-06
2. Implementation of Thread Local Storage Optimization Method Based on LoongArch;2023 42nd Chinese Control Conference (CCC);2023-07-24
3. Thread-Level Attack-Surface Reduction;Proceedings of the 24th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems;2023-06-13
4. Practical Software-Based Shadow Stacks on x86-64;ACM Transactions on Architecture and Code Optimization;2022-10-07