Uninitialized resource in ANGLE (CVE-2026-91720)
A logic flaw in ANGLE's Metal backend lets a texture level's standalone image definition become desynchronised from the unified native storage, so a shader can read uninitialised VRAM. An attacker could use this to leak visual data from other origins or processes.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
Flapjack, 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 logic flaw in ANGLE's Metal backend allows a texture's standalone image definitions to desynchronize from its unified native storage. By using glTexSubImage2D on a mismatched texture level, an attacker can bypass texture synchronization checks and WebGL robustness clears. This allows a shader to read uninitialized VRAM, resulting in a cross-origin data leak.
Affected files:
third_party/angle/src/libANGLE/renderer/metal/TextureMtl.mm
Estimated timestamp from git blame: Unknown (Google3 checkout)
Background
In ANGLE's Metal backend, textures are initially tracked as standalone per-level images (mTexImageDefs). When operations like rendering require a unified mipmap chain, ANGLE calls ensureNativeStorageCreated to allocate a unified mNativeTextureStorage and migrates the standalone images into it. If a standalone image's format does not match the base format of the new unified storage, the migration for that level fails. If the keepImages flag is true, the standalone image is preserved rather than destroyed.
The Vulnerability
A potential vulnerability exists in how TextureMtl::ensureImageCreated interacts with TextureMtl::redefineImage. ensureImageCreated is designed to initialize a level's image definition and trigger redefineImage to handle any state synchronization or format mismatch handling. However, ensureImageCreated immediately returns success if an image definition already exists, bypassing redefineImage entirely.
An attacker can exploit this by defining a multi-level texture with mismatched formats (e.g., Level 0 is RGBA8, Level 1 is RGBA16F). Forcing native storage creation via a framebuffer operation will create a unified storage matching Level 0's format, leaving Level 1's standalone RGBA16F image orphaned but preserved.
If the attacker then calls glTexSubImage2D covering the entirety of Level 1, the frontend marks Level 1 as InitState::Initialized, permanently disabling robustness clears for that level. The backend call to TextureMtl::setSubImageImpl invokes ensureImageCreated, which finds the orphaned standalone image and returns early, bypassing the critical synchronization check in redefineImage.
The attacker's safe sub-image data is uploaded to the orphaned standalone texture, while Level 1 of the unified mNativeTextureStorage remains uninitialized. When the texture is bound for sampling, the backend binds the unified storage. The shader accesses the uninitialized VRAM in Level 1, which may contain sensitive visual data from other origins or processes.
Potential Reproduction Steps
Note: These steps trace the intended logic flow based on static analysis. Our tooling agent doesn't yet have the ability to run code to verify a full PoC.
- Create a WebGL 2 context and a 2D texture, setting
GL_TEXTURE_MAX_LEVELto 1 andGL_TEXTURE_MIN_FILTERto a mipmap-enabled value. - Call
texImage2Dfor Level 0 usingGL_RGBA8andnulldata. - Call
texImage2Dfor Level 1 usingGL_RGBA16Fandnulldata. This creates mismatched standalone textures. - Bind Level 0 to an FBO and call
glClear(). This forces native storage creation. Level 0 is migrated, but Level 1 is left as a standalone image due to the format mismatch. - Call
texSubImage2Don Level 1, providing an update area that covers the entire1x1extent. This marks Level 1 as initialized (bypassing clears) and uploads data to the standalone texture (bypassingredefineImage). - Bind the texture to a shader and use
texelFetchto read from Level 1. The shader will read uninitialized VRAM from the unified storage.
Suggested Fix
In TextureMtl::ensureImageCreated (third_party/angle/src/libANGLE/renderer/metal/TextureMtl.mm), the logic should be updated to verify that the existing standalone image is compatible with the current texture state (size and format). If an image exists but is incompatible, it should trigger redefineImage to ensure the native storage is properly synchronized and deallocated if necessary. Alternatively, redefineImage could be called unconditionally or its checks moved out to the caller.
Evaluated with Chrome root at commit: 65b3256311f3ab6fb9870eaa522de7e6dd2663bb
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, ensureImageCreated returns early when a standalone image already exists, skipping the redefineImage check that would detect a format mismatch with the unified storage.
Impact
A shader could read uninitialised VRAM that may contain sensitive visual data from other origins or processes, resulting in a cross-origin data leak.
What the attacker needed
WebGL 2 support; ANGLE Metal backend; attacker controls shader and texture setup
The fix
ensureImageCreated should verify that an existing standalone image matches the current texture's size and format, and call redefineImage when it does not.
How it was found
- Create a WebGL 2 context and a 2D texture with mipmapping enabled and a maximum level of one.
- Define level 0 as RGBA8 with no data.
- Define level 1 as RGBA16F with no data, creating mismatched standalone images.
- Bind level 0 to a framebuffer and clear it, forcing unified storage creation and leaving level 1 orphaned.
- Upload a full-size sub-image to level 1, marking it initialised while writing only to the orphaned image.
- Sample level 1 in a shader to read uninitialised VRAM from the unified storage.
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.
A graphics library keeps two copies of texture data: a per-level image and a combined storage. A bug lets one level's copy be left behind when the combined storage is made, so a program can read memory that was never written. That memory may still hold pictures from other websites or programs.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.