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

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

A WebGL validation flaw in ANGLE allows an invalid self-copy on a cube map face to bypass feedback-loop checks, and an out-of-bounds source area causes the D3D backend to skip resizing its storage while the frontend inflates its dimensions. A subsequent sub-image update then writes past a small staging buffer, causing a heap out-of-bounds write in the GPU process.

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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A WebGL validation logic flaw in ANGLE allows an invalid self-copy operation on cube map faces to proceed. If the source area is entirely out-of-bounds, an early return in the D3D backend skips resizing the underlying storage while the frontend inflates its internal dimensions. A subsequent sub-image update using the inflated dimensions causes a linear heap buffer overflow when writing to the un-resized backend staging buffer in the GPU process.

Affected files:

  • third_party/angle/src/libANGLE/renderer/d3d/TextureD3D.cpp
  • third_party/angle/src/libANGLE/renderer/d3d/d3d11/Image11.cpp
  • third_party/angle/src/libANGLE/Texture.cpp
  • third_party/angle/src/libANGLE/validationES.cpp
  • third_party/angle/src/libANGLE/Framebuffer.cpp

Estimated timestamp from git blame: 2026-01-04

Overview

There is a potential high-severity heap out-of-bounds (OOB) write vulnerability in ANGLE's D3D backend. The issue arises from a combination of a WebGL validation bypass regarding texture self-copying and a state desynchronization between the ANGLE frontend and the D3D backend during out-of-bounds copy operations.

Potential Steps to Reproduce

Note: These steps are derived from static code analysis and represent a potential execution path. A working proof-of-concept has not been run.

1. WebGL Validation Bypass An attacker creates a WebGL context, a 1x1 Cube Map texture, and a framebuffer. The attacker binds a cube map face other than POSITIVE_X (e.g., NEGATIVE_X, which corresponds to layer index 1) to the active framebuffer's color attachment. They then call gl.copyTexImage2D with the target TEXTURE_CUBE_MAP_NEGATIVE_X to initiate a self-copy.

In third_party/angle/src/libANGLE/validationES2.cpp line 5262, ValidateCopyTexImage2D calls ValidateES3CopyTexImage2DParameters with a hardcoded zoffset (layer index) of 0:

C++
return ValidateES3CopyTexImage2DParameters(context, entryPoint, target, level, internalformat,
                                           false, 0, 0, 0, x, y, width, height, border);

When checking for feedback loops, Framebuffer::formsCopyingFeedbackLoopWith (third_party/angle/src/libANGLE/Framebuffer.cpp:2407) compares the true read attachment layer (1) against this hardcoded copyTextureLayer (0). The check fails (1 != 0), bypassing WebGL's protection against reading and writing to the same texture.

2. Frontend/Backend Size Desynchronization The attacker intentionally provides a sourceArea that is completely outside the bounds of the 1x1 source framebuffer (e.g., 1000x1000 at a large offset).

In the frontend (third_party/angle/src/libANGLE/Texture.cpp:1532), Texture::copyImage calculates the new target size (1000x1000) and dispatches the call to the backend.

In the D3D backend (third_party/angle/src/libANGLE/renderer/d3d/TextureD3D.cpp:123), TextureD3D::handleCopyImageSelfCopyRedefine intercepts the self-copy. Because the source area is out-of-bounds, ClipRectangle fails:

C++
if (!ClipRectangle(sourceArea, gl::Rectangle(0, 0, fbSize.width, fbSize.height), &clippedArea))
{
    return angle::Result::Continue;
}

This early return skips the redefineDest callback on line 147, leaving the backend Image11 storage at its original 1x1 size. However, because the backend returned angle::Result::Continue (success), the frontend unconditionally updates its state to the new inflated size (mState.setImageDesc(...) at Texture.cpp:1600).

3. Heap Out-of-Bounds Write The attacker calls gl.texSubImage2D on the NEGATIVE_X face, providing a large 1000x1000 payload and an update area of 1000x1000.

The frontend validates this against its inflated state and passes the call to the backend. In third_party/angle/src/libANGLE/renderer/d3d/d3d11/Image11.cpp:274, Image11::loadData maps a staging texture. Because the backend size was never updated, a tiny 1x1 staging buffer is allocated and mapped.

Image11::loadData then invokes a pixel-copying function (e.g., LoadToNative3To4 in third_party/angle/src/image_util/loadimage.inc:80) passing the mapped tiny buffer as output but using the frontend's inflated area.width and area.height (1000x1000) as the loop limits:

C++
for (size_t y = 0; y < height; y++) // height is 1000
{
    // ...
    type *dest = priv::OffsetDataPointer<type>(output, y, z, outputRowPitch, outputDepthPitch);
    // ... memcpy into dest ...
}

This linear copy loops far past the end of the mapped 1x1 staging buffer, causing a heap out-of-bounds write of attacker-controlled data in the GPU process.

Suggested Fix

  1. Fix Validation Bypass: In ValidateCopyTexImage2D (validationES2.cpp), do not hardcode zoffset to 0 when calling ValidateES3CopyTexImage2DParameters. Instead, extract the correct layer index from the target parameter (e.g., using TextureTargetToLayer(target) for cube maps).
  2. Fix Desynchronization: In TextureD3D::handleCopyImageSelfCopyRedefine (TextureD3D.cpp), ensure that the backend texture is resized even if ClipRectangle fails. Alternatively, if the copy is aborted, return an error code or ensure the frontend does not unconditionally inflate its size on an aborted out-of-bounds copy.

Evaluated with Chrome root at commit: a1e33f5848218e21d4a16ae2c1bc94e815c30c7f


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 a hardcoded layer index in copy validation bypasses the feedback-loop check, and an early return in the D3D backend on an out-of-bounds copy leaves backend storage un-resized while the frontend still updates its size.

Impact

A heap out-of-bounds write of attacker-controlled data in the GPU process could lead to memory corruption, though the report notes a working proof-of-concept has not been run.

What the attacker needed

WebGL support in the browser; D3D backend (Windows); Victim visits a malicious page

The fix

The report suggests extracting the correct layer index from the target in copy validation and ensuring the backend resizes or returns an error when the copy is aborted, so the frontend does not inflate its size on an out-of-bounds copy.

How it was found

  1. Create a WebGL context, a 1x1 cube map texture, and a framebuffer.
  2. Bind a cube map face other than POSITIVE_X to the framebuffer colour attachment.
  3. Call copyTexImage2D targeting that same cube map face with a source area entirely outside the framebuffer bounds.
  4. Call texSubImage2D on the same face with a large payload and update area matching the inflated size.

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 draw 3D graphics, and ANGLE is the part of the browser that translates those commands for the graphics driver. A mistake in checking whether a texture is being copied onto itself let a page trick the browser into thinking a tiny buffer was much larger, so a later write spilled past the end of that buffer. This could crash the browser or, in principle, let an attacker run code in the graphics process.

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.