Uninitialized Use in ANGLE (CVE-2026-14418)
A logic flaw in ANGLE's Vulkan backend fails to reset a clear-value cache when an array texture level is redefined, so a subsequent robust-resource-initialization clear may be dropped. This could allow untrusted WebGL2 contexts to read back uninitialized GPU memory, potentially exposing residual data from other origins.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 36 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 fails to reset the mCurrentSingleClearValue cache when an array texture level is redefined. This allows the stale clear cache to persist across the release and reallocation of the underlying VkImage handle. Consequently, subsequent robust-resource-initialization clears on the newly allocated image may be incorrectly dropped, potentially disclosing uninitialized GPU memory.
Affected files:
third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cppthird_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp
Estimated timestamp from git blame: 2020-06-30
Root Cause
In ANGLE's Vulkan backend, ImageHelper::mCurrentSingleClearValue caches the last full-level clear operation to optimize away redundant identical clears. However, this cache is not invalidated when an array texture level is redefined and the underlying VkImage is released and reallocated.
Specifically, in third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:
- The non-array path
removeSingleSubresourceStagedUpdatescorrectly invalidates the cache viamCurrentSingleClearValue.reset(). - Conversely, the array path
removeStagedUpdatesfails to resetmCurrentSingleClearValue:
void ImageHelper::removeStagedUpdates(ErrorContext *context,
gl::LevelIndex levelGLStart,
gl::LevelIndex levelGLEnd)
{
// *** No mCurrentSingleClearValue.reset() ***
for (gl::LevelIndex level = levelGLStart; level <= levelGLEnd; ++level)
{
...
levelUpdates->clear();
}
}
When an array texture is redefined (for example, in TextureVk::setSubImage in TextureVk.cpp at line 2620), mImage->removeStagedUpdates is called. Because the dimension or format changed, TextureRedefineLevel is triggered, and releaseImage(contextVk) is called to destroy the underlying VkImage handle.
Crucially, the ImageHelper instance itself is not deleted but is instead reused in the subsequent ensureImageAllocated call. Because neither ImageHelper::releaseImage nor the initialization process clears mCurrentSingleClearValue, the stale clear cache survives across VkImage recreation on the same ImageHelper instance.
When a new robust-resource-initialization (RRI) clear of {0,0,0,0} is staged on the freshly-allocated VkImage, flushStagedUpdates compares the staged clear against the stale mCurrentSingleClearValue cache. Since the metadata matches (such as the target level index 0 and clear color {0,0,0,0}), the comparison succeeds and the RRI clear is silently dropped inside vk_helpers.cpp:
if (mCurrentSingleClearValue.valid())
{
gl::LevelIndex clearLevel(mCurrentSingleClearValue.value().levelIndex);
if (clearLevel >= levelGLStart && clearLevel < levelGLEnd)
{
...
if (IsClearOfAllChannels(update.updateSource) &&
mCurrentSingleClearValue.value() == update.data.clear)
{
update.release(renderer);
levelUpdates->clear(); // <-- The RRI clear is dropped
}
}
}
Impact
This behavior bypasses robust-resource-initialization within the Vulkan backend for array textures, allowing untrusted WebGL2 contexts to read back uninitialized/recycled GPU memory. Since GPU memory pages are recycled across processes and contexts, this could potentially expose residual data belonging to other origins (such as rendered canvas data or video frames) inside the GPU process.
Potential Steps to Trigger the Issue
Note: These are potential steps based on static code analysis; our tooling does not currently have the ability to run or verify proof-of-concept code dynamically.
- In a Vulkan-backed WebGL2 context, create and bind a 2D array texture.
- Allocate an initial small layer (e.g., 1x1x4) to level 0.
- Bind the texture to a framebuffer and execute a read operation (e.g.,
gl.readPixels) to force the initial RRI clear to flush and populate themCurrentSingleClearValuecache. - Redefine level 0 of the array texture to a larger dimension (e.g., 256x256x4). Redefining an array texture invokes
removeStagedUpdates(which fails to invalidate the cache) and triggersreleaseImage. - Reallocate the new
VkImagestructure. ANGLE stages a new RRI clear of{0,0,0,0}for the new size. - Read back pixels or sample the texture. ANGLE compares the staged RRI clear against the stale cache value, matches them, drops the actual clear, and returns the recycled, uninitialized GPU memory pages.
Suggested Fix
In third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp, modify ImageHelper::removeStagedUpdates to ensure that mCurrentSingleClearValue is reset when staged updates are removed:
void ImageHelper::removeStagedUpdates(ErrorContext *context,
gl::LevelIndex levelGLStart,
gl::LevelIndex levelGLEnd)
{
assertSubresourceUpdateRefCountsConsistent();
mCurrentSingleClearValue.reset();
...
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
The array-texture path in ImageHelper::removeStagedUpdates does not reset mCurrentSingleClearValue, so a stale clear cache survives VkImage release and reallocation.
Impact
This could allow untrusted WebGL2 contexts to read uninitialized GPU memory, potentially exposing residual data from other origins.
What the attacker needed
Vulkan-backed WebGL2 context; Ability to create and resize array textures; GPU memory recycling across contexts
The fix
The suggested fix is to reset mCurrentSingleClearValue in ImageHelper::removeStagedUpdates.
How it was found
- Create and bind a 2D array texture in a Vulkan-backed WebGL2 context.
- Allocate a small initial layer at level 0.
- Bind the texture to a framebuffer and read pixels to force the initial clear and populate the cache.
- Redefine level 0 to a larger dimension, which triggers removeStagedUpdates and releaseImage.
- Reallocate the new VkImage and stage a new clear of {0,0,0,0}.
- Read back pixels or sample the texture; the clear is dropped and uninitialized memory is returned.
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 system to clear a texture, the system sometimes remembers the last clear to avoid doing the same work twice. Here, after a texture was resized, that memory was not cleared, so the system wrongly thought it had already cleared the new texture. As a result, a web page could read leftover data from the graphics card's memory that belonged to other programs.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.