Preserving Memory Safety in Safe Rust during Interactions with Unsafe Languages

Abstract

Rust is a programming language that simultaneously offers high performance and strong security guarantees. However, these guarantees come at the cost of strict compiler checks that sometimes prevent necessary code patterns. The unsafe keyword allows developers to bypass these compiler checks, and is used in both pure Rust and mixed-language applications. But the use of unsafe undermines the security guarantees of Rust that make it an attractive option in the first place. We first demonstrate that within a real-world pure Rust application, many uses of unsafe can be eliminated, or reduced to formally verifiable standard libraries. We then present Galeed, a system for isolating and protecting the Rust heap from access by other programming languages using Intels Memory Protection Key (MPK) technology. We demonstrate both the effectiveness and efficiency of Galeed on Firefox, a web browser written in Rust and C .

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Jun 01, 2021
Accession Number
AD1188941

Entities

People

  • Elijah E Rivera

Organizations

  • MIT Lincoln Laboratory
  • Massachusetts Institute of Technology

Tags

Communities of Interest

  • Advanced Electronics
  • Cyber
  • Energy and Power Technologies

DTIC Thesaurus Topics

  • C Programming Language
  • Computer Languages
  • Computer Programming
  • Computer Programs
  • Computer Science
  • Computers
  • Electrical Engineering
  • Engineering
  • Language
  • Mobile Operating Systems
  • Operating Systems
  • Programming Languages
  • Python Programming Language
  • Software Development
  • Standards
  • Web Browsers

Fields of Study

  • Computer science

Readers

  • Cybersecurity.
  • Parallel and Distributed Computing.
  • Surface Coatings Technology.