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

Uninitialized Use in ANGLE (CVE-2026-17714)

An OR-aggregated check in ANGLE's Vulkan backend causes an entire cube map mip level to be skipped during image re-specification when only one face is redefined, so the other faces are never copied into the new image. A WebGL2 attacker could then read back uninitialised GPU memory through a framebuffer attachment.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 52 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 potential vulnerability in ANGLE's Vulkan backend allows for uninitialized GPU memory disclosure via WebGL. The issue arises in reinitImageAsRenderable where an OR-aggregated check causes an entire cube map level to be skipped when only a single face is redefined. This leads to discarding the old image without copying the non-redefined faces, resulting in uninitialized memory allocation when the new image is initialized.

Affected files:

  • third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp
  • third_party/angle/src/libANGLE/renderer/renderer_utils.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp
  • third_party/angle/src/libANGLE/Texture.cpp

Estimated timestamp from git blame: 2021-08-17

Summary

A potential security vulnerability in ANGLE's Vulkan backend (third_party/angle) can lead to uninitialized GPU memory disclosure reachable from WebGL. The root cause is located in TextureVk::reinitImageAsRenderable inside third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp. When recreating a cube map image to satisfy a format change (e.g., from a sampled-only format to a renderable format), ANGLE uses an OR-aggregated check to determine whether a mipmap level has been redefined. This causes the entire mipmap level (all 6 faces) to be skipped during data migration if even a single face of that level was incompatibly redefined, leading to uninitialized GPU memory allocation for the remaining 5 faces when the new image is created.

Root Cause Analysis

In TextureVk::respecifyImageStorage (lines 3267–3283), when a texture needs to undergo a format change to become renderable, the following arm is executed:

C++
const vk::Format &format = getBaseLevelFormat(contextVk->getRenderer());
if (mImage->getActualFormatID() !=
        format.getActualImageFormatID(getRequiredFormatSupport()) &&
    mImage->getLevelCount() == getMipLevelCount(ImageMipLevels::EnabledLevels)) {
  ANGLE_TRY(reinitImageAsRenderable(contextVk, format));
} else {
  stageSelfAsSubresourceUpdates(contextVk);
}
releaseImage(contextVk);

While the sibling arm (stageSelfAsSubresourceUpdates) has been robustly refactored to perform fine-grained AND-aggregation and copy faces on a per-face basis, reinitImageAsRenderable still aggregates redefinitions over the entire mip level:

C++
// TextureVk.cpp:3151-3157
for (vk::LevelIndex levelVk(0); levelVk < vk::LevelIndex(levelCount); ++levelVk) {
  gl::LevelIndex levelGL = mImage->toGLLevel(levelVk);
  if (IsTextureLevelRedefined(mRedefinedLevels, mState.getType(), levelGL)) {
    continue; // <--- Skips the ENTIRE level (all 6 layers) if ANY face is redefined
  }
  ...
  ANGLE_TRY(mImage->copyImageDataToBuffer(contextVk, levelGL, layerCount, 0, sourceBox, srcBuffer, &srcData));
  ...
}

The function IsTextureLevelRedefined performs an OR operation across all faces of a CubeMap:

C++
// renderer_utils.cpp:2383-2398
bool IsTextureLevelRedefined(const gl::CubeFaceArray<gl::TexLevelMask> &redefinedLevels,
                             gl::TextureType textureType,
                             gl::LevelIndex level) {
  gl::TexLevelMask redefined = redefinedLevels[0];
  if (textureType == gl::TextureType::CubeMap) {
    for (size_t face = 1; face < gl::kCubeFaceCount; ++face) {
      redefined |= redefinedLevels[face]; // OR aggregation
    }
  }
  return redefined.test(level.get());
}

