Fidelius Charm: Isolating Unsafe Rust Code

被引:10
|
作者
Almohri, Hussain M. J. [1 ,2 ]
Evans, David [2 ]
机构
[1] Kuwait Univ, Dept Comp Sci, Kuwait, Kuwait
[2] Univ Virginia, Dept Comp Sci, Charlottesville, VA 22903 USA
基金
美国国家科学基金会;
关键词
Isolation; Rust; Compartmentalization; Sandboxing;
D O I
10.1145/3176258.3176330
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
The Rust programming language has a safe memory model that promises to eliminate critical memory bugs. While the language is strong in doing so, its memory guarantees are lost when any unsafe blocks are used. Unsafe code is often needed to call library functions written in an unsafe language inside a Rust program. We present Fidelius Charm (FC), a system that protects a programmer-specified subset of data in memory from unauthorized access through vulnerable unsafe libraries. FC does this by limiting access to the program's memory while executing unsafe libraries. FC uses standard features of Rust and utilizes the Linux kernel as a trusted base for splitting the address space into a trusted privileged region under the control of functions written in Rust and a region available to unsafe external libraries. This paper presents our design and implementation of FC, presents two case studies for using FC in Rust TLS libraries, and reports on experiments showing its performance overhead is low for typical uses.
引用
收藏
页码:248 / 255
页数:8
相关论文
共 32 条
  • [1] On the Dual Nature of Necessity in Use of Rust Unsafe Code
    Zhang, Yuchen
    Kundu, Ashish
    Portokalidis, Georgios
    Xu, Jun
    [J]. PROCEEDINGS OF THE 31ST ACM JOINT MEETING EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, ESEC/FSE 2023, 2023, : 2032 - 2037
  • [2] Unsafe code detection in Rust and metamorphic testing of autonomous driving systems
    Le Traon, Yves
    Xie, Tao
    [J]. SOFTWARE TESTING VERIFICATION & RELIABILITY, 2024, 34 (05):
  • [3] RustHornBelt: A Semantic Foundation for Functional Verification of Rust Programs with Unsafe Code
    Matsushita, Yusuke
    Denis, Xavier
    Jourdan, Jacques-Henri
    Dreyer, Derek
    [J]. PROCEEDINGS OF THE 43RD ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '22), 2022, : 841 - 856
  • [4] SafeNet: Towards mitigating replaceable unsafe Rust code via a recommendation-based approach
    Dong, Yan
    Zhang, Zhicong
    Cui, Mohan
    Xu, Hui
    [J]. SOFTWARE TESTING VERIFICATION & RELIABILITY, 2024, 34 (05):
  • [5] Securing UnSafe Rust Programs with XRust
    Liu, Peiming
    Zhao, Gang
    Huang, Jeff
    [J]. 2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2020), 2020, : 234 - 245
  • [6] "I wouldn't want my unsafe code to run my pacemaker": An Interview Study on the Use, Comprehension, and Perceived Risks of Unsafe Rust
    Hoeltervennhoff, Sandra
    Klostermeyer, Philip
    Woehler, Noah
    Acar, Yasemin
    Fahl, Sascha
    [J]. PROCEEDINGS OF THE 32ND USENIX SECURITY SYMPOSIUM, 2023, : 2509 - 2525
  • [7] In Rust We Trust - A Transpiler from Unsafe C to Safer Rust
    Ling, Michael
    Yu, Yijun
    Wu, Haitao
    Wang, Yuan
    Cordy, James R.
    Hassan, Ahmed E.
    [J]. 2022 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS (ICSE-COMPANION 2022), 2022, : 354 - 355
  • [8] Safer Unsafe Code for .NET
    Ferrara, Pietro
    Logozzo, Francesco
    Faehndrich, Manuel
    [J]. OOPSLA 2008 NASHVILLE, CONFERENCE PROCEEDINGS: MUSIC CITY USA, OOPSLA, 2008, : 329 - +
  • [9] How Do Programmers Use Unsafe Rust?
    Astrauskas, Vytautas
    Matheja, Christoph
    Poli, Federico
    Muller, Peter
    Summers, Alexander J.
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2020, 4 (OOPSLA):
  • [10] Safer Unsafe Code for. NET
    Ferrara, Pietro
    Logozzo, Francesco
    Fahndrich, Manuel
    [J]. ACM SIGPLAN NOTICES, 2008, 43 (10) : 329 - 345