paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Cocoon: Static Information Flow Control in Rust

Cocoon:Rust 中的静态信息流控制
OOPSLA 8(OOPSLA1)2024匹配度 2/10 · 该论文是关于 Rust 中静态信息流控制的 PL 安全论文,不涉及 LLM/Agent、ML 系统、浮点或贝叶斯程序分析,与用户研究的 PL 与 AI 交叉方向匹配度低。引用 8 inbox
Ada Lamba, Max Taylor, Vincent Beardsley, Jacob Bambeck, Michael D. Bond, Zhiqiang Lin
crossref: 2026-09-10

AI 速览

一句话:用未修改的 Rust 语言与编译器,通过类型系统与过程宏实现静态信息流控制库,保证非干扰且无运行时开销。

信息流控制(IFC)通过强制非干扰来保障机密性,即高密级值不能影响低密级值。已有细粒度 IFC 方案往往需要修改编程语言或使用非标准编译工具,或引入运行时开销,或产生虚假的机密性泄漏报告,这些缺陷都妨碍了其实际采用。本文提出 Cocoon:一个基于静态类型的 IFC Rust 库,完全使用未经修改的 Rust 语言与编译器。其核心洞见在于借助 Rust 的类型系统与过程宏(procedural macros)构建一个 effect 系统,从而在编译期强制非干扰。性能评估表明,使用 Cocoon 会增加编译时间,但对应用程序的运行时性能没有影响。为展示其实用性,作者将两个流行的 Rust 程序——Spotify TUI 客户端与 Mozilla 的 Servo 浏览器引擎——改造为使用 Cocoon,以强制实施有限的机密性策略。

问题
现有细粒度信息流控制方法需要修改语言或依赖非标准编译工具,带来运行时开销或虚假泄漏报告,难以被实际项目采用。
方法
Cocoon 是一个纯 Rust 库,利用 Rust 的类型系统与过程宏建立一个 effect 系统,在编译期静态强制非干扰,无需修改语言或编译器。
评估
通过性能评估衡量编译时间与应用运行性能,并对 Spotify TUI 客户端和 Mozilla Servo 浏览器引擎进行改造,验证其在真实程序中强制有限机密性策略的可行性。
原文摘要(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

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2571,
  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 = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA1},
  year = {2024},
  doi = {10.1145/3649817}
}