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

Uninitialized resource in ANGLE (CVE-2026-79270)

ANGLE uses a single shared initialization flag for packed depth-stencil resources, so clearing only the depth aspect marks the whole resource as initialized. An attacker could then read uninitialized stencil GPU memory via WebGL, potentially leaking cross-origin data.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 3 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: ANGLE tracks the initialization state of packed depth-stencil resources using a single shared flag for both depth and stencil aspects. A clear operation performed on only one aspect (e.g., depth) incorrectly marks the entire resource as initialized, potentially allowing uninitialized GPU memory from the other aspect (e.g., stencil) to be exposed. This may result in a cross-origin information leak of GPU memory to web content.

Affected files:

  • third_party/angle/src/libANGLE/Framebuffer.cpp
  • third_party/angle/src/libANGLE/Renderbuffer.cpp
  • third_party/angle/src/libANGLE/Texture.cpp
  • third_party/angle/src/libANGLE/Surface.cpp
  • third_party/angle/src/libANGLE/renderer/FramebufferImpl.cpp
  • third_party/angle/src/libANGLE/Context.cpp

Estimated timestamp from git blame: Unknown (Google3 checkout)

Background

ANGLE's robust resource initialization ensures that all GPU resources (textures, renderbuffers) are zero-initialized before they are accessed by an application. This is a critical security boundary for WebGL to prevent the leakage of uninitialized GPU memory across origins.

Root Cause Analysis

In ANGLE, resources that use a packed depth-stencil format (e.g., GL_DEPTH24_STENCIL8) manage their initialization state (InitState) using a single shared flag. This is evident in classes like gl::Renderbuffer (third_party/angle/src/libANGLE/Renderbuffer.cpp:397), gl::Texture, and gl::Surface (third_party/angle/src/libANGLE/Surface.cpp:717), where the setInitState method ignores the specific aspect (depth or stencil) being updated and sets a single mInitState variable for the entire resource.

When a clear operation is performed on a framebuffer attachment, gl::Framebuffer::markAttachmentsInitialized (lines 2667-2689 of third_party/angle/src/libANGLE/Framebuffer.cpp) is called to update the state. If an attacker performs a clear of only the depth aspect, the following occurs:

  1. markAttachmentsInitialized is called with depth=true and stencil=false.
  2. It calls mState.mDepthAttachment.setInitState(InitState::Initialized) (line 2680).
  3. The underlying resource's shared flag is updated to Initialized.
  4. The stencil aspect, which was never cleared or zeroed, is now also considered Initialized by the resource.

While the Framebuffer's frontend tracking (mState.mResourceNeedsInit) might still have the stencil bit set (since markAttachmentsInitialized didn't reset it), the backend safety mechanism in rx::InitAttachment (lines 15-24 of third_party/angle/src/libANGLE/renderer/FramebufferImpl.cpp) is bypassed. This function checks attachment->initState() == gl::InitState::MayNeedInit before calling initializeContents. Because the resource's shared flag is already Initialized, the automated zero-filling is skipped, and the subsequent draw call uses the uninitialized stencil bits.

Potential Steps to Reproduce (Suggested)

  1. Initialize a WebGL2 context with robust resource initialization enabled (default in Chrome).
  2. Create a DEPTH24_STENCIL8 renderbuffer and attach it to a framebuffer as GL_DEPTH_STENCIL_ATTACHMENT.
  3. Clear only the depth aspect: gl.clear(gl.DEPTH_BUFFER_BIT) while ensuring the stencil mask is disabled (e.g., gl.stencilMask(0)).
  4. The resource's internal InitState is now Initialized for both aspects, despite the stencil aspect containing uninitialized memory.
  5. Perform a draw call that uses the stencil aspect (e.g., enable GL_STENCIL_TEST). The backend will skip initialization because the resource state is Initialized.
  6. Use stencil testing logic and gl.readPixels to observe and extract the values of the uninitialized GPU memory.

Suggested Fix

For packed depth-stencil resources, ANGLE should track the initialization state of the depth and stencil aspects independently. The resource should only be considered fully Initialized if both aspects have been initialized. Alternatively, the logic in markAttachmentsInitialized or setInitState should be modified to ensure that marking one aspect as initialized does not prematurely mark the other aspect as initialized for packed formats.

Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e


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

Likely, the initialization state for packed depth-stencil resources is stored as a single flag rather than separate flags for the depth and stencil aspects, so initializing one aspect incorrectly marks the other as initialized too.

Impact

This may result in a cross-origin information leak of GPU memory to web content.

What the attacker needed

WebGL2 support in the browser; robust resource initialization enabled

The fix

ANGLE should track the initialization state of the depth and stencil aspects independently, or ensure that marking one aspect as initialized does not mark the other for packed formats.

How it was found

  1. Create a WebGL2 context with robust resource initialization enabled.
  2. Create a packed depth-stencil renderbuffer and attach it to a framebuffer.
  3. Clear only the depth aspect while the stencil write mask is disabled.
  4. The resource is now marked initialized for both aspects.
  5. Perform a draw call that uses the stencil aspect.
  6. Use stencil testing and readPixels to observe the uninitialized stencil 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.

WebGL is a browser API for drawing 3D graphics on a web page. To stop one website reading leftover data from another, the browser is supposed to zero out any graphics memory before a page uses it. This report says a bug in the graphics layer means that zeroing can be skipped for part of a combined depth-and-stencil buffer, so a malicious page might read old memory.

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.