Uninitialized Use in ANGLE (CVE-2026-17689)
ANGLE's OpenGL/GLES backend clears integer-format renderbuffers and textures during robust resource initialisation with a plain float-based clear, which conforming drivers ignore for integer attachments. The resource is then marked as initialised, so a WebGL2 context could read back stale, uninitialised GPU memory and leak data across origins.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 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: In ANGLE's OpenGL/GLES backend, robust resource initialization of integer-format renderbuffers and textures uses a plain float-based glClear, which conforming drivers ignore. As a result, uninitialized GPU memory is falsely marked as initialized and can potentially be read back by a WebGL context, leading to cross-origin VRAM leaks.
Affected files:
third_party/angle/src/libANGLE/renderer/gl/BlitGL.cppthird_party/angle/src/libANGLE/renderer/gl/RenderbufferGL.cppthird_party/angle/src/libANGLE/renderer/gl/TextureGL.cpp
Estimated timestamp from git blame: Unknown (Google3 checkout)
Description
There is a potential cross-origin information disclosure vulnerability in ANGLE's OpenGL/GLES backend when robust resource initialization is enabled (such as in WebGL2 contexts).
During robust resource initialization, renderbuffers are cleared to zero via RenderbufferGL::initializeContents, which delegates to BlitGL::clearRenderbuffer in third_party/angle/src/libANGLE/renderer/gl/BlitGL.cpp:
angle::Result BlitGL::clearRenderbuffer(const gl::Context *context,
RenderbufferGL *source,
GLenum sizedInternalFormat)
{
...
ANGLE_TRY(PrepareForClear(mStateManager, sizedInternalFormat, &bindTargets, &unbindTargets,
&clearMask));
mStateManager->bindFramebuffer(GL_FRAMEBUFFER, mScratchFBO);
...
ANGLE_GL_TRY(context, mFunctions->clear(clearMask));
...
}
For signed or unsigned integer-format color attachments (e.g., GL_RGBA8UI, GL_RGBA32I), standard glClear(GL_COLOR_BUFFER_BIT) (called via mFunctions->clear) is ineffective because it clears using the floating-point clear color state. Under the OpenGL and OpenGL ES specifications, conforming drivers ignore or do nothing when a standard glClear is executed on integer attachments.
While other parts of ANGLE (such as BlitGL::clearFramebuffer) explicitly check the component type of the attachment and utilize glClearBufferiv/glClearBufferuiv for integer-format attachments, BlitGL::clearRenderbuffer (and similarly BlitGL::clearRenderableTexture at line 953) performs an unconditional float-based glClear.
Because clearRenderbuffer returns success (angle::Result::Continue), ANGLE's front-end erroneously marks the resource's initialization state as InitState::Initialized via setInitState(InitState::Initialized) in FramebufferAttachment::initializeContents. Consequently, the uninitialized VRAM remains untouched but is treated as clean, allowing an attacker to read back stale VRAM contents via gl.readPixels.
Potential Trigger Path
Because this analysis was performed statically without running code, the following are potential steps that an attacker could follow to trigger the vulnerability from WebGL2:
- Allocate an integer-format renderbuffer (e.g.,
gl.renderbufferStorage(gl.RENDERBUFFER, gl.RGBA8UI, W, H)), which starts withInitState::MayNeedInit. - Attach the renderbuffer to a custom framebuffer (
gl.framebufferRenderbuffer(...)). - Disable active draw buffers by calling
gl.drawBuffers([gl.NONE])to setenabledDrawBuffersto{}. - Call
gl.readPixels(...)on the color attachment. Because the set of active draw buffers is empty,FramebufferGL::ensureAttachmentsInitializedfalls back to the per-attachment initializer path (FramebufferImpl::ensureAttachmentsInitialized) rather than the fast-path framebuffer clear. - This triggers the per-attachment
initializeContentswhich callsBlitGL::clearRenderbuffer. The ineffectiveglClearis executed but the resource is markedInitialized. gl.readPixelsproceeds, returning raw, uninitialized VRAM contents back to the JavaScript context.
Proposed Fix
In third_party/angle/src/libANGLE/renderer/gl/BlitGL.cpp, refactor BlitGL::clearRenderbuffer and BlitGL::clearRenderableTexture to check the component type of the internal format being cleared. If the attachment is of an integer format (GL_INT or GL_UNSIGNED_INT), use glClearBufferiv or glClearBufferuiv instead of a plain float-based glClear(GL_COLOR_BUFFER_BIT), matching the safe pattern implemented in BlitGL::clearFramebuffer.
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
Likely the clear helper for renderbuffers and renderable textures always issues a float-based glClear without checking whether the attachment's internal format is integer, unlike the framebuffer clear path which selects glClearBufferiv or glClearBufferuiv.
Impact
A WebGL2 page could potentially read stale GPU memory belonging to other origins, though the analysis is static and the trigger path was not executed.
What the attacker needed
WebGL2 context with robust init; Integer-format renderbuffer support; Attacker-controlled web page
The fix
The clear helpers should check the internal format's component type and use glClearBufferiv or glClearBufferuiv for integer attachments, matching the existing framebuffer clear path; the text does not say a fix has landed.
How it was found
- Allocate an integer-format renderbuffer, which starts in a may-need-initialisation state.
- Attach the renderbuffer to a custom framebuffer.
- Disable active draw buffers so the set of enabled draw buffers is empty.
- Call readPixels on the colour attachment, which falls back to the per-attachment initialiser path.
- The per-attachment initialiser runs the ineffective clear but marks the resource as initialised.
- readPixels returns raw, uninitialised VRAM contents to the JavaScript context.
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 lets a web page draw and read pixels using the graphics card. Before handing a page a fresh buffer, the browser is supposed to wipe it so no leftover data from other pages remains. Here the wipe command was the wrong kind for certain buffer formats, so the graphics driver silently did nothing, yet the browser still believed the buffer was clean and let the page read it.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.