# Walma: Learning to See Memory Corruption in WebAssembly

arXiv: https://arxiv.org/abs/2603.24167 · HTML: https://mlsanity.com/paper/2603.24167/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 18 of its 78 references that are in the map.
- First posted on arXiv 25 Mar 2026.

## Builds on (most cited first, 18 of 18)

- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [Very Deep Convolutional Networks for Large-Scale Image Recognition](https://mlsanity.com/paper/1409.1556/) (2014)
- [Explaining and Harnessing Adversarial Examples](https://mlsanity.com/paper/1412.6572/) (2014)
- [SAFE: Self-Attentive Function Embeddings for Binary Similarity](https://mlsanity.com/paper/1811.05296/) (2018)
- [C-FLAT: Control-FLow ATtestation for Embedded Systems Software](https://mlsanity.com/paper/1605.07763/) (2016)
- [WaTZ: A Trusted WebAssembly Runtime Environment with Remote Attestation for TrustZone](https://mlsanity.com/paper/2206.08722/) (2022)
- [Side-Channel Analysis of OpenVINO-based Neural Network Models](https://mlsanity.com/paper/2407.16467/) (2024)
- [OAT: Attesting Operation Integrity of Embedded Devices](https://mlsanity.com/paper/1802.03462/) (2018)
- [Retrofitting Fine Grain Isolation in the Firefox Renderer (Extended Version)](https://mlsanity.com/paper/2003.00572/) (2020)
- [Twine: An Embedded Trusted Runtime for WebAssembly](https://mlsanity.com/paper/2103.15860/) (2021)
- [Eunomia: Enabling User-specified Fine-Grained Search in Symbolically Executing WebAssembly Binaries](https://mlsanity.com/paper/2304.07204/) (2023)
- [On the Lack of Robustness of Binary Function Similarity Systems](https://mlsanity.com/paper/2412.04163/) (2024)
- [DIALED: Data Integrity Attestation for Low-end Embedded Devices](https://mlsanity.com/paper/2103.12928/) (2021)
- [Fuzzm: Finding Memory Bugs through Binary-Only Instrumentation and Fuzzing of WebAssembly](https://mlsanity.com/paper/2110.15433/) (2021)
- [MSWasm: Soundly Enforcing Memory-Safe Execution of Unsafe Code](https://mlsanity.com/paper/2208.13583/) (2022)
- [One for All and All for One: GNN-based Control-Flow Attestation for Embedded Devices](https://mlsanity.com/paper/2403.07465/) (2024)
- [SeeWasm: An Efficient and Fully-Functional Symbolic Execution Engine for WebAssembly Binaries](https://mlsanity.com/paper/2408.08537/) (2024)
- [The Promise and Pitfalls of WebAssembly: Perspectives from the Industry](https://mlsanity.com/paper/2503.21240/) (2025)

## Abstract (arXiv)

WebAssembly's (Wasm) monolithic linear memory turns a single memory-corruption bug into a bidirectional threat: a compromised module can attack its embedding host, and a malicious host can tamper with a trusted module's state. Existing defenses require custom runtimes or source changes, and none can verify runtime integrity under an adversarial host. We present Walma, a framework for WebAssembly linear memory attestation that renders snapshots of linear memory as grayscale images and classifies them with a convolutional neural network. The network reads the row-aligned structure that compiled code imposes on memory and detects corruption that byte and texture statistics miss. On structured targets this extends to tampering that no program input triggers, such as direct memory writes by a malicious host. On real-world CVE-affected applications, hiding corruption from Walma's verdict requires overwriting a large fraction of memory, hundreds of kilobytes to megabytes on our targets. A Shannon-entropy analysis of benign memory bounds the class of out-of-band edits that the learned prior can detect. Across the 53 binaries of the WABench suite, attestation costs 1.07x--1.69x at the host boundary, making continuous, state-centric memory attestation for Wasm practical.
