Is unsafe an Achilles' Heel? A Comprehensive Study of Safety Requirements in Unsafe Rust Programming
Mohan Cui, Suran Sun, Hui Xu, Yangfan Zhou

TL;DR
This paper presents a comprehensive empirical study of safety requirements in Unsafe Rust, analyzing API documentation, CVEs, and user perceptions to improve safety practices and documentation consistency.
Contribution
It systematically defines safety properties, analyzes unsafe APIs, and evaluates safety documentation and user understanding to enhance Rust security and safety requirement clarity.
Findings
Unsafe API documentation varies in safety requirement descriptions.
A set of 19 safety properties (SP) was defined and applied to 416 APIs.
User survey confirms the importance of systematic safety documentation.
Abstract
Rust is an emerging, strongly-typed programming language focusing on efficiency and memory safety. With increasing projects adopting Rust, knowing how to use Unsafe Rust is crucial for Rust security. We observed that the description of safety requirements needs to be unified in Unsafe Rust programming. Current unsafe API documents in the standard library exhibited variations, including inconsistency and insufficiency. To enhance Rust security, we suggest unsafe API documents to list systematic descriptions of safety requirements for users to follow. In this paper, we conducted the first comprehensive empirical study on safety requirements across unsafe boundaries. We studied unsafe API documents in the standard library and defined 19 safety properties (SP). We then completed the data labeling on 416 unsafe APIs while analyzing their correlation to find interpretable results. To validate…
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.
Taxonomy
TopicsSoftware Reliability and Analysis Research · Software Engineering Research · Safety Systems Engineering in Autonomy
