Lune

POPL2023顶会

MSWasm: Soundly Enforcing Memory-Safe Execution of Unsafe Code

Alexandra E. Michael, Anitha Gollamudi, Jay Bosamiya, Evan Johnson, Aidan Denlinger, Craig Disselkoen, Conrad Watt, Bryan Parno, Marco Patrignani, Marco Vassena, Deian Stefan

摘要

DEIAN STEFAN, UCSD, USA Most programs compiled to WebAssembly (Wasm) today are written in unsafe languages like C and C++. Unfortunately, memory-unsafe C code remains unsafe when compiled to Wasm-and attackers can exploit buffer overflows and use-after-frees in Wasm almost as easily as they can on native platforms. Memory-Safe WebAssembly (MSWasm) proposes to extend Wasm with language-level memory-safety abstractions to precisely address this problem. In this paper, we build on the original MSWasm position paper to realize this vision. We give a precise and formal semantics of MSWasm, and prove that well-typed MSWasm programs are, by construction, robustly memory safe. To this end, we develop a novel, language-independent memorysafety property based on colored memory locations and pointers. This property also lets us reason about the security guarantees of a formal C-to-MSWasm compiler-and prove that it always produces memory-safe programs (and preserves the semantics of safe programs). We use these formal results to then guide several implementations: Two compilers of MSWasm to native code, and a C-to-MSWasm compiler (that extends Clang). Our MSWasm compilers support different enforcement mechanisms, allowing developers to make security-performance trade-offs according to their needs. Our evaluation shows that on the PolyBenchC suite, the overhead of enforcing memory safety in software ranges from 22% (enforcing spatial safety alone) to 198% (enforcing full memory safety), and 51.7% when using hardware memory capabilities for spatial safety and pointer integrity.

More importantly, MSWasm's design makes it easy to swap between enforcement mechanisms; as fast (especially hardware-based) enforcement techniques become available, MSWasm will be able to take advantage of these advances almost for free.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Put Your Memory in Order: Efficient Domain-based Memory Isolation for WASM Applications 引用了 An Empirical Study of Real-World WebAssembly Binaries: Security, Languages, Use Cases
  • Iris-MSWasm: Elucidating and Mechanising the Security Invariants of Memory-Safe WebAssembly 引用了 Iris-Wasm: Robust and Modular Verification of WebAssembly Programs
  • Iris-MSWasm: Elucidating and Mechanising the Security Invariants of Memory-Safe WebAssembly 引用了 RichWasm: Bringing Safe, Fine-Grained, Shared-Memory Interoperability Down to WebAssembly
  • Cornucopia: Temporal Safety for CHERI Heaps 引用了 Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling Pointers
  • RichWasm: Bringing Safe, Fine-Grained, Shared-Memory Interoperability Down to WebAssembly 引用了 Iris-Wasm: Robust and Modular Verification of WebAssembly Programs
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper9

  1. Iris-Wasm: Robust and Modular Verification of WebAssembly ProgramsXiaojia Rao, Aïna Linn Georges, Maxime Legoupil, Conrad Watt 等PLDI 2023 · 19 次引用
  2. WASMaker: Differential Testing of WebAssembly Runtimes via Semantic-Aware Binary GenerationShangtong Cao, Ningyu He, Xinyu She, Yixuan Zhang 等ISSTA 2024 · 8 次引用
  3. Put Your Memory in Order: Efficient Domain-based Memory Isolation for WASM ApplicationsHanwen Lei, Ziqi Zhang, Shaokun Zhang, Peng Jiang 等CCS 2023 · 7 次引用
  4. Iris-MSWasm: Elucidating and Mechanising the Security Invariants of Memory-Safe WebAssemblyMaxime Legoupil, June Rousseau, Aïna Linn Georges, Jean Pichon-Pharabod 等OOPSLA 2024 · 5 次引用
  5. RichWasm: Bringing Safe, Fine-Grained, Shared-Memory Interoperability Down to WebAssemblyMichael Fitzgibbons, Zoe Paraskevopoulou, Noble Mushtak, Michelle Thalakottur 等PLDI 2024 · 3 次引用

它引用的 Paper8

  1. PAC it up: Towards Pointer Integrity using ARM Pointer AuthenticationHans Liljestrand, Thomas Nyman, Kui Wang, Carlos Chinea Perez 等USENIX Security 2019 · 168 次引用
  2. An Empirical Study of Real-World WebAssembly Binaries: Security, Languages, Use CasesAaron Hilbig, Daniel Lehmann, Michael PradelWWW 2021 · 114 次引用
  3. TypeSan: Practical Type Confusion DetectionIstván Haller, Yuseok Jeon, Hui Peng, Mathias Payer 等CCS 2016 · 97 次引用
  4. Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling PointersThurston H. Y. Dang, Petros Maniatis, David A. WagnerUSENIX Security 2017 · 77 次引用
  5. Cornucopia: Temporal Safety for CHERI HeapsNathaniel Wesley Filardo, Brett F. Gutstein, Jonathan Woodruff, Sam Ainsworth 等S&P 2020 · 71 次引用

相关 Paper

  1. Provably-Safe Multilingual Software Sandboxing using WebAssemblyJay Bosamiya, Wen Shih Lim, Bryan ParnoUSENIX Security 2022
  2. Indexed Types for a Statically Safe WebAssemblyAdam T. Geller, Justin Frank, William J. BowmanPOPL 2024 · 4 次引用
  3. WBSan: WebAssembly Bug Detection for Sanitization and Binary-Only FuzzingXiao Wu, Junzhou He, Liyan Huang, Cai Fu 等WWW 2025 · 5 次引用
  4. Translating C To Rust: Lessons from a User StudyRuishi Li, Bo Wang, Tianyu Li, Prateek Saxena 等NDSS 2025
  5. Evaluating the Effectiveness of Memory Safety SanitizersEmanuel Q. Vintila, Philipp Zieris, Julian HorschS&P 2025
黄昏的海面,两侧是细线勾勒的悬崖