Out of bounds read and write in Dawn (CVE-2026-9889)
A validation gap in Dawn's OpenGL backend allows a pipeline layout with storage buffers whose visibility is set to ShaderStage::None to bypass per-stage limits, inflating internal SSBO indices beyond the capacity of an internal uniform buffer. This causes a silent failure when uploading array length data, leading to integer underflows in Tint's robustness transforms that disable bounds clamping and permit out-of-bounds GPU memory reads and writes.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 18 days
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: Storage buffer bindings with wgpu::ShaderStage::None visibility bypass per-stage limit validation, allowing a pipeline to exceed internal SSBO capacity. This inflates internal SSBO indices, causing a silent failure when uploading length data to an internal uniform buffer. The stale or zeroed buffer values cause Tint's robustness transforms to underflow, resulting in an ineffective clamp and allowing arbitrary OOB GPU memory reads/writes.
Affected files:
third_party/dawn/src/dawn/native/BindingInfo.cppthird_party/dawn/src/dawn/native/opengl/PipelineLayoutGL.cppthird_party/dawn/src/dawn/native/opengl/CommandBufferGL.cppthird_party/dawn/src/dawn/native/opengl/DeviceGL.cppthird_party/dawn/src/dawn/native/opengl/PipelineLayoutGL.hthird_party/dawn/src/dawn/native/opengl/ShaderModuleGL.cppthird_party/dawn/src/dawn/native/opengl/BufferGL.cppthird_party/dawn/src/dawn/native/opengl/UtilsGL.hthird_party/dawn/src/tint/lang/core/ir/transform/array_length_from_uniform.cc
Estimated timestamp from git blame: 2025-12-04
Summary
A potential vulnerability in Dawn's OpenGL/GLES backend allows for out-of-bounds (OOB) reads and writes in the GPU process.
The issue stems from a combination of factors:
- A validation gap allows the creation of a
BindGroupLayoutwith an excessive number of storage buffers by setting their visibility towgpu::ShaderStage::None. - The OpenGL backend blindly assigns an internal
ssboIndexto all storage buffers, causing the index to exceed the internal tracker's maximum capacity (96). - Updates to the internal uniform buffer holding SSBO array lengths fail silently due to an ignored
GL_INVALID_VALUEerror in Release builds. - When the internal uniform buffer retains stale or out-of-bounds (zero) length values, integer underflows in Tint's robustness and array length transforms result in massive bounds clamps, bypassing security checks.
Technical Details and Potential Exploitation Steps
Our codebase investigator agent analyzed the flow and suggests the following steps could trigger the vulnerability:
-
Prime the Uniform Buffer (Optional but possible): An attacker dispatches a valid compute shader using a normal layout, binding a maximum-sized storage buffer. This populates Dawn's internal
mArrayLengthBuffer(a 384-byte buffer designed to hold up to 96 SSBO lengths) with very large length values on the GPU. -
Bypass Validation with
ShaderStage::None: The attacker constructs a maliciousBindGroupLayoutDescriptorcontaining over 96 dummy storage buffer bindings. By setting thevisibilityof these dummy bindings towgpu::ShaderStage::None, they bypass themaxStorageBuffersPerShaderStagelimit (16). InBindingInfo.cpp,IncrementBindingCountsskips incrementing the stage counters forNonevisibility (IterateStages(0)is empty). The total bindings easily fit within themaxBindingsPerBindGrouplimit (1000). -
Inflate
ssboIndex: The attacker creates aPipelineLayoutwith this layout. ThePipelineLayoutGLconstructor sequentially assigns anssboIndexto every storage buffer binding, inflating the index of the target storage buffer far past 96. -
Silent Buffer Upload Failure: The attacker dispatches a malicious shader that performs OOB dynamic array indexing on the target storage buffer.
CommandBufferGL::ApplyBindGroupcalculates an update range formArrayLengthBufferbased on the inflatedssboIndex.ApplyInternalArrayLengthUniformscallsglBufferSubDatawith an update size that exceeds the physically allocated 384 bytes ofmArrayLengthBuffer.- The OpenGL driver returns
GL_INVALID_VALUE, aborting the upload. However, because the call is wrapped inDAWN_GL_TRY, the error is silently ignored in Release builds (whereDAWN_ENABLE_ASSERTSis disabled). The uniform buffer on the GPU is not updated.
-
Robustness Bypass via Underflow: The malicious shader executes. Because the uniform buffer wasn't updated, a read from the out-of-bounds index returns
0(due to standard GL robustness rules).- In
array_length_from_uniform.cc, the array size is calculated astotal_buffer_size - member->Offset(). Iftotal_buffer_sizeis0, this unsigned subtraction underflows to a massive value. - Even if the offset is
0,robustness.cccalculates the clamp limit asarrayLength() - 1.0 - 1underflows to0xFFFFFFFF. - The clamp operation becomes
min(index, 0xFFFFFFFF), which effectively disables the clamp, allowing the attacker-controlled index to be used directly for OOB GPU memory reads and writes.
- In
Impact
This vulnerability provides a potential path to arbitrary shader-driven out-of-bounds read and write capabilities in the GPU virtual address space. On Android platforms where the GPU process is frequently unsandboxed, this could lead to a sandbox escape and Remote Code Execution (RCE) from unprivileged Web content.
Suggested Fixes
- Validation: In
BindingInfo.cpp, enforce a hard, cross-stage limit on the total number of storage buffer bindings allowed in aPipelineLayout, regardless of shader stage visibility. Do not rely solely on per-stage accumulated counts. - Error Handling: Ensure that failures during internal buffer synchronization (e.g.,
glBufferSubDatainApplyInternalArrayLengthUniforms) cause the dispatch to fail safely, rather than silently ignoring the error viaDAWN_GL_TRYin non-assert builds. - Tint Robustness: Guard against integer underflows in
array_length_from_uniform.ccandrobustness.cc. Ensure that if a buffer size is smaller than the array offset (or exactly 0), the resulting clamped array length does not wrap around to a massive maximum value.
Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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 combination of missing cross-stage validation for storage buffer counts, silent ignoring of OpenGL errors during internal buffer updates, and integer underflows in Tint's robustness transforms.
Impact
This could allow arbitrary shader-driven out-of-bounds read and write in the GPU virtual address space, potentially leading to sandbox escape and remote code execution on Android where the GPU process is often unsandboxed.
What the attacker needed
Ability to run WebGPU shaders; crafted bind group layout with ShaderStage::None; OpenGL backend
The fix
The report suggests enforcing a hard cross-stage limit on total storage buffer bindings, ensuring internal buffer synchronization failures cause dispatch to fail safely, and guarding against integer underflows in Tint's robustness transforms.
How it was found
- Optionally prime the internal array length buffer with large values by dispatching a valid compute shader with a maximum-sized storage buffer.
- Create a bind group layout with over 96 dummy storage buffer bindings, each with visibility set to ShaderStage::None, to bypass per-stage limits.
- Create a pipeline layout from this bind group layout, which assigns an inflated ssboIndex to the target storage buffer.
- Dispatch a shader that performs out-of-bounds dynamic array indexing on the target storage buffer.
- The internal uniform buffer update fails silently due to an ignored GL_INVALID_VALUE error, leaving stale or zero length values.
- The shader executes with underflowed array length values, disabling the bounds clamp and allowing out-of-bounds GPU memory access.
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.
Dawn is a component that translates WebGPU commands into native graphics API calls. A validation gap let an attacker create a pipeline with too many storage buffers by marking them as not used by any shader stage, which confused internal bookkeeping. This confusion led to a failed update of a small internal buffer, and the resulting bad values disabled a safety check, allowing the shader to read and write outside the intended GPU memory.
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.