Skip to content
Memory corruption Advisory Advanced CVE-2026-9938

Inappropriate implementation in V8 (CVE-2026-9938)

The V8 ARM64 instruction selector wrongly assumed that the FEAT_MOPS copy and set instructions preserve their input registers, although those instructions overwrite them. An attacker could corrupt the cached WebAssembly memory base pointer and gain out-of-bounds read and write access inside the V8 sandbox.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 45 days

Project Fortify has identified a security issue and generated a PoC.

d8 variant: 'AsanArm64'

flags: --sim-arm64-optional-features=all --no-liftoff --no-wasm-lazy-compilation --omit-quit --fuzzing --disallow-unsafe-flags

Return code: 139

<details> <summary>stdout</summary>
[*] stage 1: register-corruption proof
    corrupt_load(256) = 0x0  (expected 0x4141414141414141)
    -> BUG TRIGGERED: SET clobbered the mem_start_ register
[*] stage 2: OOB write past the 16GiB+page memory64 guard

</details> <details> <summary>stderr</summary>
Received signal 11 SEGV_ACCERR 72e400001007

==== C stack trace ===============================

bin/AsanArm64/d8(__interceptor_backtrace+0x46)[0x6131333a7d16]
bin/AsanArm64/d8(+0x739c6a9)[0x61313914c6a9]
/lib/x86_64-linux-gnu/libc.so.6(+0x45330)[0x78253a845330]
bin/AsanArm64/d8(v8_internal_simulator_ProbeMemory+0x0)[0x6131362db2d8]
[end of stack trace]
Segmentation fault (core dumped)

</details>

Overview: The V8 ARM64 instruction selector incorrectly models the kArm64Cpy and kArm64Set instructions as preserving their input registers. On hardware with FEAT_MOPS, these instructions destructively update their operands, leading to register corruption. This can be exploited to clobber the WebAssembly memory base pointer and achieve out-of-bounds read/write access within the V8 sandbox.

Affected files:

  • v8/src/compiler/backend/arm64/instruction-selector-arm64.cc
  • v8/src/compiler/backend/arm64/code-generator-arm64.cc

Estimated timestamp from git blame: 2025-06-26

Root Cause

In the V8 ARM64 backend, WebAssembly memory.copy and memory.fill operations can be lowered to kArm64Cpy and kArm64Set instructions if the hardware supports ARMv8.8+ Memory Operations (FEAT_MOPS). In v8/src/compiler/backend/arm64/instruction-selector-arm64.cc, the VisitMemoryCopy and VisitMemoryFill functions emit these instructions using standard g.UseRegister() constraints for their inputs.

However, the underlying hardware instructions (cpyp/cpym/cpye and setp/setm/sete) destructively modify their input registers (destination base, source/value, and length) as the operation proceeds. Because the instruction selector does not mark these registers as clobbered or route them through temporary registers, the register allocator incorrectly assumes their original values remain intact across the instruction.

If a critical value—such as the cached WebAssembly memory base pointer (mem_start_)—is allocated to one of these clobbered physical registers, the pointer will be silently advanced by the MOPS operation. For Wasm memory64 with trap-handling enabled, bounds checking only validates that the index is within the 16 GiB limit; it relies on mem_start_ being correct. By corrupting the base pointer, an attacker can bypass the 16 GiB + 4 KiB guard region, yielding arbitrary out-of-bounds read and write access within the 1TB V8 sandbox.

Suggested Fix

Update the instruction selector in v8/src/compiler/backend/arm64/instruction-selector-arm64.cc to correctly model the destructive nature of the MOPS instructions. This can be achieved by allocating temporary registers for the inputs. By moving the input values into g.TempRegister() operands before the memory operation, the original virtual registers assigned by the register allocator will remain uncorrupted.

Alternatively, the inputs could be tied to explicitly clobbered output registers using constraints like g.SameAsFirst(), so the register allocator understands the physical registers are modified and will insert appropriate moves if the original values are still live.

Evaluated with Chrome root at commit: bdfb9c25e02c7ac58c2db7565d32b3044ee487a6


The description of the vuln is LLM-generated and can contain mistakes. Your feedback is appreciated, and will help us make improvement over time. The PoC was run in a VM and it seemed to be legit - if not, let us know and we can strengthen our checker.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The instruction selector emitted kArm64Cpy and kArm64Set with plain register-use constraints, without marking the destructively modified inputs as clobbered or routing them through temporaries.

Impact

By corrupting the memory base pointer, an attacker could bypass the 16 GiB plus 4 KiB guard region and obtain arbitrary out-of-bounds read and write access within the 1TB V8 sandbox; the proof of concept only ran in a simulator build.

What the attacker needed

ARMv8.8+ FEAT_MOPS hardware; Wasm memory64 with trap handling; attacker-supplied Wasm module

The fix

The instruction selector should model the destructive behaviour, either by moving inputs into temporary registers or by tying them to explicitly clobbered outputs so the register allocator inserts moves when needed.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A compiler picks which machine instructions to use and tracks which registers still hold useful values. Here it believed a memory-copy instruction left its inputs untouched, but on newer ARM hardware that instruction overwrites them. That let a WebAssembly memory pointer be silently changed, so later memory accesses could reach outside the intended area.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.