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

Out of bounds read in GPU (CVE-2026-79241)

A logic error in the GLES2 validating command decoder fails to correctly calculate the required buffer size when multiple uniform blocks share the same binding point, allowing a smaller block's size to overwrite a larger one. An attacker could bypass buffer size validation and cause an out-of-bounds read of GPU memory, potentially leaking cross-origin data.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 3 months

Flapjack, 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A logic error in the GLES2 validating command decoder fails to properly validate buffer sizes when multiple uniform blocks share the same binding point. This allows an attacker to bypass buffer size checks, potentially leading to an out-of-bounds read of GPU memory. This issue affects configurations using the validating decoder without hardware robust buffer access.

Affected files:

  • gpu/command_buffer/service/gles2_cmd_decoder.cc

Estimated timestamp from git blame: Unknown (Google3 checkout)

Summary

A potential logic flaw in GLES2DecoderImpl::ValidateUniformBlockBackings within the GLES2 validating command decoder could allow an attacker to trigger an out-of-bounds (OOB) read on the GPU. The decoder incorrectly calculates the required buffer size when multiple uniform blocks are mapped to the same binding point, allowing an attacker to bypass validation by ensuring a smaller block's size requirement overwrites a larger block's requirement.

Root Cause Analysis

During WebGL 2 draw calls, the validating command decoder calls GLES2DecoderImpl::ValidateUniformBlockBackings (gpu/command_buffer/service/gles2_cmd_decoder.cc) to ensure that all bound uniform buffers are large enough for the active shader's uniform blocks.

The function iterates through all active uniform blocks and populates a vector (uniform_block_sizes), indexed by the binding point, with the required buffer size:

C++
  for (auto info : state_.current_program->uniform_block_size_info()) {
    uint32_t index = info.binding;
    uniform_block_sizes[index] = static_cast<GLsizeiptr>(info.data_size);
  }

The OpenGL ES 3.0 specification explicitly permits multiple uniform blocks within the same program to be mapped to the same binding point (e.g., using glUniformBlockBinding).

Because the uniform_block_size_info() array is typically ordered by the driver's assignment of uniform block indices (often corresponding to declaration order in the shader source), an attacker can declare a large uniform block followed by a small uniform block.

If both blocks are bound to the same index, the loop will process the large block first, assigning its size to uniform_block_sizes[index]. However, it will then process the small block, and execute the assignment again, overwriting the required size with the smaller value. The decoder then erroneously validates the bound buffer against this smaller requirement.

Potential Attack Vector

Note: These are suggested steps; a working proof-of-concept has not been executed.

  1. Context Creation: An attacker obtains a WebGL 2 rendering context.
  2. Shader Authoring: The attacker authors a GLSL shader containing a large uniform block (e.g., 1024 bytes) declared before a small uniform block (e.g., 16 bytes).
  3. Program Linking: The attacker compiles and links the shader program.
  4. Binding Blocks: The attacker uses gl.uniformBlockBinding() to map both the large and small blocks to the same binding point (e.g., binding point 0).
  5. Buffer Allocation: The attacker allocates a WebGLBuffer sized exactly for the small block (16 bytes) and binds it to binding point 0 using gl.bindBufferBase().
  6. Draw Call: The attacker issues a draw command (e.g., gl.drawArrays()).
  7. Validation Bypass: The validating decoder calculates the required size for binding point 0. Because the small block is processed after the large block in uniform_block_size_info_, the requirement is incorrectly calculated as 16 bytes. Validation passes.
  8. OOB Read: The GPU executes the shader. When the shader accesses data from the large uniform block, the GPU attempts to read up to 1024 bytes from the 16-byte buffer, resulting in a 1008-byte out-of-bounds read in VRAM.
  9. Exfiltration: The attacker's shader logic writes the out-of-bounds data to a fragment color output, allowing the attacker to read it back via gl.readPixels().

Impact

If successfully exploited, an attacker could read arbitrary contiguous GPU memory. This memory may contain sensitive information, including cross-origin textures, images, or UI elements, representing a High Severity (S1) cross-origin data leak.

Exploitation is limited to configurations utilizing the validating command decoder (as opposed to the passthrough decoder) and lacking hardware-level robust buffer access extensions.

Suggested Fix

Modify the assignment in GLES2DecoderImpl::ValidateUniformBlockBackings to keep the maximum required size for any given binding point.

C++
  for (auto info : state_.current_program->uniform_block_size_info()) {
    uint32_t index = info.binding;
    uniform_block_sizes[index] = std::max(
        uniform_block_sizes[index],
        static_cast<GLsizeiptr>(info.data_size));
  }

Evaluated with Chrome root at commit: b7d0c4d810da1b31400f198c70d9720fc8f0e5a0


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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 validation loop assigns each binding point's required size from the last uniform block processed, rather than keeping the maximum, so a smaller block can overwrite a larger requirement.

Impact

If successfully exploited, an attacker could read arbitrary contiguous GPU memory, potentially leaking cross-origin textures, images, or UI elements, but only on configurations using the validating command decoder without hardware robust buffer access.

What the attacker needed

WebGL 2 support; Validating command decoder in use; No hardware robust buffer access

The fix

The assignment should be changed to keep the maximum required size for each binding point, for example by using std::max.

How it was found

  1. Obtain a WebGL 2 rendering context.
  2. Author a GLSL shader with a large uniform block declared before a small uniform block.
  3. Compile and link the shader program.
  4. Map both blocks to the same binding point using gl.uniformBlockBinding().
  5. Allocate a buffer sized for the small block and bind it to that binding point.
  6. Issue a draw call, causing the decoder to validate against the smaller size and the GPU to read out of bounds.

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.

WebGL is a browser technology for drawing 3D graphics. The browser checks that a program's requests for memory are safe, but here a mistake in that check lets a malicious web page ask the graphics card to read beyond the memory it was given. That could expose data from other websites that the graphics card was handling.

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.