Uninitialized resource in GPU (CVE-2026-106370)
The GLES2 command decoder's lazy-clear of the default framebuffer does not temporarily disable rasterizer discard, so the driver-level clear is ignored while the decoder still marks the backbuffer as cleared. A compromised renderer with command buffer access could then read back uninitialised GPU memory, potentially exposing pixel data from other tabs.
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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: The validating GLES2 command decoder's default backbuffer lazy-clear mechanism fails to temporarily disable GL_RASTERIZER_DISCARD. Consequently, if a client enables rasterizer discard, the driver-side clear commands are ignored while the decoder's internal lazy-clear tracking state is unconditionally disarmed. This could potentially allow a compromised renderer with direct command buffer access to read uninitialized GPU VRAM.
Affected files:
gpu/command_buffer/service/gles2_cmd_decoder.cc
Estimated timestamp from git blame: 2012-12-12
Root Cause Analysis
In GLES2DecoderImpl::CheckFramebufferValid (located in gpu/command_buffer/service/gles2_cmd_decoder.cc), a lazy clear of the default framebuffer (FBO 0) is executed when backbuffer_needs_clear_bits_ is set. While this block neutralizes various state settings (such as the scissor test, window rectangles, color/stencil/depth masks, and the active draw buffer), it never disables GL_RASTERIZER_DISCARD before calling the clear command:
if (!framebuffer) {
if (surfaceless_)
return false;
if (backbuffer_needs_clear_bits_) {
api()->glClearColorFn(0, 0, 0, 1.0f);
state_.SetDeviceColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
// ... [sets other states] ...
if (workarounds().gl_clear_broken) {
ClearFramebufferForWorkaround(backbuffer_needs_clear_bits_);
} else {
api()->glClearFn(backbuffer_needs_clear_bits_);
}
// ...
backbuffer_needs_clear_bits_ = 0; // Unconditionally disarmed
RestoreClearState();
}
return true;
}
According to the OpenGL ES 3.0 specification (§3.1):
"When RASTERIZER_DISCARD is enabled, the Clear and ClearBuffer commands are also effectively ignored."*
If GL_RASTERIZER_DISCARD is enabled, the underlying driver-level clear operation is ignored. However, the decoder still unconditionally resets backbuffer_needs_clear_bits_ to 0, leaving the backbuffer uncleared but marked as cleared. This differs from the user-FBO lazy-clear path in ClearUnclearedAttachments, which properly handles this capability by temporarily disabling and restoring it:
bool rasterizer_discard_enabled = state_.enable_flags.rasterizer_discard;
if (rasterizer_discard_enabled) {
state_.SetDeviceCapabilityState(GL_RASTERIZER_DISCARD, false);
}
// ... [performs clear] ...
if (rasterizer_discard_enabled) {
state_.SetDeviceCapabilityState(GL_RASTERIZER_DISCARD, true);
}
Potential Attack Path
Note: The following steps represent a potential attack sequence. Our tooling does not currently have the capability to execute dynamic proof-of-concept code, but the sequence follows directly from static analysis of the decoder's state machine.
On platforms using the GLES2 validating decoder (such as Android devices where the validating decoder is still compiled in and active as a fallback), a compromised renderer with direct command buffer access could potentially leak uninitialized VRAM contents as follows:
- Bind Backbuffer: Bind the default framebuffer (
BindFramebuffer(GL_FRAMEBUFFER, 0)). - Arm Lazy-Clear: Invalidate the default framebuffer color buffer (
InvalidateFramebuffer(GL_FRAMEBUFFER, 1, {GL_COLOR_EXT})), which setsbackbuffer_needs_clear_bits_ |= GL_COLOR_BUFFER_BITinside the decoder. - Enable Discard: Enable rasterizer discard (
Enable(GL_RASTERIZER_DISCARD)), which updatesstate_.enable_flags.rasterizer_discardtotrueand propagates the state to the driver. - Trigger Lazy-Clear Bypass: Issue any command that triggers draw validation (e.g.,
Clear(GL_COLOR_BUFFER_BIT)). The decoder entersCheckFramebufferValid, executes the driver-level no-op clear (which is ignored due toGL_RASTERIZER_DISCARD), and unconditionally resetsbackbuffer_needs_clear_bits_to0. - Disable Discard: Disable discard (
Disable(GL_RASTERIZER_DISCARD)). - Read Back VRAM: Issue
ReadPixelson FBO 0. Sincebackbuffer_needs_clear_bits_is already0, the validation checks pass without executing a clear, and the driver returns the uninitialized/recycled VRAM contents corresponding to the default framebuffer.
Security Impact
This results in a potential uninitialized GPU memory disclosure in the GPU process. Because the GPU process is shared across origins, a compromised renderer could exploit this vulnerability to read uninitialized memory from the GPU's memory allocator, potentially disclosing cross-origin pixel data from other browser tabs or processes.
Suggested Fix
In GLES2DecoderImpl::CheckFramebufferValid (gpu/command_buffer/service/gles2_cmd_decoder.cc), temporarily disable GL_RASTERIZER_DISCARD during the lazy clear of the default framebuffer if it is enabled, and restore it afterward, mirroring the logic used in ClearUnclearedAttachments:
if (backbuffer_needs_clear_bits_) {
bool rasterizer_discard_enabled = state_.enable_flags.rasterizer_discard;
if (rasterizer_discard_enabled) {
state_.SetDeviceCapabilityState(GL_RASTERIZER_DISCARD, false);
}
// ... [existing clear logic] ...
if (rasterizer_discard_enabled) {
state_.SetDeviceCapabilityState(GL_RASTERIZER_DISCARD, true);
}
backbuffer_needs_clear_bits_ = 0;
RestoreClearState();
}
Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8
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.
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 default-framebuffer lazy-clear path in CheckFramebufferValid clears the backbuffer without first disabling GL_RASTERIZER_DISCARD, then unconditionally resets backbuffer_needs_clear_bits_, unlike the user-FBO path which handles the capability correctly.
Impact
Could result in uninitialised GPU memory disclosure, potentially exposing cross-origin pixel data from other tabs, though the report notes the tooling could not execute a dynamic proof of concept and the path depends on platforms where the validating decoder is active.
What the attacker needed
Compromised renderer; direct command buffer access; validating GLES2 decoder in use
The fix
The lazy clear of the default framebuffer should temporarily disable GL_RASTERIZER_DISCARD when it is enabled and restore it afterwards, mirroring the user-FBO path.
How it was found
- Bind the default framebuffer.
- Invalidate the default framebuffer colour buffer so the decoder marks it as needing a clear.
- Enable rasterizer discard so the driver ignores clear commands.
- Issue a command that triggers framebuffer validation, causing the ignored clear and the unconditional reset of the clear bits.
- Disable rasterizer discard.
- Read pixels from the default framebuffer to obtain uninitialised 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.
The browser's graphics process keeps a flag saying the screen buffer still needs wiping before it is shown. A renderer can turn on a graphics setting that makes the wipe silently do nothing, yet the flag is still switched off, so the buffer is treated as clean when it is not. Reading that buffer back can then return leftover memory from other pages.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.