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

Uninitialized resource in GPU (CVE-2026-87576)

A logic flaw in the GLES2 validating decoder causes the deferred clear of the default backbuffer to target the currently bound draw framebuffer instead. An attacker with a compromised renderer could read uninitialized GPU memory, potentially containing stale cross-origin pixel data.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 months

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: A logic flaw in the GLES2 validating decoder allows a compromised renderer to read uninitialized GPU memory. When the default backbuffer requires a lazy clear during a read validation, the clear command mistakenly targets the currently bound draw framebuffer. This allows an attacker to bypass the safety clear and extract stale pixel data from the backbuffer.

Affected files:

  • gpu/command_buffer/service/gles2_cmd_decoder.cc

Estimated timestamp from git blame: 2024-06-13

Summary

A logic flaw exists in GLES2DecoderImpl::CheckFramebufferValid within the GLES2 validating command decoder. When the default framebuffer (backbuffer) is invalidated, the decoder defers clearing it until it is used. However, if the backbuffer is used as a read target while a different Framebuffer Object (FBO) is bound to the draw target, the deferred clear operation incorrectly clears the draw FBO instead of the backbuffer. This leaves the backbuffer uninitialized, allowing an attacker to read potentially sensitive or cross-origin stale GPU memory.

Technical Details

In gpu/command_buffer/service/gles2_cmd_decoder.cc, CheckFramebufferValid handles the deferred clear for the default framebuffer (when framebuffer == nullptr):

C++
  if (!framebuffer) {
    // ... 
    if (backbuffer_needs_clear_bits_) {
      // ...
      api()->glClearFn(backbuffer_needs_clear_bits_); 
      // ...
      backbuffer_needs_clear_bits_ = 0;
    }
    return true;
  }

The function calls api()->glClearFn(), which in OpenGL strictly operates on the currently bound GL_DRAW_FRAMEBUFFER.

In ES3 or WebGL 2 contexts, GL_READ_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER can be bound to different targets. If CheckBoundReadFramebufferValid invokes this logic (e.g., during a glBlitFramebuffer or glReadPixels call) while the backbuffer is bound to GL_READ_FRAMEBUFFER and a user FBO is bound to GL_DRAW_FRAMEBUFFER, the glClear will erroneously target the user FBO. The backbuffer_needs_clear_bits_ flag is then reset to 0, despite the backbuffer remaining uninitialized.

Potential Attacker Steps

Note: Our tooling agent does not have the ability to run code, so the following exploit steps are theoretical, though strongly supported by static analysis of the state machine.

An attacker starting from a compromised renderer could theoretically trigger this vulnerability by sending direct GLES2 IPC commands:

  1. Initialize a WebGL 2 / GLES 3 context to enable separate read/draw framebuffer bindings.
  2. Call glInvalidateFramebuffer(GL_FRAMEBUFFER, ...) targeting the default framebuffer. This sets backbuffer_needs_clear_bits_ and flags the memory as discarded to the GPU driver.
  3. Generate a user FBO and bind it strictly to GL_DRAW_FRAMEBUFFER.
  4. Ensure the default framebuffer is bound to GL_READ_FRAMEBUFFER.
  5. Call glBlitFramebuffer to copy from the default framebuffer to the user FBO.
  6. During validation, the decoder notices the backbuffer needs a clear and calls glClear. Due to the bug, this clears the user FBO instead of the backbuffer, but clears the pending flag.
  7. The blit operation proceeds, copying uninitialized, stale GPU memory from the backbuffer into the user FBO.
  8. The attacker binds the user FBO to GL_READ_FRAMEBUFFER and calls glReadPixels to extract the uninitialized memory into shared memory.

Suggested Fix

In GLES2DecoderImpl::CheckFramebufferValid, the backbuffer clearing block should be updated to ensure the backbuffer is actively bound to GL_DRAW_FRAMEBUFFER before calling glClearFn or glDrawBuffersARBFn.

If the currently bound draw framebuffer is not the backbuffer (e.g., GetBoundDrawFramebuffer() != nullptr), the code should temporarily bind the backbuffer's service ID to GL_DRAW_FRAMEBUFFER, execute the clear, and then restore the original draw framebuffer binding. This pattern is already correctly implemented for user FBOs in GLES2DecoderImpl::ClearUnclearedAttachments.

Evaluated with Chrome root at commit: a1e33f5848218e21d4a16ae2c1bc94e815c30c7f


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.

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

Likely, the code calls glClear without ensuring the backbuffer is bound to the draw framebuffer, so the clear affects whatever draw framebuffer is currently bound.

Impact

An attacker with a compromised renderer could read uninitialized GPU memory, potentially containing sensitive or cross-origin stale pixel data.

What the attacker needed

Compromised renderer

The fix

The backbuffer clearing block should be updated to ensure the backbuffer is actively bound to GL_DRAW_FRAMEBUFFER before calling glClearFn or glDrawBuffersARBFn.

How it was found

  1. Initialize a WebGL 2 / GLES 3 context to enable separate read/draw framebuffer bindings.
  2. Call glInvalidateFramebuffer on the default framebuffer to set the needs-clear flag.
  3. Generate a user FBO and bind it to GL_DRAW_FRAMEBUFFER.
  4. Ensure the default framebuffer is bound to GL_READ_FRAMEBUFFER.
  5. Call glBlitFramebuffer to copy from the default framebuffer to the user FBO.
  6. The decoder clears the user FBO instead of the backbuffer, then the blit copies uninitialized 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.

When a web page uses WebGL, the browser's GPU process manages memory for drawing. Sometimes that memory is marked as 'needs clearing' before it can be read, to avoid leaking old data. This bug makes the clearing happen on the wrong buffer, so old data can be read back.

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.