Walma: Learning to See Memory Corruption in WebAssembly
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: We're looking at the paper: "Walma: Learning to See Memory Corruption in WebAssembly".
Elias: Here's the gist of the paper. WebAssembly’s 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 The authors 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 This research is significant because it introduces a continuous, state-centric primitive that audits the module’s mutable state itself, with a verifier placeable on either side of the trust boundary The Core Problem Addressed WebAssembly modules hold all of its mutable state in one contiguous byte array with no internal memory protection A memory corruption bug is therefore rarely contained because an overflow in one buffer can corrupt any other structure in the module The sandbox isolates the module from its host, but the host implicitly trusts data returned across the boundary, so a data-only attack can escalate into a full host compromise A privileged host such as a malicious administrator or a compromised hypervisor can tamper with linear memory directly and subvert authorization checks before they reach the user This creates a bidirectional integrity problem that existing defenses leave open How the Training Signal is Built The offline training phase constructs the classifier from synthetically generated states The corpus comes from binary instrumentation that injects snapshot hooks at deterministic points, plus coverage-guided fuzzing
12, 14, 15, 30: that drives the instrumented binary along diverse paths Valid Wasm memory layouts are application-specific, so no closed-form rule separates a benign state from a corrupted one; Walma must learn that boundary from observed executions The corpus is labeled using AddressSanitizer (ASan)
48: , the standard oracle for memory-corruption detection
14, 15: , whose near-zero false-positive rate keeps label noise out of the corrupted class Each captured snapshot inherits the label of its input, yielding a per-target corpus of labeled snapshots Where the Gains Come From Walma achieves four properties: 1 statecentric attestation that catches the memory footprint of data-only exploitation, which control-flow attestation misses; 2 bidirectional applicability, with a single attester–verifier protocol protecting a trusted module from a malicious host and a trusted host from a compromised module; 3 sanitizer independence at inference, detecting tampering with no sanitizer in the loop; and 4 tunable cost, exposed through three instrumentation policies and three verifier backends The visual encoding exploits the row-aligned structure that compiled code imposes on memory—audio frames, pixel rows, allocator headers—so corruption appears as a localized texture disruption a CNN detects without hand-engineered features On five CVE-affected applications, our main VGG-16 model
52: reaches 95 %–100 % verdict accuracy on four of the five targets, without a single false alarm on benign inputs on any target Performance and Practicality Across WABench’s 53 binaries
17, 45, 63: , attestation costs 1.07×–1.69× at the host boundary, making continuous, state-centric memory attestation for Wasm practical The performance-optimal choice is also the one that never exposes snapshots off the runtime For in-runtime CPU inference at 5.3 ms per snapshot, this beats GPU offloading because data transfer dominates compute at this snapshot size The Import policy—checking memory exactly where an attack escapes the sandbox—incurs only a 1.07× slowdown on compute kernels and 1.69× on host-call-heavy workloads This realizes the tunable security–performance contract of Section 3: finer inter-snapshot coverage costs proportionally more Limitations and Future Directions Walma’s weak targets are those whose benign memory lacks row-aligned structure Program-Specific Models train one model per target, generalizing to unseen inputs within a program, but do not transfer across programs A privileged host with white-box model access could craft memory states the classifier reads as benign Snapshot Freshness is a matter rather than a limit of visual classification because replay or corrupt-then-restore races can occur without nonces Walma is a detection primitive, and prevention under Scenario A would mean trusting the host we explicitly do not trust The same property admits a benign-only, one-class verifier needing no corrupted class at all Walma is the first linear-memory attestation framework for WebAssembly, reducing integrity verification to image classification It covers both directions of the Wasm trust relationship, with the verifier inside a TEE against an untrusted cloud host or beside the browser against a compromised module Its VGG-16 model reaches 95 %–100 % verdict accuracy on four of five CVE-affected applications, never raising a false alarm on a benign input, with misses concentrated where benign memory approaches maximal entropy Across 53 WABench binaries, the in-runtime VGG-16 backend attests at 1.07×–1.69× for boundary defense and 1.50×–2.65× per function—a practical primitive for continuous Wasm memory integrity Acknowledgments This work was partially funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) through SFB 1119 – 236615297, project S2 References
0009-0005-6065-8087: A library OS for Linux multi-process applications, with Intel SGX support.
Nadia: url: https://github.com/gramineproject/gramine (Accessed: 2626-1).
1: A library OS for Linux multi-process applications, with Intel SGX support.
Nadia: url: https://github.com/gramineproject/gramine (Accessed: 2026-01-09).
Title and authors: Nadia: Moving on to how they frame this, "Walma: Learning to See Memory Corruption in WebAssembly" is a pretty straightforward title, but it really highlights the core idea of using AI to analyze memory states. It positions linear memory attestation not as a hard rule set you write, but as an image classification problem that the system learns from observation.
Elias: It emphasizes the learning aspect, which is key because they aren't relying on a closed-form rule to separate good from bad memory states; instead, Walma has to learn that boundary from observed executions. That shifts the defense mechanism entirely.
Priya: So it’s not about writing perfect memory safety checks, but about training a model on what corrupted data looks like visually in terms of its layout. That feels different from traditional formal verification methods we usually talk about when discussing module security.
Nadia: Right, and the authors are addressing the bidirectional threat here too. They're showing that this single attester verifier protocol can protect a trusted module from a malicious host while also protecting a trusted host from a compromised module, which is important because it covers both directions of the trust relationship.
Elias: That bidirectional applicability is what makes this framework distinct; it’s not just one-way monitoring. They are looking at how memory corruption in one direction can compromise the other side of the boundary.
The paper's summary: Nadia: So, to summarize what they’re doing, Walma is a framework for WebAssembly linear memory attestation where snapshots are rendered as grayscale images and classified by a convolutional neural network that reads those row-aligned structures. This detects corruption that traditional byte and texture statistics often miss.
Elias: The summary points out the bidirectional threat clearly: a corrupted module can attack the host, but also a malicious host can tamper with the trusted module's state directly, which is what existing defenses leave open.
Priya: It’s about using this visual classification to catch data-only attacks that control-flow attestation misses. They are validating the memory footprint itself instead of just watching the execution path, which is a really interesting approach for identifying subtle tampering.
Nadia: And they show how they build their training signal: they use binary instrumentation for deterministic snapshots and coverage-guided fuzzing to drive that instrumented binary along diverse paths to get a rich corpus. The labels come from AddressSanitizer, which is the standard oracle for memory corruption detection, so the label noise is kept out of the corrupted class.
Elias: They also detail how they tune this system through three instrumentation policies and three verifier backends, which gives them that tunable cost aspect they mention later on. It shows a practical mechanism for security-performance contracting in this context.
The paper's improvements: Nadia: The authors highlight several improvements to the existing ideas in this paper, specifically focusing on what Walma actually achieves. They claim it provides state-centric attestation that catches the memory footprint of data-only exploitation, which control-flow attestation misses.
Elias: That’s a big claim because it means they are catching things that bypass standard execution flow checks by looking at the underlying data structure itself, and they also achieve bidirectional applicability with a single protocol between an attester and verifier.
Priya: And I see the improvement in sanitizer independence at inference, meaning the detection works even if there’s no sanitizer running during the actual checking loop, which is a nice feature for deployment scenarios where you can't always guarantee instrumentation is present.
Nadia: They also point out that the visual encoding exploits that row-aligned structure compiled code imposes on memory, so corruption appears as a localized texture disruption that the CNN detects without needing hand-engineered features. That’s a very data-driven way to find anomalies.
Elias: And they quantify how effective it is, saying their main VGG16 model reaches ninety-five percent to one hundred percent verdict accuracy on four of the five CVE-affected applications, which gives us a concrete performance benchmark against known vulnerabilities.
Conclusion: Nadia: So wrapping this up on "Walma: Learning to See Memory Corruption in WebAssembly," it’s essentially introducing the first linear-memory attestation framework for WebAssembly by reducing integrity verification to an image classification problem. It covers both sides of the Wasm trust relationship.
Elias: The key implication is that we can move toward continuous, state-centric memory attestation where a verifier sits either inside a TEE against an untrusted cloud host or beside the browser against a compromised module. This makes integrity verification much more practical than relying solely on custom runtimes or source changes.
Priya: From my side, it’s interesting that they bound the detection effectiveness by Shannon entropy analysis, which quantifies what kind of out-of-band edits the learned prior can actually find, giving us a measurable limit on its capability.
Nadia: They show that across fifty three WABench binaries, their in-runtime backend attests at one point zero seven times to one point six nine times for boundary defense and one point five zero times to two point six five times per function. That’s a practical primitive for continuous integrity checks on WebAssembly memory.
Elias: It’s a lot of work, but it seems like this approach provides a tangible way to deal with the inherent bidirectional integrity problem that monolithic linear memory creates in Wasm environments. We’ll keep an eye on how this evolves into real deployment scenarios.
Oussama Draissi, Mark Günzel, Ahmad-Reza Sadeghi, Lucas Davi
University of Duisburg-Essen · Technical University of Darmstadt
cs.CR, cs.LG
Submitted: 2026-03-25
Updated: 2026-11-02
Comments: 12 pages, 5 figures, 3 tables
Code: https://github.com/gramineproject/gramine
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 92/100
The gist: WebAssembly’s monolithic linear memory turns a single memory-corruption bug into a bidirectional threat: a compromised module can attack its embedding host…
Key concepts
- Linear Memory Attestation
- This is a method to verify the integrity of WebAssembly's single block of memory. Walma treats this memory as an image, allowing it to check if the data structure has been corrupted without needing internal knowledge of the program's code or execution flow.
- Snapshot Classification via CNN
- The system takes pictures (snapshots) of the entire memory state and uses a Convolutional Neural Network (CNN) to classify them. The CNN learns to recognize patterns in how compiled code organizes memory, identifying localized texture disruptions that indicate corruption.
- Bidirectional Trust Boundary
- Walma's verifier can be placed on either side of the Wasm trust boundary. This means it can protect a trusted module from a malicious host or audit a trusted host for tampering with the module's state, creating comprehensive security coverage.
Terminology
Summary
WebAssembly’s 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 The authors 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 This research is significant because it introduces a continuous, state-centric primitive that audits the module’s mutable state itself, with a verifier placeable on either side of the trust boundary
The Core Problem Addressed
WebAssembly modules hold all of its mutable state in one contiguous byte array with no internal memory protection A memory corruption bug is therefore rarely contained because an overflow in one buffer can corrupt any other structure in the module The sandbox isolates the module from its host, but the host implicitly trusts data returned across the boundary, so a data-only attack can escalate into a full host compromise A privileged host such as a malicious administrator or a compromised hypervisor can tamper with linear memory directly and subvert authorization checks before they reach the user This creates a bidirectional integrity problem that existing defenses leave open
How the Training Signal is Built
The offline training phase constructs the classifier from synthetically generated states The corpus comes from binary instrumentation that injects snapshot hooks at deterministic points, plus coverage-guided fuzzing [12, 14, 15, 30] that drives the instrumented binary along diverse paths Valid Wasm memory layouts are application-specific, so no closed-form rule separates a benign state from a corrupted one; Walma must learn that boundary from observed executions The corpus is labeled using AddressSanitizer (ASan) [48], the standard oracle for memory-corruption detection [14, 15], whose near-zero false-positive rate keeps label noise out of the corrupted class Each captured snapshot inherits the label of its input, yielding a per-target corpus of labeled snapshots
Where the Gains Come From
Walma achieves four properties: 1 statecentric attestation that catches the memory footprint of data-only exploitation, which control-flow attestation misses; 2 bidirectional applicability, with a single attester–verifier protocol protecting a trusted module from a malicious host and a trusted host from a compromised module; 3 sanitizer independence at inference, detecting tampering with no sanitizer in the loop; and 4 tunable cost, exposed through three instrumentation policies and three verifier backends The visual encoding exploits the row-aligned structure that compiled code imposes on memory—audio frames, pixel rows, allocator headers—so corruption appears as a localized texture disruption a CNN detects without hand-engineered features On five CVE-affected applications, our main VGG-16 model [52] reaches 95 %–100 % verdict accuracy on four of the five targets, without a single false alarm on benign inputs on any target
Performance and Practicality
Across WABench’s 53 binaries [17, 45, 63], attestation costs 1.07×–1.69× at the host boundary, making continuous, state-centric memory attestation for Wasm practical The performance-optimal choice is also the one that never exposes snapshots off the runtime For in-runtime CPU inference at 5. p. 0 07
×
–
1. 69
× at the host boundary, making continuous, state-centric memory
attestation for Wasm practical. 3 ms per snapshot beats GPU offloading, because data transfer
dominates compute at this snapshot size. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. All five are batch-style parsers and codecs. We measure runtime
overhead on WABench [63], 53 binaries in total: 30 PolyBench [45] compute kernels, 12 MiBench [17] embedded utilities, and 11 real-world applications with
large memory needs.Where the paper says it
Where the paper says it
Where the paper says it
Limitations and Future Directions
Walma’s weak targets are those whose benign memory lacks row-aligned structure Program-Specific Models train one model per target, generalizing to unseen inputs within a program, but do not transfer across programs A privileged host with white-box model access could craft memory states the classifier reads as benign Snapshot Freshness is a matter rather than a limit of visual classification because replay or corrupt-then-restore races can occur without nonces Walma is a detection primitive, and prevention under Scenario A would mean trusting the host we explicitly do not trust The same property admits a benign-only, one-class verifier needing no corrupted class at all
Conclusion
Walma is the first linear-memory attestation framework for WebAssembly, reducing integrity verification to image classification It covers both directions of the Wasm trust relationship, with the verifier inside a TEE against an untrusted cloud host or beside the browser against a compromised module Its VGG-16 model reaches 95 %–100 % verdict accuracy on four of five CVE-affected applications, never raising a false alarm on a benign input, with misses concentrated where benign memory approaches maximal entropy Across 53 WABench binaries, the in-runtime VGG-16 backend attests at 1.07×–1.69× for boundary defense and 1. p. 2 Walma also
catches tampering no input triggers and no sanitizer flags: DMA-injected corruption on the structured target pnm2png, and snapshots overwritten entirely
with random bytes on all five targets. Across WABench’s 53 binaries [17, 45,
63], Walma exposes three operating points: boundary defense at every host interaction (1.Where the paper says it
Acknowledgments
This work was partially funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) through SFB 1119 – 236615297, project S2
References
[0009-0005-6065-8087] A library OS for Linux multi-process applications, with Intel SGX support. url: https://github. p. 2 – A performance characterization over WABench’s 53 binaries at three operating points, one per instrumentation policy: boundary defense at host calls,
per-function attestation, and per-write attestation as an upper bound. We release Walma at https://anonymous. – A performance characterization over WABench’s 53 binaries at three operating points, one per instrumentation policy: boundary defense at host calls,
per-function attestation, and per-write attestation as an upper bound. We release Walma at https://anonymous. – A performance characterization over WABench’s 53 binaries at three operating points, one per instrumentation policy: boundary defense at host calls,
per-function attestation, and per-write attestation as an upper bound. We release Walma at https://anonymous. Draissi et al. package this runtime inside Gramine [1] as a separate SGX enclave, alongside
the untrusted application runtime.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
[1] A library OS for Linux multi-process applications, with Intel SGX support. url: https://github.com/gramineproject/gramine (Accessed: 2026-01-09). p. 0 24167v2 [cs. CR] 3 Jul 2026Where the paper says it
[2] Mart´ın Abadi et al. “CFI: Principles, implementations, and applications”. p. 2 2 Background
2. 1 WebAssembly Security
Wasm’s security model [65] rests on software fault isolation (SFI) [60], controlflow integrity (CFI) [2], and code immutability—a strong sandbox that isolates
the module from the host and rules out classical code-reuse [51] and codeinjection [67] attacks. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
[3] Tigist Abera et al. “C-FLAT: Control-Flow Attestation for Embedded Systems Software”. p. 1 Isolation and hardening schemes [28,
34, 40, 41] demand custom runtimes, source changes, or specialized hardware;
binary-rewriting memory-safety instrumentation [32, 66] is fragile under optimization and, running inside the module, powerless against an adversarial host. ASLR [55] does not fit Wasm’s flat memory model, and code- or control-flow
attestation [3, 10, 49, 50, 53, 68] misses the data-only attacks that drive real
Wasm exploits [12, 31, 38].Where the paper says it
[4] American Express Revolutionizes FaaS with WebAssembly. 2024. url: https://talent500. p. 2 – A performance characterization over WABench’s 53 binaries at three operating points, one per instrumentation policy: boundary defense at host calls,
per-function attestation, and per-write attestation as an upper bound. We release Walma at https://anonymous.Where the paper says it
[5] Mahmoud Ammar et al. “SoK: Integrity, Attestation, and Auditing of Program Execution”. p. 3 CFA still misses data-only attacks [5, 25]:
decision variables in linear memory can be manipulated to subvert program logic
without diverting a single branch. This gap motivates the complementary, statecentric approach Walma takes: validating the memory footprint itself rather
than the execution path. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
[6] Guillaume Bonfante et al. “Architecture of a Morphological Malware Detector”. p. 7 Draissi et al. is our main detector for accuracy.Where the paper says it
[7] Gianluca Capozzi et al. “On the Lack of Robustness of Binary Function Similarity Systems”. p. 0 69
× at the host boundary, making continuous, state-centric memory
attestation for Wasm practical. 1 Introduction
WebAssembly (Wasm) [18], a portable bytecode that runs untrusted code inside a sandbox, has grown beyond its browser origins into a universal binary
format for edge computing, serverless functions, smart contracts, and embedded systems [56]. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization. A Wasm module holds all of its mutable state in one contiguous byte array with no internal memory protection [65], its linear memory. A memorycorruption bug is therefore rarely contained: an overflow in one buffer can silently
arXiv:2603.Where the paper says it
Where the paper says it
Where the paper says it
[8] Marco Chilese et al. “One for all and all for one: GNN-based control-flow attestation for embedded devices”. p. 1 Isolation and hardening schemes [28,
34, 40, 41] demand custom runtimes, source changes, or specialized hardware;
binary-rewriting memory-safety instrumentation [32, 66] is fragile under optimization and, running inside the module, powerless against an adversarial host. ASLR [55] does not fit Wasm’s flat memory model, and code- or control-flow
attestation [3, 10, 49, 50, 53, 68] misses the data-only attacks that drive real
Wasm exploits [12, 31, 38].Where the paper says it
[9] Ivan De Oliveira Nunes et al. “DIALED: Data Integrity Attestation for Lowend Embedded Devices”. p. 0 69
× at the host boundary, making continuous, state-centric memory
attestation for Wasm practical. 1 Introduction
WebAssembly (Wasm) [18], a portable bytecode that runs untrusted code inside a sandbox, has grown beyond its browser origins into a universal binary
format for edge computing, serverless functions, smart contracts, and embedded systems [56]. 3 ms per snapshot beats GPU offloading, because data transfer
dominates compute at this snapshot size. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly.Where the paper says it
Where the paper says it
[10] Ghada Dessouky et al. “LiteHAX: lightweight hardware-assisted attestation of program execution”. p. 3 CFA still misses data-only attacks [5, 25]:
decision variables in linear memory can be manipulated to subvert program logic
without diverting a single branch. This gap motivates the complementary, statecentric approach Walma takes: validating the memory footprint itself rather
than the execution path. 3 ms per snapshot beats GPU offloading, because data transfer
dominates compute at this snapshot size. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly.Where the paper says it
Where the paper says it
[11] Sushant Dinesh et al. “RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization”. p. 5 Valid Wasm memory layouts are application-specific, so
no closed-form rule separates a benign state from a corrupted one; Walma
must learn that boundary from observed executions. The corpus comes from
binary instrumentation that injects snapshot hooks at deterministic points, plus
coverage-guided fuzzing [12, 14, 15, 30] that drives the instrumented binary along
diverse paths.Where the paper says it
[12] Oussama Draissi et al. “Wemby’s Web: Hunting for memory corruption in WebAssembly”. p. 4 An overflow rewriting a Wasm-side string, for example, can
reach an unsafe sink such as innerHTML and produce DOM injection [12]. Here,
Walma runs as a browser-side monitor, inspecting the module’s memory at instrumented points and detecting corruption inside the sandbox before it crosses
into shared host state—a meaningful defense for major Wasm-powered web applications [13]. 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. 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.Where the paper says it
Where the paper says it
Where the paper says it
[13] Figma. WebAssembly cut Figma’s load time by 3x. p. 0 1 Introduction
WebAssembly (Wasm) [18], a portable bytecode that runs untrusted code inside a sandbox, has grown beyond its browser origins into a universal binary
format for edge computing, serverless functions, smart contracts, and embedded systems [56]. Major platforms such as Figma, Google Earth, Zoom, Cloudflare Workers, and American Express’s internal FaaS rely on it for performancecritical execution [4, 13, 56]. – A performance characterization over WABench’s 53 binaries at three operating points, one per instrumentation policy: boundary defense at host calls,
per-function attestation, and per-write attestation as an upper bound. We release Walma at https://anonymous.Where the paper says it
Where the paper says it
[14] Andrea Fioraldi et al. “AFL++: Combining Incremental Steps of Fuzzing Research”. p. 3 3 Threat Model
Wasm’s trust relationship is bidirectional: a module may be the victim of its
environment, or a threat to it. We consider two deployment scenarios (Figure 1) capturing both directions, each reflecting established adversarial models
in cloud [39, 62] and web [12, 31, 38] security research.Where the paper says it
[15] Andrea Fioraldi et al. “LibAFL: A framework to build modular and reusable fuzzers”. p. 6 Walma ships two classifiers that span a latency–accuracy range;
a deployment picks the point its attestation frequency allows. We build on VGG16 [52] and ResNet [19], proven backbones for grayscale byteplot classification in
security [47, 57].Where the paper says it
[16] Ian J. Goodfellow et al. “Explaining and Harnessing Adversarial Examples”. p. 0 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. Walma: Learning to See Memory Corruption in
WebAssembly
Oussama Draissi
1[0009-0005-6065-8087], Mark G¨unzel
1
, Ahmad-Reza
Sadeghi
2[0000-0001-6833-3598], and Lucas Davi
1[0000-0002-7322-2777]
1 paluno, University of Duisburg-Essen, Essen, Germany
{oussama. draissi, lucas.Where the paper says it
Where the paper says it
[17] Matthew R Guthaus et al. “MiBench: A free, commercially representative embedded benchmark suite”. p. 9 All five are batch-style parsers and codecs. We measure runtime
overhead on WABench [63], 53 binaries in total: 30 PolyBench [45] compute kernels, 12 MiBench [17] embedded utilities, and 11 real-world applications with
large memory needs. – Evidence that Walma is sanitizer-independent at inference: it detects outof-band tampering that no sanitizer flags, and we map the entropy range in
which a learned valid-memory prior separates benign from tampered state. – A performance characterization over WABench’s 53 binaries at three operating points, one per instrumentation policy: boundary defense at host calls,
per-function attestation, and per-write attestation as an upper bound.Where the paper says it
Where the paper says it
[18] Andreas Haas et al. “Bringing the web up to speed with WebAssembly”. p. 3 3 Threat Model
Wasm’s trust relationship is bidirectional: a module may be the victim of its
environment, or a threat to it. We consider two deployment scenarios (Figure 1) capturing both directions, each reflecting established adversarial models
in cloud [39, 62] and web [12, 31, 38] security research. 3 ms per snapshot beats GPU offloading, because data transfer
dominates compute at this snapshot size. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly.Where the paper says it
Where the paper says it
[19] Kaiming He et al. “Deep Residual Learning for Image Recognition”. p. 0 Walma: Learning to See Memory Corruption in
WebAssembly
Oussama Draissi
1[0009-0005-6065-8087], Mark G¨unzel
1
, Ahmad-Reza
Sadeghi
2[0000-0001-6833-3598], and Lucas Davi
1[0000-0002-7322-2777]
1 paluno, University of Duisburg-Essen, Essen, Germany
{oussama. draissi, lucas. A power-of-two width matches allocator size
classes and compiler alignment rules, so repeated record-style structures—audio
frames, pixel rows, allocator headers—recur at fixed column offsets and form
coherent stripes that a CNN receptive field can detect. The same width also lets
us reuse standard pretrained vision models [29].Where the paper says it
Where the paper says it
[20] Ningyu He et al. “SeeWasm: An efficient and fully-functional symbolic execution engine for WebAssembly binaries”. p. 8 Walma: Learning to See Memory Corruption in WebAssembly 9
per-module memory isolation keeps the vulnerable module from reaching the
verifier’s weights, snapshot, or verdict. Native host (cpu-tch) runs LibTorch
natively, off the Wasm critical path; in Scenario B this presumes the browser engine itself integrates Walma rather than the publisher shipping it with the module.Where the paper says it
[21] Ningyu He et al. “The promise and pitfalls of WebAssembly: Perspectives from the industry”. p. 0 Walma: Learning to See Memory Corruption in
WebAssembly
Oussama Draissi
1[0009-0005-6065-8087], Mark G¨unzel
1
, Ahmad-Reza
Sadeghi
2[0000-0001-6833-3598], and Lucas Davi
1[0000-0002-7322-2777]
1 paluno, University of Duisburg-Essen, Essen, Germany
{oussama. draissi, lucas. 2 Background
2. 1 WebAssembly Security
Wasm’s security model [65] rests on software fault isolation (SFI) [60], controlflow integrity (CFI) [2], and code immutability—a strong sandbox that isolates
the module from the host and rules out classical code-reuse [51] and codeinjection [67] attacks.Where the paper says it
Where the paper says it
[22] Aaron Hilbig et al. “An Empirical Study of Real-World WebAssembly Binaries: Security, Languages, Use Cases”. p. 9 All five are batch-style parsers and codecs. We measure runtime
overhead on WABench [63], 53 binaries in total: 30 PolyBench [45] compute kernels, 12 MiBench [17] embedded utilities, and 11 real-world applications with
large memory needs. 3 Threat Model
Wasm’s trust relationship is bidirectional: a module may be the victim of its
environment, or a threat to it. We consider two deployment scenarios (Figure 1) capturing both directions, each reflecting established adversarial models
in cloud [39, 62] and web [12, 31, 38] security research.Where the paper says it
Where the paper says it
[23] Muhammad El-Hindi et al. “Benchmarking the Second Generation of Intel SGX Hardware”. p. 7 In Scenario A, the verification runtime lives in an
enclave, minimizing the TCB exposed under SGX or comparable TEEs. In Scenario B, the module’s publisher ships the verifier as a second Wasm module
beside the application. Isolation and hardening schemes [28,
34, 40, 41] demand custom runtimes, source changes, or specialized hardware;
binary-rewriting memory-safety instrumentation [32, 66] is fragile under optimization and, running inside the module, powerless against an adversarial host. ASLR [55] does not fit Wasm’s flat memory model, and code- or control-flow
attestation [3, 10, 49, 50, 53, 68] misses the data-only attacks that drive real
Wasm exploits [12, 31, 38].Where the paper says it
Where the paper says it
[24] Hong Hu et al. “Automatic generation of data-oriented exploits”. p. 1 Isolation and hardening schemes [28,
34, 40, 41] demand custom runtimes, source changes, or specialized hardware;
binary-rewriting memory-safety instrumentation [32, 66] is fragile under optimization and, running inside the module, powerless against an adversarial host. ASLR [55] does not fit Wasm’s flat memory model, and code- or control-flow
attestation [3, 10, 49, 50, 53, 68] misses the data-only attacks that drive real
Wasm exploits [12, 31, 38]. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
[25] Hong Hu et al. “Data-Oriented Programming: On the Expressiveness of Noncontrol Data Attacks”. p. 1 Isolation and hardening schemes [28,
34, 40, 41] demand custom runtimes, source changes, or specialized hardware;
binary-rewriting memory-safety instrumentation [32, 66] is fragile under optimization and, running inside the module, powerless against an adversarial host. ASLR [55] does not fit Wasm’s flat memory model, and code- or control-flow
attestation [3, 10, 49, 50, 53, 68] misses the data-only attacks that drive real
Wasm exploits [12, 31, 38].Where the paper says it
[26] Patrick Jattke et al. “ZenHammer: Rowhammer Attacks on AMD Zen-based Platforms”. p. 4 Two assumptions bound this adversary. First,
the measurement path is integrity-protected: the host tampers with memory at
will but not with snapshot capture and delivery—the root-of-trust assumption
of software-based attestation [49, 50], realizable with verifier-controlled DMA
capture [54].Where the paper says it
[31] Daniel Lehmann et al. “Everything Old is New Again: Binary Security of WebAssembly”. p. 2 In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization.Where the paper says it
[32] Daniel Lehmann et al. Fuzzm: Finding Memory Bugs through Binary-Only Instrumentation and Fuzzing of WebAssembly. p. 5 Valid Wasm memory layouts are application-specific, so
no closed-form rule separates a benign state from a corrupted one; Walma
must learn that boundary from observed executions. The corpus comes from
binary instrumentation that injects snapshot hooks at deterministic points, plus
coverage-guided fuzzing [12, 14, 15, 30] that drives the instrumented binary along
diverse paths. A Wasm module holds all of its mutable state in one contiguous byte array with no internal memory protection [65], its linear memory. A memorycorruption bug is therefore rarely contained: an overflow in one buffer can silently
arXiv:2603.Where the paper says it
Where the paper says it
[34] Hanwen Lei et al. “Put your memory in order: Efficient domain-based memory isolation for WASM applications”. p. 1 Wasm thus faces a bidirectional integrity
problem that existing defenses leave open. Isolation and hardening schemes [28,
34, 40, 41] demand custom runtimes, source changes, or specialized hardware;
binary-rewriting memory-safety instrumentation [32, 66] is fragile under optimization and, running inside the module, powerless against an adversarial host.Where the paper says it
[38] Brian McFadden et al. “Security chasms of wasm”. p. 2 2 Background
2. 1 WebAssembly Security
Wasm’s security model [65] rests on software fault isolation (SFI) [60], controlflow integrity (CFI) [2], and code immutability—a strong sandbox that isolates
the module from the host and rules out classical code-reuse [51] and codeinjection [67] attacks. A compact ResNet [19] is a few points less accurate but fast enough for high-frequency in-runtime attestation. A black-box evasion study shows that flipping a verdict requires overwriting a large fraction
of memory, hundreds of kilobytes to megabytes on our targets.Where the paper says it
Where the paper says it
[40] Alexandra E Michael et al. “MSWasm: Soundly enforcing memory-safe execution of unsafe code”. p. 1 A
recent measurement study [12] finds thousands of websites that pass attackercontrollable Wasm data to unsafe sinks such as innerHTML. There, a corrupted
Wasm-side value reaches the DOM as injected markup, turning an in-module
memory bug into a working exploit. Major platforms such as Figma, Google Earth, Zoom, Cloudflare Workers, and American Express’s internal FaaS rely on it for performancecritical execution [4, 13, 56]. Yet most Wasm modules are compiled from memoryunsafe languages such as C and C++ [21, 22].Where the paper says it
Where the paper says it
[49] A. Seshadri et al. “SWATT: softWare-based attestation for embedded devices”. p. 4 Two assumptions bound this adversary. First,
the measurement path is integrity-protected: the host tampers with memory at
will but not with snapshot capture and delivery—the root-of-trust assumption
of software-based attestation [49, 50], realizable with verifier-controlled DMA
capture [54].Where the paper says it
[50] Arvind Seshadri et al. “Pioneer: verifying code integrity and enforcing untampered code execution on legacy systems”. p. 0 1 Introduction
WebAssembly (Wasm) [18], a portable bytecode that runs untrusted code inside a sandbox, has grown beyond its browser origins into a universal binary
format for edge computing, serverless functions, smart contracts, and embedded systems [56]. Major platforms such as Figma, Google Earth, Zoom, Cloudflare Workers, and American Express’s internal FaaS rely on it for performancecritical execution [4, 13, 56]. 69
× at the host boundary, making continuous, state-centric memory
attestation for Wasm practical. 1 Introduction
WebAssembly (Wasm) [18], a portable bytecode that runs untrusted code inside a sandbox, has grown beyond its browser origins into a universal binary
format for edge computing, serverless functions, smart contracts, and embedded systems [56]. 69
× at the host boundary, making continuous, state-centric memory
attestation for Wasm practical. 1 Introduction
WebAssembly (Wasm) [18], a portable bytecode that runs untrusted code inside a sandbox, has grown beyond its browser origins into a universal binary
format for edge computing, serverless functions, smart contracts, and embedded systems [56].Where the paper says it
Where the paper says it
Where the paper says it
[53] Zhichuang Sun et al. “OAT: Attesting Operation Integrity of Embedded Devices”. p. 0 69
× at the host boundary, making continuous, state-centric memory
attestation for Wasm practical. 1 Introduction
WebAssembly (Wasm) [18], a portable bytecode that runs untrusted code inside a sandbox, has grown beyond its browser origins into a universal binary
format for edge computing, serverless functions, smart contracts, and embedded systems [56]. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly. – A security evaluation on five CVE-affected applications, with an input-level
train/test split that rules out crash memorization.Where the paper says it
Where the paper says it
[54] Sebastian Surminski et al. “DMA’n’Play: Practical Remote Attestation Based on Direct Memory Access”. p. 4 Two assumptions bound this adversary. First,
the measurement path is integrity-protected: the host tampers with memory at
will but not with snapshot capture and delivery—the root-of-trust assumption
of software-based attestation [49, 50], realizable with verifier-controlled DMA
capture [54]. 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.Where the paper says it
Where the paper says it
[55] PaX Team. PaX Address Space Layout Randomization (ASLR). p. 1 Isolation and hardening schemes [28,
34, 40, 41] demand custom runtimes, source changes, or specialized hardware;
binary-rewriting memory-safety instrumentation [32, 66] is fragile under optimization and, running inside the module, powerless against an adversarial host. ASLR [55] does not fit Wasm’s flat memory model, and code- or control-flow
attestation [3, 10, 49, 50, 53, 68] misses the data-only attacks that drive real
Wasm exploits [12, 31, 38]. – A performance characterization over WABench’s 53 binaries at three operating points, one per instrumentation policy: boundary defense at host calls,
per-function attestation, and per-write attestation as an upper bound. We release Walma at https://anonymous.Where the paper says it
Where the paper says it
[60] Robert Wahbe et al. “Efficient software-based fault isolation”. p. 2 2 Background
2. 1 WebAssembly Security
Wasm’s security model [65] rests on software fault isolation (SFI) [60], controlflow integrity (CFI) [2], and code immutability—a strong sandbox that isolates
the module from the host and rules out classical code-reuse [51] and codeinjection [67] attacks.Where the paper says it
[62] Weili Wang et al. “WAVEN: WebAssembly Memory Virtualization for Enclaves”. p. 0 Walma: Learning to See Memory Corruption in
WebAssembly
Oussama Draissi
1[0009-0005-6065-8087], Mark G¨unzel
1
, Ahmad-Reza
Sadeghi
2[0000-0001-6833-3598], and Lucas Davi
1[0000-0002-7322-2777]
1 paluno, University of Duisburg-Essen, Essen, Germany
{oussama. draissi, lucas. , bypassing an access-control check). It uses system-level privileges
or hardware-level tampering such as DMA [36].Where the paper says it
Where the paper says it
[63] Wenwen Wang. “How far we’ve come – A characterization study of standalone WebAssembly runtimes”. p. 0 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. – Evidence that Walma is sanitizer-independent at inference: it detects outof-band tampering that no sanitizer flags, and we map the entropy range in
which a learned valid-memory prior separates benign from tampered state. – A performance characterization over WABench’s 53 binaries at three operating points, one per instrumentation policy: boundary defense at host calls,
per-function attestation, and per-write attestation as an upper bound.Where the paper says it
Where the paper says it
[64] wasi-nn: WebAssembly System Interface API for machine learning (ML). url: https://github.com/WebAssembly/wasi-nn (Accessed: 2626-1). p. 7 Verifier Backends. In-runtime (cpu-wasm) runs OpenVINO via WASI-NN [64]
in a dedicated verification runtime (e.Where the paper says it
[65] Wasm Security. p. 2 2 Background
2. 1 WebAssembly Security
Wasm’s security model [65] rests on software fault isolation (SFI) [60], controlflow integrity (CFI) [2], and code immutability—a strong sandbox that isolates
the module from the host and rules out classical code-reuse [51] and codeinjection [67] attacks. – A performance characterization over WABench’s 53 binaries at three operating points, one per instrumentation policy: boundary defense at host calls,
per-function attestation, and per-write attestation as an upper bound. We release Walma at https://anonymous. 24167v2 [cs. CR] 3 Jul 2026Where the paper says it
Where the paper says it
Where the paper says it
[67] Yves Younan et al. “Runtime Countermeasures for Code Injection Attacks Against C and C++ Programs”. p. 3 Classical schemes verify static properties such as code identity [49, 50]; control-flow attestation (CFA) [3, 10, 53, 68] extends attestation
to runtime behavior by cryptographically recording executed branches against
the application’s control-flow graph. CFA still misses data-only attacks [5, 25]:
decision variables in linear memory can be manipulated to subvert program logic
without diverting a single branch. 69
× at the host boundary, making continuous, state-centric memory
attestation for Wasm practical. 1 Introduction
WebAssembly (Wasm) [18], a portable bytecode that runs untrusted code inside a sandbox, has grown beyond its browser origins into a universal binary
format for edge computing, serverless functions, smart contracts, and embedded systems [56].Where the paper says it
Where the paper says it
[68] Shaza Zeitouni et al. “Atrium: Runtime attestation resilient under memory attacks”. p. 3 Classical schemes verify static properties such as code identity [49, 50]; control-flow attestation (CFA) [3, 10, 53, 68] extends attestation
to runtime behavior by cryptographically recording executed branches against
the application’s control-flow graph. CFA still misses data-only attacks [5, 25]:
decision variables in linear memory can be manipulated to subvert program logic
without diverting a single branch. 3 ms per snapshot beats GPU offloading, because data transfer
dominates compute at this snapshot size. In summary, we make the following contributions:
– The design and implementation of Walma, the first linear-memory attestation framework for WebAssembly.Where the paper says it
Where the paper says it
--- Page 1 ---
Walma: Learning to See Memory Corruption in WebAssembly
Oussama Draissi et al
--- Page 2 ---
O. Draissi et al
--- Page 3 ---
O. Draissi et al
--- Page 4 ---
O. Draissi et al
--- Page 5 ---
O. Draissi et al
--- Page 6 ---
O. Draissi et al
--- Page 7 ---
O. Draissi et al
--- Page 8 ---
O. Draissi et al
--- Page 9 ---
O.
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Continuous state-centric memory attestation for WebAssembly modules can be implemented by treating linear memory as a uniform attestation target, reducing integrity verification to a learned classification problem through snapshots rendered as grayscale images. This allows for detecting corruption that
byte and texture statistics miss.
-
Bidirectional security coverage is achieved by deploying the verifier inside the appropriate trust domain, either an enclave-resident verifier for untrusted cloud hosts or a browser-side verifier for compromised modules. This single protocol protects both a
trusted module from a malicious host and a trusted host from a compromised module.
-
The AI system can detect data-only attacks that control-flow attestation misses by validating the memory footprint itself rather than the execution path. This is achieved by classifying snapshots based on the
row-aligned structure that compiled code imposes on memory.
-
The system can identify tampering with no program input triggers, such as direct memory writes by a malicious host, and
DMA-injected corruption on the structured target pnm2png,
which are missed by traditional sanitizers. -
The AI system's detection effectiveness is bounded by Shannon entropy analysis, which
bounds the class of out-of-band edits that the learned prior can detect.
This provides a quantifiable measure of what corruption Walma can reliably find.
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.
Sources
- On the Lack of Robustness of Binary Function Similarity Systems
- Fuzzm: Finding Memory Bugs through Binary-Only Instrumentation and Fuzzing of WebAssembly
- Very Deep Convolutional Networks for Large-Scale Image Recognition
Related papers
- From Strategy Search to Policy Learning: MCTS-Guided Adversarial Co-Evolution for LLM Safety Alignment
- Privacy Leakage from Recurrent State in LLM Inference
- Incrementally Verifiable Oracle Aided Computation
- Privilege and confidentiality in generative AI workflows
- BadMoE: Backdooring Mixture-of-Experts LLMs via Routing-Aware Triggers and Task-Underutilized Experts
- CoVault: Secure, Scalable Analytics of Personal Data