arrow
Return

Detecting Memory Errors in Rust Programs Including Unsafe Foreign Code

delete2026-01-01
delete0
PRE
AI
A
Andrea Franceschi *
L
Letterio Galletta
P
Pierpaolo Degano
DOI:10.1007/978-3-032-10444-1_11delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
Memory corruption is one of the oldest and most disruptive problems in computer security, through which attackers may maliciously alter the program control flow. Unsafe languages, such as C and C++, are prone to these types of vulnerability. A promising alternative is Rust, which ensures memory safety through proper compile-time checks with no penalties at run-time. However, the Rust compiler is not able to provide these guarantees when programmers use Rust unsafe features or integrate code written in an unsafe language through the Foreign Function Interface mechanism. If the unsafe features and the integration of unsafe code are not handled with extreme care, the memory errors that Rust aims to eliminate may be reintroduced. Here, we define a static taint analysis that targets both Rust and foreign code to detect the common memory errors use-after-free, never-free, and double-free, and implement it in the tool crema. Our experimental evaluation on real cases from GitHub shows that crema detects memory errors effectively.
Keywords:
Bug Detection
Unsafe Rust
Static Taint Analysis
Understanding and Detecting Real-World Safety Issues in Rust
err2024-06-01
err0
PREAI
errQin, Boqin; Chen, Yilun; Liu, Haopeng; Zhang, Hua; Wen, Qiaoyan; Song, Linhai; Zhang, Yiying
errShare
errSave
Yuga: Automatically Detecting Lifetime Annotation Bugs in the Rust Language
err2024-10-01
err0
PREAI
errNitin, Vikram; Mulhern, Anne; Arora, Sanjay; Ray, Baishakhi
errShare
errSave
errShare
errSave
SquirrelFS: Using the Rust Compiler to Check File-System Crash Consistency
err2025-11-01
err0
PREAI
errLeBlanc, Hayley; Taylor, Nathan; Bornholt, James; Chidambaram, Vijay
errShare
errSave
Miri: Practical Undefined Behavior Detection for Rust
err2026-01-01
err0
PREAI
errJung, Ralf; Kimock, Benjamin; Poveda, Christian; Munoz, Eduardo Sanchez; Scherer, Oli; Wang, Qian
errShare
errSave
errShare
errSave

Journal

S
SOFTWARE ENGINEERING AND FORMAL METHODS, SEFM 2025
IF:
0
Papers:
16
Citations:
0

Organization

I
IMT School for Advanced Studies Lucca
Scholars:
44
Papers: 29
Citations: 561
Cited Papers

Cited Papers

TAJ
err2009-06-15
err0
PREAI
errOmer Tripp; Marco Pistoia; Stephen J. Fink; Manu Sridharan; Omri Weisman
errShare
errSave
Memory-Safety Challenge Considered Solved? An In-Depth Study with All Rust CVEs
err2021-09-28
err21
errOAAI
errXu, Hui; Chen, Zhuangbin; Sun, Mingshen; Zhou, Yangfan; Lyu, Michael R.
errShare
errSave
Abstract Interpretation Frameworks
err1992-01-01
err0
errOAAI
errPATRICK COUSOT; RADHIA COUSOT
errShare
errSave
Cross-Language Attacks
err2022-01-01
err0
errOAAI
errSamuel Mergendahl; Nathan Burow; Hamed Okhravi
errShare
errSave
researcher View more