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

Use after free in ANGLE (CVE-2026-14425)

A use-after-free was reported in ANGLE's Vulkan backend, where orphaned samplers are destroyed immediately based on CPU reference counts without waiting for in-flight GPU work. An attacker could potentially trigger driver-level memory corruption or undefined behaviour in the GPU process by sharing a texture across two WebGL contexts and manipulating sampler state.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 33 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 use-after-free vulnerability exists in ANGLE's Vulkan backend due to lifetime mismanagement of orphaned samplers across distinct share groups. When textures are shared via display texture share groups, a sampler can be synchronously destroyed while still referenced by in-flight GPU commands. This can result in driver-level memory corruption or undefined behavior inside the GPU process.

Affected files:

  • third_party/angle/src/libANGLE/renderer/vulkan/vk_renderer.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/vk_utils.h
  • third_party/angle/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/ShareGroupVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp

Estimated timestamp from git blame: 2025-08-25

Root Cause

In ANGLE's Vulkan backend, Renderer::cleanupOrphanedSamplers() (in third_party/angle/src/libANGLE/renderer/vulkan/vk_renderer.cpp) reaps orphaned SharedSamplerPtr objects based purely on their CPU reference counts, without checking active GPU queue serials or ResourceUse bounds.

When the last CPU reference to a SharedSamplerPtr is released during garbage collection, the underlying smart pointer invokes releaseRef() in third_party/angle/src/libANGLE/renderer/vulkan/vk_utils.h. This synchronously destroys the sampler via SamplerHelper::destroy(), which immediately executes vkDestroySampler(). Unlike other garbage-collected objects (which are pushed to mSharedGarbageList and only freed once their corresponding GPU queue serials complete), the sampler is freed immediately.

Simultaneously, ANGLE's descriptor set updates write the raw VkSampler handle directly into the Vulkan descriptor set in ProgramExecutableVk.cpp:

C++
imageInfo->sampler = samplerHelper.get().getHandle();

Because the Vulkan descriptor set only tracks the raw handle and does not maintain a strong CPU-side reference to the SharedSamplerPtr, the sampler's lifetime is not synchronized with the GPU timeline when it is shared across different share groups.

Potential Trigger Steps

Note: These steps are analytical and represent a potential trigger path; our tooling agent does not have the capability to run code to confirm a functional proof-of-concept.

  1. Cross-Sharegroup Setup: Two distinct WebGL contexts (Context A and Context B) are initialized under separate share groups but with EGL_DISPLAY_TEXTURE_SHARE_GROUP_ANGLE enabled (default-enabled for the passthrough command decoder on Linux and ChromeOS). This allows them to bind and share the identical TextureVk instance T.
  2. Context A Draws: Context A performs a draw call with T. TextureVk::syncState() populates T.mSampler = S_A from Context A's SamplerCache (resulting in a CPU refcount of 2: one in Context A's cache, one in T.mSampler).
  3. Context B Draws: Context B performs a draw call with T. Since T.mSampler is already non-null and the state is unchanged, syncState() returns early. The raw handle of S_A is written into Context B's descriptor set, and Context B flushes its command buffer, leaving its batch (batch_B) in-flight on the GPU.
  4. Context A is Destroyed: Context A's WebGL context is closed. During destruction, S_A is moved to Renderer::mOrphanedSamplers since its refcount is 2 (still referenced by T.mSampler).
  5. Context B Modifies State: Context B modifies a parameter of T (e.g., glTexParameteri(T, GL_TEXTURE_WRAP_S, GL_REPEAT)).
  6. Context B Draws Again: Context B issues a new draw. The state change causes TextureVk::syncState() to call resetSampler(), dropping the reference to S_A. The CPU refcount of S_A falls to 1 (unique inside mOrphanedSamplers).
  7. Immediate Deallocation: Garbage collection runs and calls Renderer::cleanupOrphanedSamplers(). Since S_A is unique, it is erased from mOrphanedSamplers and vkDestroySampler() is called synchronously.
  8. Use-After-Free: If the GPU is still executing batch_B, the driver attempts to dereference the destroyed VkSampler handle, causing a driver-level Use-After-Free in the GPU process.

Suggested Fix

To resolve this issue, the deletion of orphaned samplers must be deferred until all active GPU commands referencing them have completed. Instead of executing vkDestroySampler immediately when a sampler becomes unique in cleanupOrphanedSamplers(), the SamplerHelper or its raw VkSampler handle should be transferred to the renderer's garbage collector (such as mSharedGarbageList) and associated with the current queue serial, ensuring it is only destroyed once the GPU has finished executing all pending commands.

Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379


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 orphaned-sampler cleanup frees samplers based only on CPU reference counts, without checking GPU queue serials, so destruction is not deferred until in-flight commands finish.

Impact

If the GPU is still executing the earlier batch, the driver could dereference the destroyed sampler handle, causing a driver-level use-after-free in the GPU process; the report notes the trigger path is analytical and was not confirmed with a working proof-of-concept.

What the attacker needed

Two WebGL contexts in separate share groups; display texture share group enabled; a texture shared between both contexts; GPU work still in flight

The fix

Deletion of orphaned samplers should be deferred by handing them to the renderer's garbage collector tied to the current queue serial, so they are only destroyed once pending GPU commands complete.

How it was found

  1. Set up two WebGL contexts in separate share groups with display texture share group enabled, sharing one texture.
  2. Have the first context draw with the texture, attaching a sampler to it.
  3. Have the second context draw with the same texture, writing the sampler handle into its descriptor set and leaving its command batch in flight.
  4. Destroy the first context so the sampler becomes orphaned.
  5. Change a texture parameter from the second context and draw again, dropping the last CPU reference to the sampler.
  6. Garbage collection then destroys the sampler immediately while the GPU may still be executing the earlier batch.

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 sampler is a small GPU object that tells the graphics card how to read a texture, for example how to wrap or filter it. The report says this object could be deleted while the graphics card was still using it, which is like demolishing a tool while someone is still holding it. The result could be memory corruption inside the browser's GPU process, though the report is analytical and was not confirmed with a working exploit.

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.