Use after free in ANGLE (CVE-2026-10919)
A use-after-free in ANGLE's Vulkan backend occurs because a bare pointer to an inline ImageHelper is cached during a render pass and later dereferenced after the parent Framebuffer is synchronously deleted. An attacker could exploit this to obtain an arbitrary 32-bit decrement primitive in the GPU process, potentially leading to remote code execution.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
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 potential Use-After-Free (UAF) vulnerability exists in ANGLE's Vulkan backend due to deferred render pass closure. A bare pointer to an inline ImageHelper is cached during a render pass and dereferenced later, leading to a UAF if the parent Framebuffer is synchronously deleted. Exploitation provides a highly reliable arbitrary 32-bit decrement primitive in the GPU process.
Affected files:
third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cppthird_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.hthird_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.h
Estimated timestamp from git blame: 2025-09-08
Background
In ANGLE's Vulkan backend, FramebufferVk contains an inline embedded vk::ImageHelper member named mFragmentShadingRateImage. When a render pass starts using a framebuffer with a fragment shading rate attachment, the address of this inline member (&mFragmentShadingRateImage) is stored as a bare ImageHelper* in RenderPassCommandBufferHelper::mFragmentShadingRateAtachment.mImage.
The Vulnerability
A Use-After-Free condition occurs because gl::Framebuffer objects can be deleted synchronously while their associated render passes are deferred and left active in the background for performance reasons.
Here are the potential steps an attacker might follow to exploit this:
- Foveation Initialization: A compromised renderer creates a texture with
GL_TEXTURE_FOVEATED_FEATURE_BITS_QCOM(reachable via the passthrough command buffer on supported hardware like Adreno) and attaches it to FBO X. - Pointer Caching: The attacker binds FBO X and issues a draw call.
FramebufferVk::startNewRenderPassis called, which passes the address of the inlinemFragmentShadingRateImagetoRenderPassCommandBufferHelper::fragmentShadingRateImageRead. This stores the bare pointer inmImage. - Deferred Render Pass Closure: The attacker binds a different framebuffer (FBO Y). ANGLE processes the binding change but, for performance optimization, does not immediately flush or close the existing render pass. The
RenderPassCommandBufferHelperremains alive in the background. - Synchronous Deletion: The attacker deletes FBO X via
glDeleteFramebuffers. Because FBO X is unbound, the deletion executes synchronously. The underlyingFramebufferVkobject is freed viaSafeDelete(mImpl), and becausemFragmentShadingRateImageis inline, its backing memory is freed as well. - Heap Spraying: The attacker sprays the heap to reclaim the freed
FramebufferVkchunk. They specifically craft themLastNonShaderReadOnlyEventmember of the sprayedImageHelper. This member is aRefCountedEventcontaining a bare pointerRefCounted<EventAndStage>* mHandle. The attacker setsmHandleto an arbitrary target memory address. - UAF Trigger: The attacker issues a draw call on FBO Y, forcing the deferred render pass to flush.
RenderPassCommandBufferHelper::endRenderPassretrieves the danglingmImagepointer and passes it toupdateImageLayoutAndBarrier. - Arbitrary Decrement Primitive: The layout transition logic executes
mLastNonShaderReadOnlyEvent.release(context), which callsmHandle->getAndReleaseRef() == 1. BecausemRefCountis the first member of theRefCounted<T>struct at offset +0, this executes a 32-bit decrement (mRefCount--) exactly at the attacker's chosenmHandleaddress. This provides a powerful, highly reliable primitive to corrupt lengths/sizes and achieve RCE in the GPU process.
(Note: These are suggested steps based on source code analysis. Our tooling agent does not yet have the ability to run code to produce a working Proof of Concept).
Suggested Fix
The vulnerability fundamentally stems from caching a bare pointer to an object with a strictly shorter lifetime. Potential fixes include:
- Refactoring
mFragmentShadingRateImageout of the inlineFramebufferVkmemory and managing it via reference counting orstd::shared_ptrso it survives as long as theRenderPassCommandBufferHelperneeds it. - Having
FramebufferVk::destroyexplicitly walk the active command buffers and clear out any cached attachments originating from itself. - Adopting
raw_ptr<T>(MiraclePtr) forRenderPassAttachment::mImage, which would mitigate the UAF into a controlled crash.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
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.
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 caching of a bare pointer to an inline member whose lifetime is shorter than the deferred render pass that holds the pointer.
Impact
Exploitation could provide a highly reliable arbitrary 32-bit decrement primitive in the GPU process, potentially leading to remote code execution, though the report notes that no working proof of concept has been produced.
What the attacker needed
Compromised renderer; supported hardware (e.g., Adreno); ability to issue GL commands
The fix
The vulnerability should be fixed by refactoring the inline image helper to use reference counting or shared ownership, or by clearing cached attachments when the framebuffer is destroyed.
How it was found
- Create a texture with foveated feature bits and attach it to a framebuffer.
- Bind the framebuffer and issue a draw call, causing the address of the inline image helper to be stored.
- Bind a different framebuffer, leaving the previous render pass deferred and active.
- Delete the original framebuffer synchronously, freeing the inline image helper memory.
- Spray the heap to reclaim the freed chunk and craft a member to point to an arbitrary address.
- Issue a draw call on the second framebuffer to flush the deferred render pass, triggering the use-after-free and the decrement primitive.
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 use-after-free happens when a program keeps a pointer to memory that has already been freed and then uses it again. Here, a graphics component stored a pointer to part of a framebuffer object, but that object could be deleted while the pointer was still in use. An attacker who can control the freed memory could turn this into a powerful primitive to corrupt data and possibly run 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.