Cocoon: Static Information Flow Control in Rust

Ada Lamba, Max Taylor, Vincent Beardsley, Jacob Bambeck, Michael D. Bond, Zhiqiang Lin

Research output: Contribution to journalArticlepeer-review

6 Scopus citations

Abstract

Information flow control (IFC) provides confidentiality by enforcing noninterference, which ensures that high-secrecy values cannot affect low-secrecy values. Prior work introduces fine-grained IFC approaches that modify the programming language and use non-standard compilation tools, impose run-time overhead, or report false secrecy leaks - all of which hinder adoption. This paper presents Cocoon, a Rust library for static type-based IFC that uses the unmodified Rust language and compiler. The key insight of Cocoon lies in leveraging Rust's type system and procedural macros to establish an effect system that enforces noninterference. A performance evaluation shows that using Cocoon increases compile time but has no impact on application performance. To demonstrate Cocoon's utility, we retrofitted two popular Rust programs, the Spotify TUI client and Mozilla's Servo browser engine, to use Cocoon to enforce limited confidentiality policies.

Original languageEnglish
Article number100
JournalProceedings of the ACM on Programming Languages
Volume8
Issue numberOOPSLA1
DOIs
StatePublished - 29 Apr 2024
Externally publishedYes

Keywords

  • information flow control
  • Rust
  • type and effect systems

Fingerprint

Dive into the research topics of 'Cocoon: Static Information Flow Control in Rust'. Together they form a unique fingerprint.

Cite this