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

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

A use-after-free exists in ANGLE's Vulkan backend when a texture bound to multiple framebuffer colour attachments is respecified, leaving dangling render target pointers that are later dereferenced. An attacker able to manipulate GPU process heap allocations could potentially reclaim the freed memory and hijack virtual calls, leading to remote code execution in the sandboxed GPU process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 59 days

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: A potential use-after-free exists in ANGLE's Vulkan backend during framebuffer state synchronization. When a texture attached to multiple color slots undergoes storage respecification, it destroys all associated RenderTargetVk objects, but re-entrant dirty bit notifications are ignored by the active sync loop. This leaves dangling raw pointers in the framebuffer's render target cache that are subsequently dereferenced, potentially allowing RCE in the GPU process.

Affected files:

  • third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp
  • third_party/angle/src/libANGLE/Framebuffer.cpp
  • third_party/angle/src/libANGLE/Texture.cpp
  • third_party/angle/src/libANGLE/renderer/RenderTargetCache.h

Estimated timestamp from git blame: 2026-01-30

Description

A potential Use-After-Free (UAF) vulnerability exists in ANGLE's Vulkan backend related to how gl::Framebuffer synchronizes state with FramebufferVk. The issue occurs when a single texture is bound to multiple framebuffer color attachments, and a state change triggers an image storage respecification.

When gl::Framebuffer::syncState is called, it takes a snapshot of the current dirty bits (mDirtyBitsGuard = mDirtyBits;) and passes this to the Vulkan backend. FramebufferVk::syncState iterates over this snapshot using a BitSetIterator.

If processing a dirty attachment (e.g., GL_COLOR_ATTACHMENT0) requires the underlying texture to respecify its image storage (e.g., via TextureVk::respecifyImageStorageIfNecessary), the texture destroys its existing Vulkan image and clears all cached RenderTargetVk objects by calling releaseImageViews. This frees the memory for all render targets associated with this texture, including those bound to other attachments (e.g., GL_COLOR_ATTACHMENT1).

The texture broadcasts a SubjectChanged notification regarding this recreation. gl::Framebuffer receives this and re-entrantly sets the dirty bit for the other affected attachments (DIRTY_BIT_COLOR_BUFFER_CONTENTS_1). However, because FramebufferVk::syncState is iterating over a by-value snapshot of the dirty bits, it ignores this newly set bit and fails to update the render target cache for attachment 1.

After the sync loop completes, FramebufferVk::syncState calls updateColorAttachmentColorspace and later startNewRenderPass. Both of these methods iterate over all active color attachments and dereference the raw RenderTargetVk* pointers stored in mRenderTargetCache. For attachment 1, this pointer is now dangling, resulting in a use-after-free.

Finally, when mImpl->syncState returns, gl::Framebuffer::syncState unconditionally executes mDirtyBits.reset(), permanently discarding the re-entrant notification and cementing the stale cache.

Potential Trigger Steps

Note: These are suggested steps based on static code analysis; our tooling agent does not currently have the capability to execute a working proof-of-concept.

  1. Create a 2D Array Texture or 3D Texture with multiple layers.
  2. Create a Framebuffer and attach layer 0 to GL_COLOR_ATTACHMENT0 and layer 1 to GL_COLOR_ATTACHMENT1.
  3. Issue a draw call to populate the backend RenderTargetCache with valid RenderTargetVk pointers.
  4. Bind the texture to an image unit (e.g., glBindImageTexture(0, texture, ...)). This flags the texture to require VK_IMAGE_USAGE_STORAGE_BIT but does not trigger a state notification.
  5. Re-bind layer 0 to GL_COLOR_ATTACHMENT0 to dirty only the first attachment in the framebuffer's mDirtyBits.
  6. Issue a second draw call. FramebufferVk::syncState will process attachment 0, trigger the storage respecification (freeing attachment 1's RenderTargetVk), ignore the re-entrant dirty bit for attachment 1, and subsequently dereference the freed pointer for attachment 1.

Exploitability

The RenderTargetVk objects are stored as raw pointers within RenderTargetCache and are not protected by MiraclePtr (BRP) within the ANGLE component. An attacker with the ability to manipulate heap allocations in the GPU process could reclaim the freed RenderTargetVk memory. By forging internal pointers (such as vk::ImageHelper*), the attacker can hijack virtual method calls (e.g., image->hasSubresourceDefinedContent()) triggered during startNewRenderPass, potentially achieving Remote Code Execution (RCE) in the sandboxed GPU process.

Proposed Fix

  1. Do not unconditionally discard re-entrant dirty bits: In gl::Framebuffer::syncState, instead of unconditionally calling mDirtyBits.reset(), the code should clear only the bits that were actually processed (e.g., mDirtyBits &= ~mDirtyBitsGuard;), or loop until mDirtyBits.none() is true to ensure re-entrant updates are handled before drawing.
  2. Safe Caching: RenderTargetCache should ideally not rely on raw pointers. Using weak pointers or an observer pattern to explicitly nullify cached render targets when their underlying storage is destroyed would prevent the dangling pointer dereference entirely.

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from 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

The sync loop iterates over a by-value snapshot of dirty bits, so a re-entrant dirty bit set during texture respecification is ignored and the stale render target cache entry is not refreshed before being dereferenced.

Impact

An attacker with the ability to manipulate heap allocations in the GPU process could reclaim the freed memory and hijack virtual method calls, potentially achieving remote code execution in the sandboxed GPU process.

What the attacker needed

Ability to manipulate GPU process heap; texture bound to multiple colour attachments; storage respecification triggered

The fix

The code should clear only the dirty bits that were actually processed or loop until no dirty bits remain, and the render target cache should use weak pointers or an observer pattern to nullify entries when storage is destroyed.

How it was found

  1. Create a 2D array or 3D texture with multiple layers.
  2. Create a framebuffer and attach layer 0 to colour attachment 0 and layer 1 to colour attachment 1.
  3. Issue a draw call to populate the render target cache with valid pointers.
  4. Bind the texture to an image unit so it requires storage usage without triggering a state notification.
  5. Re-bind layer 0 to colour attachment 0 to dirty only the first attachment.
  6. Issue a second draw call, which processes attachment 0, frees attachment 1's render target, ignores the re-entrant dirty bit, and dereferences the freed pointer.

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 texture can be attached to more than one colour output of a framebuffer. When the program changes the texture's storage, the engine frees the internal objects for all attachments but only marks one attachment as needing an update, so another attachment keeps a pointer to freed memory. Later code follows that stale pointer, which can crash or, if an attacker controls the freed memory, run their own code.

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.