English

Cocoon: Static Information Flow Control in Rust

Programming Languages 2024-03-20 v2

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 nonstandard 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.

Keywords

Cite

@article{arxiv.2311.00097,
  title  = {Cocoon: Static Information Flow Control in Rust},
  author = {Ada Lamba and Max Taylor and Vincent Beardsley and Jacob Bambeck and Michael D. Bond and Zhiqiang Lin},
  journal= {arXiv preprint arXiv:2311.00097},
  year   = {2024}
}

Comments

Will be published in PACMPL(OOPSLA) in October 2024

R2 v1 2026-06-28T13:07:54.878Z