Enclosure: language-based restriction of untrusted libraries
Adrien Ghosn, Marios Kogias, Mathias Payer, James R. Larus, Edouard Bugnion
摘要
Programming languages and systems have failed to address the security implications of the increasingly frequent use of public libraries to construct modern software. Most languages provide tools and online repositories to publish, import, and use libraries; however, this double-edged sword can incorporate a large quantity of unknown, unchecked, and unverified code into an application. The risk is real, as demonstrated by malevolent actors who have repeatedly inserted malware into popular open-source libraries.
This paper proposes a solution: enclosures, a new programming language construct for library isolation that provides a developer with fine-grain control over the resources that a library can access, even for libraries with complex inter-library dependencies. The programming abstraction is language-independent and could be added to most languages. These languages would then be able to take advantage of hardware isolation mechanisms that are effective across language boundaries.
The enclosure policies are enforced at run time by LitterBox, a language-independent framework that uses hardware mechanisms to provide uniform and robust isolation guarantees, even for libraries written in unsafe languages. LitterBox currently supports both Intel VT-x (with general-purpose extended page tables) and the emerging Intel Memory Protection Keys (MPK).
We describe an enclosure implementation for the Go and Python languages. Our evaluation demonstrates that the Go implementation can protect sensitive data in real-world applications constructed using complex untrusted libraries with deep dependencies. It requires minimal code refactoring and incurs acceptable performance overhead. The Python implementation demonstrates LitterBox's ability to support dynamic languages.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 21 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- PKRU-safe: automatically locking down the heap between safe and unsafe languages 引用了 Spectre Attacks: Exploiting Speculative Execution
- PKRU-safe: automatically locking down the heap between safe and unsafe languages 引用了 You shall not (by)pass!: practical, secure, and fast PKU-based sandboxing
- You shall not (by)pass!: practical, secure, and fast PKU-based sandboxing 引用了 PKRU-safe: automatically locking down the heap between safe and unsafe languages
- PKRU-safe: automatically locking down the heap between safe and unsafe languages 引用了 Shreds: Fine-Grained Execution Units with Private Memory
- PKRU-safe: automatically locking down the heap between safe and unsafe languages 引用了 ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
- ISA-Grid: Architecture of Fine-grained Privilege Control for Instructions and Registers 引用了 PKRU-safe: automatically locking down the heap between safe and unsafe languages
- ISA-Grid: Architecture of Fine-grained Privilege Control for Instructions and Registers 引用了 You shall not (by)pass!: practical, secure, and fast PKU-based sandboxing
- ISA-Grid: Architecture of Fine-grained Privilege Control for Instructions and Registers 引用了 Shreds: Fine-Grained Execution Units with Private Memory
- ISA-Grid: Architecture of Fine-grained Privilege Control for Instructions and Registers 引用了 IMIX: In-Process Memory Isolation EXtension
- ISA-Grid: Architecture of Fine-grained Privilege Control for Instructions and Registers 引用了 ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
- You shall not (by)pass!: practical, secure, and fast PKU-based sandboxing 引用了 Spectre Attacks: Exploiting Speculative Execution
- You shall not (by)pass!: practical, secure, and fast PKU-based sandboxing 引用了 Shreds: Fine-Grained Execution Units with Private Memory
- You shall not (by)pass!: practical, secure, and fast PKU-based sandboxing 引用了 IMIX: In-Process Memory Isolation EXtension
- Isolating functions at the hardware limit with virtines 引用了 ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
- ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK) 引用了 Shreds: Fine-Grained Execution Units with Private Memory
- ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK) 引用了 IMIX: In-Process Memory Isolation EXtension
引用它的顶会 Paper21
- PKRU-safe: automatically locking down the heap between safe and unsafe languagesPaul Kirth, Mitchel Dickerson, Stephen Crane, Per Larsen 等EuroSys 2022 · 41 次引用
- You shall not (by)pass!: practical, secure, and fast PKU-based sandboxingAlexios Voulimeneas, Jonas Vinck, Ruben Mechelinck, Stijn VolckaertEuroSys 2022 · 33 次引用
- Isolating functions at the hardware limit with virtinesNicholas C. Wanninger, Joshua J. Bowden, Kirtankumar Shetty, Ayush Garg 等EuroSys 2022 · 17 次引用
- ISA-Grid: Architecture of Fine-grained Privilege Control for Instructions and RegistersShulin Fan, Zhichao Hua, Yubin Xia, Haibo Chen 等ISCA 2023 · 9 次引用
- SysXCHG: Refining Privilege with Adaptive System Call FiltersAlexander J. Gaidis, Vaggelis Atlidakis, Vasileios P. KemerlisCCS 2023 · 9 次引用
它引用的 Paper8
- Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin 等S&P 2019 · 2,435 次引用
- Small World with High Risks: A Study of Security Threats in the npm EcosystemMarkus Zimmermann, Cristian-Alexandru Staicu, Cam Tenny, Michael PradelUSENIX Security 2019 · 281 次引用
- ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler 等USENIX Security 2019 · 247 次引用
- Shreds: Fine-Grained Execution Units with Private MemoryYaohui Chen, Sebassujeen Reymondjohnson, Zhichuang Sun, Long LuS&P 2016 · 116 次引用
- IMIX: In-Process Memory Isolation EXtensionTommaso Frassetto, Patrick Jauernig, Christopher Liebchen, Ahmad-Reza SadeghiUSENIX Security 2018 · 77 次引用
相关 Paper
- CubicleOS: a library OS with software componentisation for practical isolationVasily A. Sartakov, Lluís Vilanova, Peter R. PietzuchASPLOS 2021 · 38 次引用
- Building Bridges: Safe Interactions with Foreign Languages through OmniglotLeon Schuermann, Jack Toubes, Tyler Potyondy, Pat Pannuto 等OSDI 2025
- Retrofitting Fine Grain Isolation in the Firefox RendererShravan Narayan, Craig Disselkoen, Tal Garfinkel, Nathan Froyd 等USENIX Security 2020
- LatticeBox: A Hardware-Software Co-Designed Framework for Scalable and Low-Latency CompartmentalizationZhanpeng Liu, Chenyang Li, Wende Tan, Yuan Li 等NDSS 2026 · 1 次引用
- TRust: A Compilation Framework for In-process Isolation to Protect Safe Rust against Untrusted CodeInyoung Bang, Martin Kayondo, Hyungon Moon, Yunheung PaekUSENIX Security 2023
