Validating Memory Safety in Rust Binaries
Open Access
- 22 April 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 8-14
Abstract
Without depending on heavy runtime support, Rust can realize fast machine code that mitigates most of the common attacks associated with memory-corruption and can appear in all unsafe machine code developed using C/C++. Most of the work for producing machine code with security guarantees is carried out at compile-time by the Rust compiler. However, at runtime, there is no mechanism to ensure that the produced security guarantees, as computed at compile-time, are still in place. In this paper, we explore the possibilities of an attacker fabricating Rust binaries so that they are on purpose vulnerable. We show that it is possible to modify automatically, and at large scale, binaries so that certain defences, placed by the Rust compiler, are removed. We introduce a generic problem, and focus on concepts of spatial and temporal safety. Finally, we produce a validator that assesses if all checks ensuring spatial and temporal safety remain intact within a Rust binary, before executing it. Our work is a step towards validating Rust binaries at load time so that security guarantees computed at compile-time are effective at runtime.Keywords
Funding Information
- HORIZON EUROPE Framework Programme (101070599, 101083594)
This publication has 6 references indexed in Scilit:
- MirChecker: Detecting Bugs in Rust Programs via Static Analysis2021
- Exploiting Mixed BinariesACM Transactions on Privacy and Security, 2021
- The Performance Cost of Shadow Stacks and Stack Canaries2015
- Just-In-Time Code Reuse: On the Effectiveness of Fine-Grained Address Space Layout Randomization2013
- Launching Generic Attacks on iOS with Approved Third-Party Applications2013
- Native Client: A Sandbox for Portable, Untrusted x86 Native Code2009