Type Confusion in ANGLE (CVE-2026-10955)
ANGLE's D3D11 backend reuses a cached staging texture without checking its resource type, so a 3D staging texture can be used for a 2D array texture. This leads to an out-of-bounds Z-coordinate in a driver call, potentially causing GPU memory corruption or information leaks.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 39 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: ANGLE's D3D11 backend caches a staging texture for pixel packing operations but fails to validate the ResourceType when reusing it. A cached 3D staging texture can be incorrectly reused for a 2D Array texture, leading to an invalid CopySubresourceRegion call with out-of-bounds Z-coordinates, potentially resulting in GPU memory corruption or information leaks.
Affected files:
third_party/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.cppthird_party/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
Estimated timestamp from git blame: 2026-01-14
Summary
A potential type confusion vulnerability exists in the ANGLE renderer's D3D11 backend, specifically within the Buffer11::PackStorage::packPixels function. The vulnerability arises from an insufficient validation check when reusing a cached staging texture. This failure allows a 3D staging texture to be reused for 2D or 2D-array source textures, leading to a mismatch between resource types and the use of out-of-bounds (OOB) box parameters in D3D11 driver calls. This can result in driver-dependent memory corruption or out-of-bounds reads within the GPU process.
Root Cause Analysis
In third_party/angle/src/libANGLE/renderer/d3d/d3d11/Buffer11.cpp, the PackStorage::packPixels function caches a staging texture (mStagingTexture) used for reading pixels into a Pixel Buffer Object (PBO). When a readPixels operation occurs, the code checks if the cached staging texture can be reused:
gl::Extents srcTextureSize(params.area.width, params.area.height, 1);
if (!mStagingTexture.get() || mStagingTexture.getFormat() != srcTexture->getFormat() ||
mStagingTexture.getExtents() != srcTextureSize)
{
ANGLE_TRY(mRenderer->createStagingTexture(context, srcTexture->getTextureType(),
srcTexture->getFormatSet(), srcTextureSize,
StagingAccess::READ, &mStagingTexture));
}
This cache check verifies the format and the dimensions (width, height, and depth). However, it fails to verify that the ResourceType (e.g., Texture2D vs Texture3D) matches.
Crucially, Renderer11::createStagingTexture for 3D textures (in Renderer11.cpp) hard-codes the depth of the staging texture to 1. Consequently, a 3D staging texture will have extents {W, H, 1}, which identically matches the extents of a 2D texture (or 2D-array layer) of the same width and height, causing a cache hit.
If a 3D staging texture is cached and then a 2D-array texture is used for a subsequent pack operation, the code proceeds to calculate the source box:
srcBox.front = 0;
if (mStagingTexture.is3D())
{
srcBox.front = static_cast<UINT>(readAttachment.layer());
}
srcBox.back = srcBox.front + 1;
Because mStagingTexture is a stale 3D texture, is3D() returns true even if the current source is a 2D-array. If the operation involves a 2D-array attachment at layer $N \ge 1$, srcBox.front is set to $N$.
The subsequent call to CopySubresourceRegion uses this srcBox against a source subresource that only has a depth of 1 (valid Z-coordinates $[0, 1)$), resulting in a depth-OOB access and a resource dimension mismatch (3D destination vs 2D source). For a 2D array texture, the layer is encoded in the D3D11 subresource index, so the Z coordinate for the box should be 0.
Potential Impact
This vulnerability is reachable from any WebGL2 context on Windows (where D3D11 is the default ANGLE backend). By triggering these invalid driver calls with attacker-controlled parameters (layer index, width, height, and format), an attacker can cause driver-dependent undefined behavior in the GPU process. Practical impacts include out-of-bounds reads of GPU memory (potentially leaking cross-origin graphics data) or memory corruption. The GPU process is sandboxed on Windows, but it is shared across different origins.
Suggested Steps to Reproduce
Note: Our tooling agent doesn't yet have the ability to run code, so these steps are suggested based on static analysis.
- Use a WebGL2 context on Windows (D3D11 backend).
- Bind a PBO:
gl.bindBuffer(gl.PIXEL_PACK_BUFFER, pbo);. - Create a 3D texture and a 2D array texture with the same width ($W$), height ($H$), and format.
- Attach layer 0 of the 3D texture to an FBO.
- Perform a
readPixelsoperation from the 3D texture layer to prime the cache with a 3D staging texture of size $W \times H \times 1$. - Attach layer $N \ge 1$ of the 2D-array texture to the FBO.
- Perform a
readPixelsoperation from the 2D-array texture layer with the same width ($W$), height ($H$), and format. - Observe that the second call reuses the 3D staging texture and incorrectly sets
srcBox.front = Nin theCopySubresourceRegioncall, triggering the vulnerability.
Suggested Fix
Update the cache validation check in Buffer11::PackStorage::packPixels to also verify that the resource types match:
if (!mStagingTexture.get() || mStagingTexture.getFormat() != srcTexture->getFormat() ||
mStagingTexture.getExtents() != srcTextureSize ||
mStagingTexture.getTextureType() != srcTexture->getTextureType())
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.
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 cache check in `PackStorage::packPixels` compares format and extents but not the texture resource type, so a 3D staging texture (with depth hard-coded to 1) matches a 2D array texture of the same width and height.
Impact
An attacker could trigger driver-dependent undefined behaviour in the GPU process, potentially causing out-of-bounds reads of GPU memory (leaking cross-origin graphics data) or memory corruption; the GPU process is sandboxed on Windows but shared across origins.
What the attacker needed
Windows with D3D11 ANGLE backend; WebGL2 context; Ability to run JavaScript in a browser
The fix
The cache validation check should also verify that the resource types match.
How it was found
- Use a WebGL2 context on Windows with the D3D11 backend.
- Bind a pixel pack buffer.
- Create a 3D texture and a 2D array texture with the same width, height, and format.
- Attach layer 0 of the 3D texture to a framebuffer and perform a readPixels to prime the cache with a 3D staging texture.
- Attach layer N (N >= 1) of the 2D array texture to the framebuffer and perform a readPixels with the same dimensions and format.
- Observe that the second call reuses the 3D staging texture and sets an out-of-bounds Z-coordinate in the driver call.
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.
When a web page uses WebGL to read pixels, the browser's graphics layer (ANGLE) keeps a temporary texture to speed things up. The bug is that it forgets to check whether that temporary texture is the right kind (3D vs 2D array), so it can use the wrong one and ask the graphics driver to read outside the texture's bounds. This could let a malicious page read or corrupt graphics memory.
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.