Uninitialized Use in ANGLE (CVE-2026-15109)
A logic flaw in ANGLE's Vulkan backend pruning logic can cause robust resource initialisation to be skipped for multi-layered textures, leaving uncleared GPU memory layers that can be read back via WebGL2. An attacker could potentially disclose sensitive graphics data from other processes.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 44 days
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 logic flaw in ANGLE's Vulkan backend update pruning logic can potentially cause robust resource initialization to be bypassed for multi-layered textures. This occurs because update bounding box calculations are evaluated using stale, uninitialized properties of an invalid ImageHelper. As a result, uncleared GPU memory layers can be exposed and read back via WebGL2, potentially disclosing sensitive graphics data from other processes.
Affected files:
third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cppthird_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cppthird_party/angle/src/libANGLE/Texture.cpp
Estimated timestamp from git blame: 2024-06-10
Root Cause
Inside the ANGLE Vulkan backend, ImageHelper::pruneSupersededUpdatesForLevelImpl (third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp) optimizes performance by discarding older staged updates whose update regions are fully enclosed by a more recent update.
For a whole-level Clear update (such as one staged for robust resource initialization), the update is staged with a layerCount of kEntireLevel (0xFFFFFFFF). When evaluating this update's bounding box, getDestSubresource resolves the layer count using the cached mLayerCount of the ImageHelper:
if (*layerCountOut == static_cast<uint32_t>(gl::ImageIndex::kEntireLevel))
{
*layerCountOut = imageLayerCount; // imageLayerCount is passed as mLayerCount
}
Additionally, the clear's spatial dimensions are resolved via getLevelExtents using the cached mExtents:
uint32_t width = std::max(mExtents.width >> levelVk.get(), 1u);
uint32_t height = std::max(mExtents.height >> levelVk.get(), 1u);
uint32_t depth = std::max(mExtents.depth >> levelVk.get(), 1u);
However, when a texture has just been defined (for instance, via glTexImage3D with null pixels), the backend allocates a vk::ImageHelper but defers allocating the physical VkImage. Consequently, mImage->valid() is false, and the cached properties mExtents and mLayerCount remain at their default values ({0,0,0} and 0 respectively).
If the application then stages a partial update targeting only layer 0 (such as a glTexSubImage3D call exceeding the 16 MB pruning threshold), the pruning logic is triggered:
- The whole-level
Clearupdate's bounding box is computed. BecausemLayerCountis0andmExtentsis{0,0,0}, the box incorrectly resolves to{0,0,0,1,1,1}. - The layer 0 partial update's bounding box is computed as
{0,0,0,W,H,1}. - Since
{0,0,0,W,H,1}fully encloses{0,0,0,1,1,1}, the whole-level robust resource initializationClearis incorrectly marked as superseded and destroyed. - Once the image is eventually allocated and initialized, only the layer 0 partial update is flushed. Layers
1toN-1are never cleared, leaving uninitialized GPU memory intact.
Potential Trigger Steps
Note: Due to internal tooling limitations, this scenario has not been dynamically executed and is based on a static analysis of the source code. The following are potential steps to reproduce the issue:
-
Define a 2D array texture with no data (allocating an invalid
ImageHelperand setting the frontend state toMayNeedInit):JavaScript gl.texImage3D(gl.TEXTURE_2D_ARRAY, 0, gl.RGBA8, 2048, 2048, 4, 0, gl.RGBA, gl.UNSIGNED_BYTE, null); -
Perform a partial sub-image update to layer 0 large enough to exceed the 16 MB pruning threshold (which forces robust-init staging and subsequent pruning):
JavaScript gl.texSubImage3D(gl.TEXTURE_2D_ARRAY, 0, 0, 0, 0, 2048, 2048, 1, gl.RGBA, gl.UNSIGNED_BYTE, uploadData); -
Force image creation and read back layers
1to3using framebuffers:JavaScript gl.bindFramebuffer(gl.READ_FRAMEBUFFER, fb); gl.framebufferTextureLayer(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, tex, 0, 1); gl.readPixels(0, 0, 2048, 2048, gl.RGBA, gl.UNSIGNED_BYTE, pixels); -
Observe whether the readback contains residual graphics memory instead of being initialized to zero.
Suggested Fix
To prevent this, the update bounding box calculations during pruning must not rely on stale mExtents or mLayerCount when valid() is false. A potential solution is to retrieve the true texture level dimensions and layer count from the frontend texture descriptor (e.g., passing them through to pruneSupersededUpdatesForLevel), or to bypass/disable update pruning entirely for any level where !valid() is true.
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 pruning logic uses stale cached properties (mExtents and mLayerCount) of an ImageHelper that has not yet been allocated, so a whole-level clear is incorrectly considered superseded by a partial update.
Impact
Uncleared GPU memory layers could be exposed and read back via WebGL2, potentially disclosing sensitive graphics data from other processes; the scenario has not been dynamically executed and is based on static analysis.
What the attacker needed
WebGL2 support; ANGLE Vulkan backend; texture with multiple layers
The fix
The update bounding box calculations during pruning should not rely on stale mExtents or mLayerCount when valid() is false; a potential solution is to retrieve the true texture level dimensions and layer count from the frontend texture descriptor, or to bypass update pruning entirely for any level…
How it was found
- Define a 2D array texture with no data, leaving the ImageHelper invalid.
- Perform a partial sub-image update to layer 0 large enough to exceed the 16 MB pruning threshold.
- Force image creation and read back layers 1 to 3 using framebuffers.
- Observe whether the readback contains residual graphics memory instead of being initialised to zero.
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.
When a program creates a texture, it is supposed to clear all of its memory to zero first so that no leftover data from other programs is visible. A bug in the code that decides which updates to skip means that for some textures with multiple layers, the clearing step is thrown away, so old graphics memory can be read back. This could let a malicious web page see data belonging to other applications.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.