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

Out of bounds write in ANGLE (CVE-2026-11043)

ANGLE's Metal backend failed to reset render target dimensions in a cached render pass descriptor when switching between framebuffers, allowing a compromised renderer to inject large dimensions via the Pixel Local Storage extension. This could cause out-of-bounds GPU memory writes and potentially escalate to a sandbox escape.

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: ANGLE's Metal backend fails to reset the renderTargetWidth and renderTargetHeight properties in its cached MTLRenderPassDescriptor when switching between render passes. A compromised renderer can leverage the Pixel Local Storage (PLS) extension to inject large dimensions into this cached state, which then persist when rendering to a smaller attachment. This violates Apple Metal API invariants and can result in out-of-bounds GPU memory writes.

Affected files:

  • third_party/angle/src/libANGLE/renderer/metal/mtl_state_cache.mm
  • third_party/angle/src/libANGLE/renderer/metal/FrameBufferMtl.mm

Estimated timestamp from git blame: 2022-11-30

Technical Details

A vulnerability exists in ANGLE's Metal backend where renderTargetWidth and renderTargetHeight are not properly reset in the persistent MTLRenderPassDescriptor object, leading to a state leak across render passes.

This is caused by two overlapping logic flaws:

  1. Missing State Reset in RenderPassDesc::convertToMetalDesc: In third_party/angle/src/libANGLE/renderer/metal/mtl_state_cache.mm, the convertToMetalDesc method updates the renderTargetWidth and renderTargetHeight properties of the MTLRenderPassDescriptor object (mCachedRenderPassDescObjC) if defaultWidth or defaultHeight is non-zero. However, it lacks an else branch to reset these properties back to 0 (or to the dimensions of the current attachments) when they are not explicitly specified. Because mCachedRenderPassDescObjC is allocated once per RenderCommandEncoder and reused, these properties retain their values from prior render passes.
  2. Stale State in FramebufferMtl::prepareRenderPass: In third_party/angle/src/libANGLE/renderer/metal/FrameBufferMtl.mm, the prepareRenderPass method populates the C++ mtl::RenderPassDesc structure. It only sets the defaultWidth and defaultHeight members when the framebuffer has no attachments. If a render pass is executed on a framebuffer without attachments, and then a subsequent render pass occurs on a framebuffer with attachments, the defaultWidth and defaultHeight members in the incoming descriptor are 0, which triggers the flaw in convertToMetalDesc.

Potential Attack Chain

To exploit this, an attacker needs a mechanism to set a large defaultWidth on a framebuffer without attachments. While external access to glFramebufferParameteri is restricted, a compromised renderer can trigger it internally via the GL_ANGLE_shader_pixel_local_storage (PLS) extension, which is supported on hardware such as Intel macOS.

Suggested steps to trigger the vulnerability (requires a compromised renderer process):

  1. Request the GL_ANGLE_shader_pixel_local_storage extension.
  2. Create a Framebuffer Object (FBO A) with no attachments.
  3. Bind a large texture (e.g., 16384x16384) as a PLS plane for FBO A and call glBeginPixelLocalStorageANGLE. This triggers an internal call to context->framebufferParameteri, setting the FBO's defaultWidth to 16384.
  4. Execute a draw call on FBO A. prepareRenderPass sets desc.defaultWidth = 16384, and convertToMetalDesc writes this into the cached mCachedRenderPassDescObjC.renderTargetWidth.
  5. Create a second Framebuffer Object (FBO B) and attach a very small texture (e.g., 16x16) as a color attachment.
  6. Execute a draw call on FBO B. Because FBO B has attachments, prepareRenderPass leaves desc.defaultWidth as 0. Consequently, convertToMetalDesc skips updating the renderTargetWidth in the Objective-C descriptor.
  7. The Metal driver receives the MTLRenderPassDescriptor where renderTargetWidth is still 16384, far exceeding the 16x16 attachment bounds.

Impact

Per Apple Metal documentation, renderTargetWidth "must be set to a value equal to or smaller than the smallest width across all attachments." Violating this invariant causes undefined behavior. During rasterization, the Metal driver assumes the target memory is 16384 pixels wide, resulting in massive out-of-bounds writes into GPU memory. This memory corruption within the GPU process could potentially be escalated to a sandbox escape.

Suggested Fix

Modify RenderPassDesc::convertToMetalDesc in mtl_state_cache.mm to ensure renderTargetWidth, renderTargetHeight, and defaultRasterSampleCount are always explicitly set or reset.

OBJECTIVE-C
    if ((defaultWidth | defaultHeight) != 0)
    {
        objCDesc.renderTargetWidth        = defaultWidth;
        objCDesc.renderTargetHeight       = defaultHeight;
        objCDesc.defaultRasterSampleCount = 1;
    }
    else
    {
        // Reset to 0 so Metal derives the size from the attachments
        objCDesc.renderTargetWidth        = 0;
        objCDesc.renderTargetHeight       = 0;
        objCDesc.defaultRasterSampleCount = 0; // Or standard default
    }

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.

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 cached Metal render pass descriptor's renderTargetWidth and renderTargetHeight were not reset when defaultWidth or defaultHeight was zero, so stale large dimensions persisted across render passes.

Impact

Violating the Metal API invariant causes undefined behaviour and massive out-of-bounds writes into GPU memory, which could potentially be escalated to a sandbox escape.

What the attacker needed

Compromised renderer process; Metal backend on supported hardware

The fix

The report suggests modifying convertToMetalDesc to always explicitly set or reset renderTargetWidth, renderTargetHeight, and defaultRasterSampleCount, but does not state that a fix was applied.

How it was found

  1. Request the GL_ANGLE_shader_pixel_local_storage extension.
  2. Create a framebuffer object with no attachments.
  3. Bind a large texture as a pixel local storage plane and begin pixel local storage, setting the framebuffer's default width to a large value.
  4. Execute a draw call on that framebuffer, causing the large width to be written into the cached render pass descriptor.
  5. Create a second framebuffer object with a small colour attachment.
  6. Execute a draw call on the second framebuffer; the cached descriptor still has the large width, exceeding the attachment bounds.

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 graphics component reused a saved description of a drawing surface without clearing its size. An attacker who already controls the renderer could set a huge size, then draw to a tiny surface, causing the graphics driver to write past the end of memory. This memory corruption could be used to break out of the browser's security sandbox.

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.