MSWasm: Soundly Enforcing Memory-Safe Execution of Unsafe Code
summary
Extends Wasm with segmented memory and unforgeable handles that carry colored provenance, a formal semantics, and a proof that well-typed MSWasm modules are robustly memory safe even when linked with adversarial modules. Provides a formal C-to-MSWasm compiler (extends Clang) that either preserves safe C semantics or guarantees a trap at the first C memory violation. Implements three compilers and reports overheads from 22% (spatial software) up to 198% (full software), and 51.7% with hardware capabilities.
AI-written summary · about
chapters (20)
- 0:00MSWasm: Soundly Enforcing Memory- Safe Execution of Unsafe Code
- 0:29WebAssembly
- 1:42But, Little Protection Within Sandbox!
- 2:22Vulnerabilities Persist Across Compilation
- 3:37Compiler Could Insert Inlined Memory Safety Checks
- 5:38Why are Inlined Memory Safety Checks Slow?
- 6:21Our Solution: MSWasm
- 8:35Allocating a Segment
- 9:32Handle Arithmetic
- 10:21Accessing a Segment
- 11:27How to Enforce Memory Safety via Compilation?
- 11:55Recall: Buffer Overflow Persists Across Compilation to Wasm
- 12:20Compilation to MSWasm Without Buffer Overflows
- 13:20What is Memory Safety, Formally?
- 14:25Recall: Limitations of Inlined Memory Safety Checks
- 14:51MSWasm is Robustly Memory Safe
- 15:35Language-Agnostic Memory Safety Monitor
- 17:52Implementation
- 18:46Evaluation: Can MSWasm Leverage Platform-Specific Features? Yes.
- 20:51MSWasm: Soundly Enforcing Memory-Safe Execution of Unsafe Code
related talks
26mMemory Safety Preservation for WebAssembly
21mIris-MSWasm: elucidating and mechanising the security invariants of Memory-Safe(…)
43mRichWasm: Bringing Safe, Fine-Grained, Shared Memory Interoperability to WebAssem...
32mAll The Memory Safety Of C Combined With All The Blazing Speed Of JavaScript
21mRichWasm: Bringing Safe, Fine-Grained, Shared-Memory Interoperability Down to WebAssembly
34mPlaying Safely in the...
24mWebAssembly as an Intermediate Language for Provably-Safe Software Sandboxing
37mBridging the Architecture Divide: How Hardware Limits Wasm, and How We Can Do Better
