Securing Mixed Rust with Hardware Capabilities
Jason Zhijingcheng Yu, Fangqi Han, Kaustab Choudhury, Trevor E. Carlson, Prateek Saxena

TL;DR
CapsLock is a runtime security mechanism for mixed Rust code that enforces Rust principles across languages using capability-based hardware features, detecting violations and uncovering new bugs.
Contribution
It introduces CapsLock, a novel runtime enforcement mechanism for Rust principles in mixed code, leveraging capability-based hardware for cross-language security.
Findings
CapsLock passes 99.7% of Rust crate tests.
It detects Rust principle violations in real-world projects.
Discovered 8 previously unknown bugs.
Abstract
The Rust programming language enforces three basic Rust principles, namely ownership, borrowing, and AXM (Aliasing Xor Mutability) to prevent security bugs such as memory safety violations and data races. However, Rust projects often have mixed code, i.e., code that also uses unsafe Rust, FFI (Foreign Function Interfaces), and inline assembly for low-level control. The Rust compiler is unable to statically enforce Rust principles in mixed Rust code which can lead to many security vulnerabilities. In this paper, we propose CapsLock, a security enforcement mechanism that can run at the level of machine code and detect Rust principle violations at run-time in mixed code. CapsLock is kept simple enough to be implemented into recent capability-based hardware abstractions that provide low-cost spatial memory safety. CapsLock introduces a novel revoke-on-use abstraction for capability-based…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
