Bento: Fine-Grained Memory Isolation for COTS WebAssembly Binaries
Oussama Draissi, Lucas Davi
Abstract
WebAssembly (Wasm) enables execution of memory-unsafe languages like C/C++ in the browser, but its monolithic linear memory leaves modules vulnerable to high-impact attacks such as cross-site scripting. Existing defenses are unsuitable for commercial-off-the-shelf (COTS) binaries, requiring either source code, non-standard runtimes, or introduce high-overhead instrumentation. We present Bento, the first static binary rewriter that automatically hardens COTS Wasm modules. Bento uses whole-program pointer analysis to partition memory into logical regions (stack, heap, globals) and rewrites the binary to map each region to an isolated instance using the standard Wasm multi-memory feature. This creates a software-based MMU that provides architectural hardening without adding instructions or costly runtime checks. Our evaluation shows that Bento mitigates real-world exploits in prominent applications, including Libpng and PDFAlto, while preserving program semantics, as confirmed by differential testing. Since our architectural approach adds no new instructions, Bento only induces 3% runtime slowdown and a 1% startup overhead.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 5b0e5e95-6ca2-4cc5-9d64-193c7793c42cRelated papers
- Everything Old is New Again: Binary Security of WebAssemblyDaniel Lehmann, Johannes Kinder, Michael PradelUSENIX Security 2020
- Exploring and Exploiting the Resource Isolation Attack Surface of WebAssembly ContainersZhaofeng Yu, Dongyang Zhan, Lin Ye, Haining Yu et al.USENIX Security 2025
- Swivel: Hardening WebAssembly against SpectreShravan Narayan, Craig Disselkoen, Daniel Moghimi, Sunjay Cauligi et al.USENIX Security 2021 · 74 citations
- Put Your Memory in Order: Efficient Domain-based Memory Isolation for WASM ApplicationsHanwen Lei, Ziqi Zhang, Shaokun Zhang, Peng Jiang et al.CCS 2023 · 7 citations
- Indexed Types for a Statically Safe WebAssemblyAdam T. Geller, Justin Frank, William J. BowmanPOPL 2024 · 4 citations
