Skip to content
Memory corruption Advisory Advanced CVE-2026-8556

Inappropriate implementation in ANGLE (CVE-2026-8556)

A logic error in ANGLE's Vulkan backend means that remapping a uniform block binding does not update the dirty-type mask, so the backend takes an offset-only fast path and applies a large dynamic offset to a stale buffer descriptor. This can cause an out-of-bounds GPU memory read, potentially leaking cross-origin GPU memory data.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 37 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 security team.

Overview: A logic error in ANGLE's Vulkan backend allows glUniformBlockBinding to bypass necessary descriptor set updates by failing to update the UBO dirty-type mask. This can result in an out-of-bounds GPU memory read by applying a large dynamic offset to an incorrect, smaller buffer descriptor.

Affected files:

  • third_party/angle/src/libANGLE/Context.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
  • third_party/angle/src/libANGLE/State.cpp
  • third_party/angle/src/libANGLE/ProgramExecutable.cpp

Estimated timestamp from git blame: 2025-07-10

Summary

A potential vulnerability in ANGLE's Vulkan backend allows for out-of-bounds (OOB) GPU memory reads. The issue arises because glUniformBlockBinding fails to properly update the Uniform Buffer Object (UBO) dirty-type mask (mUniformBufferBlocksDirtyTypeMask). This leads the Vulkan backend to incorrectly use an 'offset-only' fast path during state synchronization, applying a new dynamic offset to a stale VkBuffer descriptor. This violates Vulkan safety requirements (VUID-01979) and can be exploited to leak cross-origin GPU memory data.

Technical Details

In ANGLE, State::mUniformBufferBlocksDirtyTypeMask tracks whether UBO updates involve only offset changes or full binding changes. The Vulkan backend uses this mask to optimize descriptor set updates. If the mask is exactly {Offset}, ContextVk::syncState may take the updateUniformBufferBlocksOffset fast path. This fast path only updates the mDynamicOffsets array sent to Vulkan without refreshing the underlying VkBuffer handles or ranges in the descriptor set.

When glUniformBlockBinding is called, it triggers Context::onUniformBlockBindingUpdated. This function marks the uniform block as dirty (DIRTY_BIT_UNIFORM_BUFFER_BINDINGS) but crucially fails to update mUniformBufferBlocksDirtyTypeMask. If an attacker ensures this mask is currently {Offset} (e.g., by changing the offset of a different buffer), a subsequent remapping via glUniformBlockBinding will leave the mask as {Offset}.

During the next draw call, ContextVk::syncState sees the {Offset} mask and takes the fast path. It retrieves the offset for the new binding and applies it to the mDynamicOffsets array. However, because a full update wasn't triggered, the descriptor set still contains the VkBuffer from the previous binding.

If the new binding's offset is large, the combined dynamicOffset + range can exceed the size of the original VkBuffer. In vk_cache_utils.cpp, DescriptorSetDescBuilder::updateOneUniformBufferOffset contains an assertion to catch this serial mismatch, but it is compiled out in release builds, allowing the mismatched offset to reach the Vulkan driver.

Potential Trigger Steps

(Note: These are suggested steps based on code analysis; our tooling has not executed a working proof of concept.)

  1. Setup: Create a WebGL2 context. Compile a shader program using multiple active std140 uniform blocks. Keep the number of active blocks small (e.g., <= 6) to ensure ProgramExecutableVk::usesDynamicUniformBufferDescriptors() returns true.
  2. Initial Bindings: Bind buffers using gl.bindBufferRange:
    • Buffer A to binding index 0.
    • Buffer B (small) to binding index 1.
    • Buffer C (large, with a large offset) to binding index 5.
  3. Sync: Issue gl.drawArrays to synchronize state and clear the dirty masks in the backend.
  4. Set Offset Mask: Call gl.bindBufferRange on binding index 0, changing only the offset. This sets mUniformBufferBlocksDirtyTypeMask to exactly {Offset}.
  5. Trigger Bug: Call gl.uniformBlockBinding(program, 1, 5) to remap uniform block 1 from binding 1 (Buffer B) to binding 5 (Buffer C). Context::onUniformBlockBindingUpdated fails to update the mask, leaving it as {Offset}.
  6. Exploit: Issue another gl.drawArrays. ContextVk::syncState takes the fast path. It applies Buffer C's massive dynamic offset to Buffer B's VkBuffer descriptor.
  7. Leak: The GPU reads out-of-bounds from Buffer B's memory pool. The shader processes this data, and the attacker reads it back via gl.readPixels, leaking cross-origin GPU memory.

Suggested Fix

In third_party/angle/src/libANGLE/Context.cpp, update Context::onUniformBlockBindingUpdated to properly flag the binding as changed:

C++
void Context::onUniformBlockBindingUpdated(GLuint uniformBlockIndex)
{
    mState.mDirtyBits.set(state::DIRTY_BIT_UNIFORM_BUFFER_BINDINGS);
    mState.mDirtyUniformBlocks.set(uniformBlockIndex);
    // Add this line:
    mState.mUniformBufferBlocksDirtyTypeMask.set(gl::BufferDirtyType::Binding);
    mStateCache.onUniformBufferStateChange(this);
}

Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad


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.

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 function that handles uniform block binding changes fails to mark the binding as changed in the dirty-type mask, so the Vulkan backend incorrectly uses an offset-only fast path.

Impact

An attacker could potentially leak cross-origin GPU memory data, though the report notes that the trigger steps are based on code analysis and no working proof of concept has been executed.

What the attacker needed

A WebGL2-capable browser; ability to run JavaScript on a web page

The fix

The function that handles uniform block binding updates should also set the dirty-type mask to indicate a binding change, so the backend performs a full descriptor update.

How it was found

  1. Create a WebGL2 context and compile a shader program with a few active uniform blocks.
  2. Bind buffers to several binding indices using bindBufferRange, including a small buffer and a large buffer with a large offset.
  3. Issue a draw call to synchronise state and clear dirty masks.
  4. Change only the offset of one binding to set the dirty-type mask to offset-only.
  5. Remap a uniform block to a different binding index using uniformBlockBinding.
  6. Issue another draw call to trigger the fast path and cause an out-of-bounds read, then read back data with readPixels.

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.

WebGL lets web pages run programs on the graphics card. A bug in the translation layer between WebGL and the Vulkan graphics API means that when a program changes which memory buffer a shader uses, the system sometimes forgets to update the buffer itself and only updates an offset. If that offset is large, the graphics card reads past the end of the old buffer, which could expose data from other web pages.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.