← Lab /AI/ML

CNN detects WebAssembly memory corruption with as low as 1.07× overhead

CNN-based classification can effectively detect memory corruption in WebAssembly applications

AI/ML arXiv 25 Mar 2026 Method Prototype evidence

Published as “Walma: Learning to See Memory Corruption in WebAssembly”

Why it matters

Walma makes continuous memory integrity verification feasible for production Wasm deployments where structured data dominates, but its effectiveness drops for unstructured code.

Summary

Walma can detect memory corruption in WebAssembly modules by classifying linear memory snapshots with a CNN, achieving 100% verdict accuracy on structured workloads such as the flac audio encoder. The approach incurs low runtime overhead, as low as 1.07× (7% overhead) for coarse-grained boundary checks, and up to 1.82× for fine-grained monitoring. The evaluation is based on six real-world CVE-affected applications, showing strong results on structured data but only around 50% accuracy on unstructured workloads like abc2mtex.

What they found 2

  1. 100% verdict accuracy on structured workloads

    “Walma achieves 100% verdict accuracy.”

  2. Low overhead for coarse-grained boundary checks

    “1.07× using the optimized cpu-wasm backend.”

Caveats 6

  • Unstructured workloads such as abc2mtex achieve only ~50% accuracy, limiting the approach for many real-world programs.
  • The generalized model’s accuracy drops to 65.50% on pdfresurrect, showing reduced reliability without program-specific training.
  • GPU offloading incurs much higher latency (up to 42.94 ms) due to PCIe transfer overhead, contradicting the claim of universally low overhead.
  • Individual snapshot classifications can be noisy, but Walma mitigates this through temporal verdict aggregation.
  • The runtime overhead of Walma is highly dependent on the instrumentation granularity.
  • Future work will focus on improving detection for unstructured workloads.

What’s new here 4

  • Applies image-based CNN classification to WebAssembly linear memory snapshots for integrity attestation.
  • Provides a runtime-agnostic framework that can run verification inside the Wasm runtime (cpu-wasm) to avoid costly data transfers.
  • Demonstrates a generalized model that transfers across different applications without per-program retraining.
  • Offers tunable instrumentation policies (import, local, memory) with quantified performance trade-offs.