Skip to content
Info disclosure Advisory Advanced CVE-2026-7983

Out of bounds read in Dawn (CVE-2026-7983)

Tint's Robustness transform fails to clamp the sample_index argument for textureLoad on multisampled textures, allowing an out-of-bounds sample index to reach the Metal and OpenGL backends. An attacker could read adjacent or stale GPU memory, potentially leaking cross-origin texture data.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 36 days

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: Tint's Robustness transform fails to clamp the sample_index argument for textureLoad operations on multisampled textures. This allows an attacker to pass an out-of-bounds sample index to the Metal and OpenGL backends, potentially leading to an out-of-bounds read of adjacent or stale GPU memory and a cross-origin information leak.

Affected files:

  • third_party/dawn/src/tint/lang/core/ir/transform/robustness.cc

Estimated timestamp from git blame: 2024-11-12

Summary

Tint's IR Robustness transform (third_party/dawn/src/tint/lang/core/ir/transform/robustness.cc) incorrectly skips clamping the sample_index argument for textureLoad operations on multisampled textures (specifically texture_multisampled_2d<T> and texture_depth_multisampled_2d). This omission results in a potential out-of-bounds (OOB) read vulnerability on the GPU when using WebGPU on platforms where Tint is the primary robustness mechanism, such as macOS/iOS (Metal) and OpenGL.

Technical Details

In third_party/dawn/src/tint/lang/core/ir/transform/robustness.cc, the function ClampTextureCallArgs contains logic for handling textureLoad built-ins. For multisampled textures, the sample_index is the third argument (args[2]). The current clamping logic is as follows:

C++
case core::BuiltinFn::kTextureLoad: {
    uint32_t next_arg = 2u;
    if (type::IsTextureArray(texture->Dim())) {
        clamp_array_index(next_arg++);
    }
    if (texture->IsAnyOf<type::SampledTexture, type::DepthTexture>()) {
        clamp_level(next_arg++);
    }
    clamp_coords(1u);  // Must run after clamp_level
    break;
}

The texture->IsAnyOf<type::SampledTexture, type::DepthTexture>() check incorrectly excludes multisampled texture types. In the Tint type system, MultisampledTexture and DepthMultisampledTexture are final classes that derive directly from the base Texture class and are not instances of SampledTexture or DepthTexture.

Consequently, for multisampled textures, the transform evaluates this condition as false and entirely skips clamping the argument at next_arg (index 2).

Since no clamp_sample_index helper is implemented in the transform and kTextureNumSamples is never queried to determine the valid range, the sample_index value remains completely unmodified in the generated Tint IR. This behavior is explicitly reflected in Tint's golden tests (e.g., TextureLoad_Multisampled2D in robustness_test.cc), which show coordinates being safely clamped while the sample index remains raw.

Impact

When lowered to Metal Shading Language (MSL) or GLSL, the unclamped sample_index is passed directly to the underlying driver functions (e.g., texture.read(coords, sample_index) in MSL or texelFetch() in GLSL). Both the MSL and GLSL specifications define out-of-bounds sample indices as undefined behavior.

On many GPUs, particularly those with Tile Based Deferred Rendering (TBDR) architectures like Apple Silicon, an out-of-bounds sample read causes the hardware sampling unit to calculate an offset far outside the memory region allocated for that pixel or tile. This returns stale data from adjacent tile memory or other GPU device memory allocations. This allows a malicious WebGPU-enabled website to perform an information leak of highly sensitive, cross-origin texture data or other GPU-resident information without triggering crashes or driver errors.

Potential Reproduction Steps

(Note: These are potential steps as our tooling agent cannot execute code to verify the exploit end-to-end.)

  1. On a system using Metal (macOS) or OpenGL, open a browser with WebGPU enabled.
  2. Create a multisampled texture (texture_multisampled_2d<f32>).
  3. Create a compute shader that calls textureLoad(tex, vec2<i32>(0,0), sample_index). Source the sample_index from an attacker-controlled storage buffer.
  4. Populate the storage buffer with a massively out-of-bounds value (e.g., 0x7FFFFFFF).
  5. Execute the compute pass and write the result of the textureLoad call to an output storage buffer.
  6. Map the output buffer and read it back to the CPU via JavaScript. Observe that the returned values contain undefined data from adjacent GPU memory, violating the WebGPU specification's out-of-bounds safety guarantees.

Suggested Fix

Update ClampTextureCallArgs in third_party/dawn/src/tint/lang/core/ir/transform/robustness.cc to explicitly handle multisampled textures.

  1. Implement a clamp_sample_index helper lambda that queries core::BuiltinFn::kTextureNumSamples to determine the maximum valid sample index for the given texture (num_samples - 1).
  2. Add a check if (texture->IsAnyOf<type::MultisampledTexture, type::DepthMultisampledTexture>()) within the kTextureLoad case block to call this new clamp_sample_index helper on the appropriate argument index (next_arg).

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from 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.

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 clamping logic checks for SampledTexture or DepthTexture types but multisampled texture types derive directly from Texture and are not instances of those classes, so the sample index is never clamped.

Impact

A malicious WebGPU-enabled website could leak sensitive cross-origin texture data or other GPU-resident information without triggering crashes or driver errors.

What the attacker needed

WebGPU-enabled browser; Metal or OpenGL backend; victim visits a malicious page

The fix

The transform should be updated to detect multisampled texture types and clamp the sample index using the texture's sample count.

How it was found

  1. Open a browser with WebGPU enabled on a system using Metal or OpenGL.
  2. Create a multisampled texture.
  3. Create a compute shader that calls textureLoad with a sample_index taken from an attacker-controlled storage buffer.
  4. Fill the storage buffer with a very large out-of-bounds value.
  5. Run the compute pass and write the textureLoad result to an output buffer.
  6. Map the output buffer and read it back via JavaScript to observe undefined data from adjacent GPU memory.

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 graphics shader can ask the GPU to read a specific sample from a texture. The safety layer that should limit that sample number to a valid range misses this case, so a malicious website can ask for a sample far outside the texture. The GPU then returns whatever happens to be in nearby memory, which might belong to another website.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.