Isolation without taxation: near-zero-cost transitions for WebAssembly and SFI
Matthew Kolosick, Shravan Narayan, Evan Johnson, Conrad Watt, Michael LeMay, Deepak Garg, Ranjit Jhala, Deian Stefan
摘要
Software sandboxing or software-based fault isolation (SFI) is a lightweight approach to building secure systems out of untrusted components. Mozilla, for example, uses SFI to harden the Firefox browser by sandboxing third-party libraries, and companies like Fastly and Cloudflare use SFI to safely co-locate untrusted tenants on their edge clouds. While there have been significant efforts to optimize and verify SFI enforcement, context switching in SFI systems remains largely unexplored: almost all SFI systems use heavyweight transitions that are not only error-prone but incur significant performance overhead from saving, clearing, and restoring registers when context switching. We identify a set of zero-cost conditions that characterize when sandboxed code has sufficient structured to guarantee security via lightweight zero-cost transitions (simple function calls). We modify the Lucet Wasm compiler and its runtime to use zero-cost transitions, eliminating the undue performance tax on systems that rely on Lucet for sandboxing (e.g., we speed up image and font rendering in Firefox by up to 29.7% and 10% respectively). To remove the Lucet compiler and its correct implementation of the Wasm specification from the trusted computing base, we (1) develop a static binary verifier , VeriZero, which (in seconds) checks that binaries produced by Lucet satisfy our zero-cost conditions, and (2) prove the soundness of VeriZero by developing a logical relation that captures when a compiled Wasm function is semantically well-behaved with respect to our zero-cost conditions. Finally, we show that our model is useful beyond Wasm by describing a new, purpose-built SFI system, SegmentZero32, that uses x86 segmentation and LLVM with mostly off-the-shelf passes to enforce our zero-cost conditions; our prototype performs on-par with the state-of-the-art Native Client SFI system.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Iris-Wasm: Robust and Modular Verification of WebAssembly Programs 引用了 Retrofitting Fine Grain Isolation in the Firefox Renderer
- SoK: On the Fragility of Memory Error Exploit Mitigations 引用了 ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
- SECOMP: Formally Secure Compilation of Compartmentalized C Programs 引用了 Going beyond the Limits of SFI: Flexible and Secure Hardware-Assisted In-Process Isolation with HFI
- SECOMP: Formally Secure Compilation of Compartmentalized C Programs 引用了 ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
- Mohabi: Disaggregating and Sandboxing the Firefox JavaScript Engine 引用了 Доверя'й, но проверя'й: SFI safety for native-compiled Wasm
- Mohabi: Disaggregating and Sandboxing the Firefox JavaScript Engine 引用了 Retrofitting Fine Grain Isolation in the Firefox Renderer
- Mohabi: Disaggregating and Sandboxing the Firefox JavaScript Engine 引用了 ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
- Доверя'й, но проверя'й: SFI safety for native-compiled Wasm 引用了 Retrofitting Fine Grain Isolation in the Firefox Renderer
- Доверя'й, но проверя'й: SFI safety for native-compiled Wasm 引用了 ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
- Going beyond the Limits of SFI: Flexible and Secure Hardware-Assisted In-Process Isolation with HFI 引用了 Shreds: Fine-Grained Execution Units with Private Memory
- Going beyond the Limits of SFI: Flexible and Secure Hardware-Assisted In-Process Isolation with HFI 引用了 Доверя'й, но проверя'й: SFI safety for native-compiled Wasm
- Going beyond the Limits of SFI: Flexible and Secure Hardware-Assisted In-Process Isolation with HFI 引用了 Retrofitting Fine Grain Isolation in the Firefox Renderer
- Going beyond the Limits of SFI: Flexible and Secure Hardware-Assisted In-Process Isolation with HFI 引用了 Donky: Domain Keys - Efficient In-Process Isolation for RISC-V and x86
- Going beyond the Limits of SFI: Flexible and Secure Hardware-Assisted In-Process Isolation with HFI 引用了 ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
- Retrofitting Fine Grain Isolation in the Firefox Renderer 引用了 ERIM: Secure, Efficient In-process Isolation with Protection Keys (MPK)
- Donky: Domain Keys - Efficient In-Process Isolation for RISC-V and x86 引用了 Shreds: Fine-Grained Execution Units with Private Memory
- Donky: Domain Keys - Efficient In-Process Isolation for RISC-V and x86 引用了 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
引用它的顶会 Paper9
- Going beyond the Limits of SFI: Flexible and Secure Hardware-Assisted In-Process Isolation with HFIShravan Narayan, Tal Garfinkel, Mohammadkazem Taram, Joey Rudek 等ASPLOS 2023 · 27 次引用
- Iris-Wasm: Robust and Modular Verification of WebAssembly ProgramsXiaojia Rao, Aïna Linn Georges, Maxime Legoupil, Conrad Watt 等PLDI 2023 · 19 次引用
- SECOMP: Formally Secure Compilation of Compartmentalized C ProgramsJérémy Thibault, Roberto Blanco, Dongjae Lee, Sven Argo 等CCS 2024 · 1 次引用
- Mohabi: Disaggregating and Sandboxing the Firefox JavaScript EngineAbhishek Sharma, Anand Balaji, Zachary Yedidia, Anthony Du 等OSDI 2026 · 1 次引用
- SoK: On the Fragility of Memory Error Exploit MitigationsAdriaan Jacobs, Mahmoud Ammar, Stijn VolckaertUSENIX Security 2026
它引用的 Paper5
- 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 次引用
- Доверя'й, но проверя'й: SFI safety for native-compiled WasmEvan Johnson, David Thien, Yousef Alhessi, Shravan Narayan 等NDSS 2021
- Retrofitting Fine Grain Isolation in the Firefox RendererShravan Narayan, Craig Disselkoen, Tal Garfinkel, Nathan Froyd 等USENIX Security 2020
- Donky: Domain Keys - Efficient In-Process Isolation for RISC-V and x86David Schrammel, Samuel Weiser, Stefan Steinegger, Martin Schwarzl 等USENIX Security 2020
相关 Paper
- Segue & ColorGuard: Optimizing SFI Performance and Scalability on Modern ArchitecturesShravan Narayan, Tal Garfinkel, Evan Johnson, Zachary Yedidia 等ASPLOS 2025 · 1 次引用
- Lightweight Fault Isolation: Practical, Efficient, and Secure Software SandboxingZachary YedidiaASPLOS 2024 · 17 次引用
- WaVe: a verifiably secure WebAssembly sandboxing runtimeEvan Johnson, Evan Laufer, Zijie Zhao, Dan Gohman 等S&P 2023
- Deterministic Client: Enforcing Determinism on Untrusted Machine CodeZachary Yedidia, Geoffrey Ramseyer, David MazièresOSDI 2025 · 1 次引用
- Provably-Safe Multilingual Software Sandboxing using WebAssemblyJay Bosamiya, Wen Shih Lim, Bryan ParnoUSENIX Security 2022