Because of this, if only one face of a cube map level is redefined, the entire level (all 6 faces) is skipped in the loop inside reinitImageAsRenderable. Subsequently, releaseImage discards the old VkImage allocation (the only copy of the non-redefined faces' pixel data) and resets mRedefinedLevels = {} (line 4455).

When the new renderable VkImage is allocated inside ensureImageInitialized, it schedules no clears because WebGL has robust resource initialization enabled (isRobustResourceInitEnabled = true), which causes the emulator's fallback clear check (stageClearIfEmulatedFormat) to return early:

C++
// vk_helpers.cpp:9725-9731
void ImageHelper::stageClearIfEmulatedFormat(bool isRobustResourceInitEnabled, bool isExternalImage) {
  if (!hasEmulatedImageChannels() || isRobustResourceInitEnabled)
    return; // Early exit when robust resource init is enabled
}

However, because the 5 non-redefined faces were previously uploaded, the frontend tracks them as already InitState::Initialized (based on the initial upload of non-null pixels). Therefore, when the attacker attempts to read back from one of these faces, the frontend robust resource initialization is completely bypassed, resulting in the return of uninitialized VkDeviceMemory from the GPU process.

Potential Attack Path (WebGL2)

Below is a suggested sequence of API calls that could be executed in a WebGL2-enabled context to trigger this behavior. Please note that our tooling does not yet have the capability to run code to confirm this proof of concept.

  1. Create a TEXTURE_CUBE_MAP and upload valid, non-null pixel data to all 6 faces of the cube map for levels 0 (e.g., size 64x64) and 1 (e.g., size 32x32), and set the minification filter to LINEAR_MIPMAP_LINEAR. The frontend marks all these subresources as InitState::Initialized.
  2. Draw sampling from the cube map to trigger the allocation of the initial sampled-only VkImage.
  3. Bind a framebuffer and attach face 0 (POSITIVE_X) of level 0 to COLOR_ATTACHMENT0 using gl.framebufferTexture2D. This updates mHasBeenBoundAsAttachment to true.
  4. Call gl.texImage2D to incompatibly redefine one face of level 1 (e.g., NEGATIVE_X to size 64x64). This updates mRedefinedLevels for NEGATIVE_X at level 1.
  5. Perform a draw or clear command on the framebuffer. This forces state synchronization, triggering a format re-specification to a Renderable actual format fallback.
  6. The reinitImageAsRenderable execution path is taken. Because of the IsTextureLevelRedefined OR-aggregated check, level 1 is entirely skipped. The old image is destroyed, and the other 5 non-redefined faces of level 1 are left unallocated/uninitialized in the newly created image.
  7. Re-specify the NEGATIVE_X face at level 1 to size 32x32 to restore mipmap layout compliance.
  8. Attach one of the uninitialized faces (e.g., POSITIVE_X of level 1) to a framebuffer and perform gl.readPixels to extract uninitialized GPU device memory.

Suggested Fix

Refactor reinitImageAsRenderable to handle data migration on a fine-grained, per-face basis when dealing with cube maps, matching the AND-aggregated logic implemented in the stageSelfAsSubresourceUpdates sibling arm. Specifically:

  • Migrate subresource levels using an AND-aggregated check (similar to AggregateSkipLevelsAllFacesSkipped) so that entire levels are only skipped if all faces of that level are redefined.
  • For levels where only a subset of faces are redefined, copy and stage data for the non-redefined faces individually.

Evaluated with Chrome root at commit: 3947e01999a53d4e2382e39736cb79d79c7dffcf


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 re-specification path aggregates redefinition flags across all cube faces with an OR, so a level is skipped entirely when any one face is redefined, unlike the sibling path that copies per face.

Impact

A web page could potentially read uninitialised GPU memory, which may contain data left by other contexts; the report notes the proof of concept was not executed, so exploitation is unconfirmed.

What the attacker needed

WebGL2 context in the browser; Vulkan-backed ANGLE build

The fix

The report suggests refactoring the function to migrate data per face, skipping a level only when all its faces are redefined.

How it was found

  1. Upload pixel data to all six faces of levels 0 and 1 of a cube map and enable mipmapping.
  2. Sample from the cube map so the initial sampled-only image is allocated.
  3. Attach one face of level 0 to a framebuffer colour attachment.
  4. Redefine a single face of level 1 with an incompatible size.
  5. Draw or clear to force the format re-specification and image rebuild.
  6. Restore the redefined face's size, then attach an untouched face of level 1 and read pixels back.

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 cube map is a texture made of six square images, one per direction. When the browser rebuilds such a texture in graphics memory, it is supposed to copy the old pixels across; here a single changed face made the code skip copying the whole level, leaving five faces holding whatever was already in GPU memory. Reading those faces back can leak leftover data from other programs.

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.