ERASan: Efficient Rust Address Sanitizer
Authors:
- 19 May 2024
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 4053-4068
Abstract
Rust is a rapidly growing system programming language that ensures a speed comparable to traditional C/C++ system programming languages, along with the additional benefit of guaranteed memory safety. However, Rust’s strict security rules make implementing and executing some features challenging. To address this, Rust has introduced unsafe Rust, which is less constrained by these strict rules. Nevertheless, these unsafe Rust, where strict Rust security rules are not fully applied, can cause temporal and spatial memory bugs that account for 22% of the Rust bugs reported between 2016 and 2023.In this paper, we propose an efficient address sanitizer design customized for Rust, called ERASan, to detect memory bugs in Rust programs more efficiently than prior work. Based on our thorough analysis of safe and unsafe Rust programming language standards as well as memory bugs found in real-world Rust programs over the past years, we design and implement ERASan to only instrument memory accesses in both safe and unsafe code areas where Rust cannot guarantee safety. We evaluate ERASan with several real-world applications. ERASan removes an average of 90.03% of ASan’s memory access checks. Due to this, ERASan significantly reduces ASan’s performance overhead by an average of 239.05% without harming its bug-finding ability.Keywords
This publication has 15 references indexed in Scilit:
- Detecting Cross-language Memory Management Issues in Rust2022
- MirChecker: Detecting Bugs in Rust Programs via Static Analysis2021
- Memory-Safety Challenge Considered Solved? An In-Depth Study with All Rust CVEsACM Transactions on Software Engineering and Methodology, 2021
- How do programmers use unsafe rust?Proceedings of the ACM on Programming Languages, 2020
- SoK: Sanitizing for Security2019
- PartiSan: Fast and Flexible Sanitization via Run-Time Partitioning2018
- Sandcrust2017
- Eliminating Redundant Bounds Checks in Dynamic Buffer Overflow Detection Using Weakest PreconditionsIEEE Transactions on Reliability, 2016
- SVF: interprocedural static value-flow analysis in LLVM2016
- High System-Code Security with Low Overhead2015