Uninitialized Use in ANGLE (CVE-2026-17785)
ANGLE's state tracking does not arm the read-attachment initialisation path when a framebuffer is bound for reading, unlike the draw path. A malicious WebGL page could therefore read back uninitialised GPU memory via glReadPixels and similar calls, potentially disclosing residual data from other processes or tabs.
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: A state-tracking omission in ANGLE allows WebGL applications to potentially bypass robust resource initialization when binding a read framebuffer. This could enable the disclosure of uninitialized GPU memory through operations like glReadPixels, leaking data from other origins or processes. The issue stems from an asymmetry in how read and draw framebuffer bindings are handled in the libANGLE State class.
Affected files:
third_party/angle/src/libANGLE/State.cppthird_party/angle/src/libANGLE/State.hthird_party/angle/src/libANGLE/Context.cppthird_party/angle/src/libANGLE/Framebuffer.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cppthird_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp
Estimated timestamp from git blame: 2019-05-13
Summary
A potential vulnerability has been identified in ANGLE's state management that may allow a bypass of the robust resource initialization security feature. By manipulating framebuffer bindings, a malicious WebGL application could read uninitialized GPU VRAM through operations such as glReadPixels, glCopyTexImage2D, or glBlitFramebuffer. This uninitialized memory may contain residual data from other Chrome processes, other tabs, or other system applications.
Technical Details
The root cause appears to be an asymmetry in how ANGLE's State class handles read and draw framebuffer bindings. While the draw framebuffer binding logic correctly arms the robust initialization state, the read framebuffer logic does not.
In third_party/angle/src/libANGLE/State.cpp, State::setReadFramebufferBinding (lines 2949-2961) updates the read framebuffer but fails to check if the new framebuffer contains resources that require initialization:
void State::setReadFramebufferBinding(Framebuffer *framebuffer)
{
if (mReadFramebuffer == framebuffer)
return;
mReadFramebuffer = framebuffer;
mDirtyBits.set(state::DIRTY_BIT_READ_FRAMEBUFFER_BINDING);
if (mReadFramebuffer && mReadFramebuffer->hasAnyDirtyBit())
{
mDirtyObjects.set(state::DIRTY_OBJECT_READ_FRAMEBUFFER);
}
}
By contrast, setDrawFramebufferBinding (lines 2981-2985) correctly arms DIRTY_OBJECT_DRAW_ATTACHMENTS if robust initialization is enabled and the framebuffer has uninitialized resources:
if (isRobustResourceInitEnabled() && mDrawFramebuffer->hasResourceThatNeedsInit())
{
mDirtyObjects.set(state::DIRTY_OBJECT_DRAW_ATTACHMENTS);
mDirtyObjects.set(state::DIRTY_OBJECT_DRAW_FRAMEBUFFER);
}
DIRTY_OBJECT_READ_ATTACHMENTS is the trigger for syncReadAttachments, which calls Framebuffer::ensureReadAttachmentsInitialized. If this bit is not armed during the binding change, subsequent read-back operations like glReadPixels skip the initialization (zeroing) step.
Furthermore, State::setObjectDirty (State.cpp:4043) fails to use the setReadFramebufferDirty() helper defined in State.h, manually setting only DIRTY_OBJECT_READ_FRAMEBUFFER for the GL_READ_FRAMEBUFFER target, which also misses the attachment initialization check.
Because many backends (like Vulkan and Metal) rely on the front-end to perform robust initialization and skip their own internal clears when this feature is enabled, this front-end bypass leads directly to reading uninitialized VRAM.
Potential Reproduction Steps
An attacker might attempt to trigger this via the following sequence:
- Create a texture with
nulldata (marking it asInitState::MayNeedInit). - Attach the texture to a Framebuffer Object (FBO).
- Ensure the FBO is not currently bound as the
GL_READ_FRAMEBUFFER. - Perform a
gl.readPixelsoperation on the default framebuffer to clear any existingDIRTY_OBJECT_READ_ATTACHMENTSbits in the context. - Bind the target FBO to
GL_READ_FRAMEBUFFER. Due to the missing logic insetReadFramebufferBinding, the attachments dirty bit is not armed. - Call
gl.readPixelsfrom the target FBO. The command may execute against uninitialized VRAM, returning residual data to the application.
Suggested Fix
- Update
State::setReadFramebufferBindinginthird_party/angle/src/libANGLE/State.cppto include a check similar to the draw path:
if (isRobustResourceInitEnabled() && mReadFramebuffer && mReadFramebuffer->hasResourceThatNeedsInit())
{
mDirtyObjects.set(state::DIRTY_OBJECT_READ_ATTACHMENTS);
}
- Modify
State::setObjectDirtyinthird_party/angle/src/libANGLE/State.cppto use thesetReadFramebufferDirty()helper for theGL_READ_FRAMEBUFFERcase.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
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 an asymmetry in ANGLE's State class: the draw framebuffer binding arms the robust resource initialisation dirty bits, but the read framebuffer binding does not, so the attachment initialisation step is skipped.
Impact
A malicious WebGL application could potentially disclose uninitialised GPU memory containing data from other Chrome processes, tabs or system applications; the report presents this as a potential issue rather than a demonstrated leak.
What the attacker needed
Victim visits a malicious WebGL page; robust resource init enabled
The fix
The read framebuffer binding path should arm the read-attachment dirty bit when robust resource initialisation is enabled and the framebuffer has resources needing init, and setObjectDirty should use the read framebuffer dirty helper.
How it was found
- Create a texture with null data so it is marked as possibly needing initialisation.
- Attach that texture to a framebuffer object.
- Make sure the framebuffer is not currently bound as the read framebuffer.
- Read pixels from the default framebuffer to clear existing read-attachment dirty bits.
- Bind the target framebuffer as the read framebuffer, which fails to arm the attachment dirty bit.
- Read pixels from the target framebuffer, which may return 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.
Graphics memory is reused between programs, so before handing a texture to a page the browser is supposed to wipe it. Here the wiping step is skipped for one particular way of binding a framebuffer for reading, so a web page could get back leftover bytes belonging to something else. The report is a code review finding, not a demonstrated exploit.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.