# Walma: Learning to See Memory Corruption in WebAssembly

Source: [Walma: Learning to See Memory Corruption in WebAssembly](<https://www.sota2.com/research/paper/69c4bdb80636e5bf4afc778b>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-07-08T05:00:13.057Z

Authors: Oussama Draissi, Mark G\\"unzel, Ahmad-Reza Sadeghi, Lucas Davi

Published: 2026-03-25T10:34:29.000Z

## Abstract

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.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Memory Corruption Detection on flac (test)](<https://www.sota2.com/research/sota/memory-corruption-detection-on-flac-test.md>): Memory corruption detection; flac (test); Accuracy: 100.

- [Memory Corruption Detection on pnm2png (test)](<https://www.sota2.com/research/sota/memory-corruption-detection-on-pnm2png-test.md>): Memory corruption detection; pnm2png (test); Accuracy: 97.

- [Memory Corruption Detection on pdfresurrect (test)](<https://www.sota2.com/research/sota/memory-corruption-detection-on-pdfresurrect-test.md>): Memory corruption detection; pdfresurrect (test); Accuracy: 73.5.

- [Memory Corruption Detection on abc2mtex (test)](<https://www.sota2.com/research/sota/memory-corruption-detection-on-abc2mtex-test.md>): Memory corruption detection; abc2mtex (test); Accuracy: 50.5.

- [Memory corruption detection on pal2rgb (test)](<https://www.sota2.com/research/sota/memory-corruption-detection-on-pal2rgb-test.md>): Memory corruption detection; pal2rgb (test); Accuracy: 100.

- [Memory corruption detection on jbig2dec (test)](<https://www.sota2.com/research/sota/memory-corruption-detection-on-jbig2dec-test.md>): Memory corruption detection; jbig2dec (test); Accuracy: 85.43.

- [Memory Corruption Detection on pal2rgb held-out (test)](<https://www.sota2.com/research/sota/memory-corruption-detection-on-pal2rgb-held-out-test.md>): Memory corruption detection; pal2rgb held-out (test); Accuracy: 98.43.

- [Memory Corruption Detection on jbig2dec held-out (test)](<https://www.sota2.com/research/sota/memory-corruption-detection-on-jbig2dec-held-out-test.md>): Memory corruption detection; jbig2dec held-out (test); Accuracy: 85.43.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2603.24167>)

[PDF](<https://arxiv.org/pdf/2603.24167.pdf>)
