# Walma: Learning to See Memory Corruption in WebAssembly

DevFeed: [Walma: Learning to See Memory Corruption in WebAssembly](<https://devfeed.tech/articles/walma-learning-to-see-memory-corruption-in-webassembly-113984.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2603.24167>)

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

Published: 2026-11-03T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [Neural Network](<https://devfeed.tech/topics/neural-network.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [ai security](<https://devfeed.tech/topics/ai-security.md>), [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>)

Tags: [adversarial](<https://devfeed.tech/tags/adversarial.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [applications](<https://devfeed.tech/tags/applications.md>), [arxiv](<https://devfeed.tech/tags/arxiv.md>), [attack](<https://devfeed.tech/tags/attack.md>), [attack-surface](<https://devfeed.tech/tags/attack-surface.md>), [attestation](<https://devfeed.tech/tags/attestation.md>), [binaries](<https://devfeed.tech/tags/binaries.md>), [boundary](<https://devfeed.tech/tags/boundary.md>), [bug](<https://devfeed.tech/tags/bug.md>), [costs](<https://devfeed.tech/tags/costs.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [cve](<https://devfeed.tech/tags/cve.md>), [data](<https://devfeed.tech/tags/data.md>), [entropy](<https://devfeed.tech/tags/entropy.md>), [evasion](<https://devfeed.tech/tags/evasion.md>), [framework](<https://devfeed.tech/tags/framework.md>), [learning](<https://devfeed.tech/tags/learning.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-corruption](<https://devfeed.tech/tags/memory-corruption.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

## AI overview

WALMA detects WebAssembly linear-memory corruption by turning memory snapshots into grayscale images and classifying their compiled-code row structure with a convolutional neural network. Its VGG-16 detector achieved 95%-100% verdict accuracy on four of five CVE-affected applications with no false alarms; a smaller 1.9-million-parameter ResNet came within a few points on those four and can run inside the runtime on every host call. Boundary attestation on 53 WABench binaries added 1.07x-1.69x cost, which the authors report scales with host exposure. The method can check integrity against compromised modules and against untrusted hosts only if snapshots reach the verifier intact. The abstract also reports that black-box evasion requires contiguous overwrites of hundreds of kilobytes to megabytes.

## Source excerpt

arXiv:2603.24167v3 Announce Type: replace Abstract: The monolithic linear memory of WebAssembly (Wasm) creates a bidirectional attack surface: a memory corruption bug in a module can compromise the host, and a compromised host can corrupt the state of a trusted module. Existing defenses either require custom runtimes or source code changes, and none can verify runtime integrity under an adversarial host. We present WALMA, the first attestation framework delivering resilience by reaction against data-centric attacks that corrupt a region of memory. We render linear memory snapshots as grayscale images and classify 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. Our main VGG-16 detector reaches 95%--100% verdict accuracy on four of five CVE-affected applications without a single false alarm, and a 1.9M-parameter ResNet, small enough to run inside the runtime on every host call, stays within a few points of it on the same four. A Shannon-entropy analysis bounds which out-of-band edits the network can separate from valid state, and black-box evasion requires contiguous overwrites of hundreds of kilobytes to megabytes. On the 53 WABench binaries, boundary attestation costs 1.07x--1.69x, scaling with a module's exposure to the host rather than with its runtime. WALMA thus makes linear memory integrity a property a Wasm runtime can check continuously: end to end against compromised modules, and against untrusted hosts provided snapshots reach the verifier intact.