Uninitialized Use in ANGLE (CVE-2026-11137)
A logic error in ANGLE's Vulkan backend layer-range matching caused a whole-array clear staged for robust resource initialisation to be treated as matching a single-layer request, so only one layer was actually cleared while the whole texture level was marked initialised. A WebGL application could then read uninitialised GPU memory from the other layers, potentially exposing data from other contexts or origins.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 53 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 without the Chrome Security team.
Overview: A logic error in ANGLE's Vulkan backend layer range matching can cause robust resource initialization to be skipped for certain layers of 2D array textures. This allows WebGL applications to potentially read uninitialized GPU memory, which may contain sensitive data from other contexts or origins.
Affected files:
third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cppthird_party/angle/src/libANGLE/renderer/vulkan/RenderTargetVk.cppthird_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cppthird_party/angle/src/libANGLE/Texture.cppthird_party/angle/src/libANGLE/Framebuffer.cppthird_party/angle/src/libANGLE/FramebufferAttachment.cpp
Estimated timestamp from git blame: 2024-06-11
Summary
A potential vulnerability exists in ANGLE's Vulkan backend where robust resource initialization can be bypassed for 2D array textures (e.g., TEXTURE_2D_ARRAY). A logic error in SubresourceUpdate::matchesLayerRange causes a staged clear intended for an entire texture level to be incorrectly matched with a single-layer operation. This results in the whole-array clear being erased from the pending updates list while only one layer is actually cleared by the hardware. Subsequent reads from other layers of the texture expose uninitialized GPU memory, which may contain sensitive data from other contexts or origins.
Technical Details
In ANGLE's Vulkan backend, when an array texture is created without initial data, robust resource initialization stages a clear for the entire level. This update is stored with layerIndex = 0 and layerCount = VK_REMAINING_ARRAY_LAYERS (0xFFFFFFFF).
The function ImageHelper::SubresourceUpdate::matchesLayerRange in third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp determines if a staged update precisely matches a requested layer range:
bool ImageHelper::SubresourceUpdate::matchesLayerRange(uint32_t layerIndex,
uint32_t layerCount) const
{
uint32_t updateBaseLayer, updateLayerCount;
getDestSubresource(gl::ImageIndex::kEntireLevel, &updateBaseLayer, &updateLayerCount);
return updateBaseLayer == layerIndex &&
(updateLayerCount == layerCount || updateLayerCount == VK_REMAINING_ARRAY_LAYERS);
}
When getDestSubresource retrieves a whole-array clear, updateLayerCount is VK_REMAINING_ARRAY_LAYERS. The condition updateLayerCount == VK_REMAINING_ARRAY_LAYERS evaluates to true regardless of the requested layerCount, provided updateBaseLayer == layerIndex.
When a single layer (e.g., layer 0) of such an array texture is attached to a framebuffer and a draw occurs, ANGLE calls flushSingleSubresourceStagedUpdates with layer = 0 and layerCount = 1.
Due to the logic error, the staged whole-array clear is incorrectly identified as an exact match for this single-layer request. Consequently:
- The clear is deferred to the RenderPass
loadOp. Because the framebuffer attachment'sVkImageViewis restricted to layer 0, only layer 0 is cleared by the GPU hardware. - The staged whole-array clear is removed from the update list by
removeSingleSubresourceStagedUpdates, which uses the same flawedmatchesLayerRangelogic. - The ANGLE frontend marks the entire texture level as initialized (
InitState::Initialized).
Subsequent sampling or reading from layers > 0 will find the texture marked as initialized and no staged updates pending. The application then reads raw, uninitialized VkDeviceMemory.
Potential Reproduction Steps
Note: Our tooling agent does not have the ability to run code. These are suggested steps to trigger the issue:
- In a WebGL2 context using the ANGLE Vulkan backend, create a 2D array texture with multiple layers (e.g., 4 layers) using
texStorage3Dwithout providing initial pixel data. - Create a framebuffer and attach only layer 0 of the texture using
framebufferTextureLayer. - Issue any draw command (e.g.,
drawArrays). This triggers the incorrect flushing and erasure of the staged whole-array clear. - Attach a different layer (e.g., layer 2) to the framebuffer for reading.
- Use
readPixelsto retrieve data from that layer. - The returned data may contain stale GPU memory instead of zeros.
Impact
This is a potential cross-origin information leak. A malicious website could exploit this to read uninitialized GPU memory from the shared GPU process, potentially disclosing pixel data belonging to other origins, WebGL contexts, or sensitive browser UI components.
Suggested Fix
The logic in matchesLayerRange should be corrected to ensure that if updateLayerCount == VK_REMAINING_ARRAY_LAYERS, it only returns true if the requested layerCount actually encompasses the rest of the array. For example, by passing the actual image layer count into matchesLayerRange so it can properly resolve VK_REMAINING_ARRAY_LAYERS to a concrete number before comparing it to the requested layerCount.
Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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 layer-range comparison treated the special 'remaining array layers' marker as matching any requested layer count, so a whole-array staged clear was consumed by a single-layer flush and then removed from the pending list.
Impact
A malicious website could potentially read uninitialised GPU memory from the shared GPU process, which may disclose pixel data belonging to other origins, WebGL contexts or browser UI; the report notes its tooling could not run code, so this remains unconfirmed.
What the attacker needed
Victim visits a malicious web page; browser uses ANGLE Vulkan backend; WebGL2 support enabled
The fix
The comparison should resolve the 'remaining array layers' marker to a concrete layer count using the image's actual layer count before comparing it with the requested range.
How it was found
- Create a multi-layer 2D array texture in WebGL2 on the ANGLE Vulkan backend without supplying initial pixel data.
- Attach only layer 0 of that texture to a framebuffer.
- Issue a draw command, which flushes and erases the staged whole-array clear.
- Attach a different layer, such as layer 2, to the framebuffer for reading.
- Read the pixels back from that layer and observe stale GPU memory instead of zeros.
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 asks the graphics card for a new texture, the driver is supposed to wipe it clean first so no leftover data from other programs leaks through. Here a check that decides whether a pending wipe covers the requested part of the texture was too loose, so the wipe was thrown away after clearing only one slice. The rest of the texture kept whatever was in memory before, and the web page could read it back.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.