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

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

ANGLE's Vulkan backend fails to adjust subresource parameters when resolving a multisampled framebuffer into a 3D texture layer, setting the layer index as the base array layer instead of the depth offset. This violates Vulkan specifications and could potentially lead to a heap out-of-bounds write in the GPU process on vulnerable drivers.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 48 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A potential vulnerability in ANGLE's Vulkan backend fails to adjust subresource parameters when resolving a multisampled framebuffer into a 3D texture layer. This causes the layer index to be incorrectly assigned to the destination's base array layer instead of the depth offset, violating Vulkan specifications. Depending on the underlying Vulkan driver's handling of this out-of-bounds array layer, this could potentially lead to a heap out-of-bounds write in the GPU process.

Affected files:

  • third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp

Estimated timestamp from git blame: 2019-08-08

Potential Out-Of-Bounds Write in ANGLE Vulkan via MSAA Resolve to 3D Texture

Summary

An issue in ANGLE's Vulkan backend has been identified where resolving a multisampled framebuffer into a 3D texture layer (via WebGL2 blitFramebuffer) can result in a Vulkan specification violation. Specifically, the resolve command's destination subresource parameters are not mapped correctly for 3D textures, leading to baseArrayLayer being set to the layer index while dstOffset.z is hardcoded to 0 (violating VUID-VkImageResolve-dstImage-04447 and VUID-vkCmdResolveImage-dstSubresource-01712). On vulnerable Vulkan drivers, this incorrect layer index indexing past the bounds of the 3D texture could result in a heap out-of-bounds write inside the GPU process.

Affected Code

  • File: third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
  • Function: FramebufferVk::resolveColorWithCommand

Root Cause Analysis

When a 3D texture is used as a render target, ANGLE generates a single-layer RenderTargetVk representing the specific selected depth slice. Its getLayerIndex() returns the depth slice index N (where 0 <= N < depth).

During an outside-render-pass resolve operation, FramebufferVk::resolveColorWithCommand configures the VkImageResolve parameters as follows:

C++
// third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
resolveRegion.dstSubresource.layerCount     = 1;
resolveRegion.dstOffset.x                   = params.blitArea.x;
resolveRegion.dstOffset.y                   = params.blitArea.y;
resolveRegion.dstOffset.z                   = 0;  // Always 0; never adjusted for 3D texture slices
...
for (size_t colorIndexGL : mState.getEnabledDrawBuffers()) {
    RenderTargetVk *drawRenderTarget = mRenderTargetCache.getColors()[colorIndexGL];
    vk::ImageHelper &dstImage        = drawRenderTarget->getImageForWrite();
    vk::LevelIndex levelVk = dstImage.toVkLevel(drawRenderTarget->getLevelIndex());
    resolveRegion.dstSubresource.mipLevel       = levelVk.get();
    resolveRegion.dstSubresource.baseArrayLayer = drawRenderTarget->getLayerIndex(); // <-- Potential Bug: No 3D guard
    srcImage->resolve(renderer, &dstImage, resolveRegion, commandBuffer);           // vkCmdResolveImage
}

For standard 2D array textures, setting baseArrayLayer to the target layer index is correct. However, for a 3D texture, the underlying VkImage is created with arrayLayers = 1 and type VK_IMAGE_TYPE_3D.

According to the Vulkan specification (VUID-VkImageResolve-dstImage-04447):

"If dstImage is of type VK_IMAGE_TYPE_3D, baseArrayLayer and layerCount of dstSubresource must be 0 and 1"

Additionally, the specification requires that baseArrayLayer + layerCount <= arrayLayers (VUID-vkCmdResolveImage-dstSubresource-01712). Because arrayLayers = 1, setting baseArrayLayer = N (where N >= 1) directly violates this rule.

While ANGLE's sibling method blitWithCommand correctly handles 3D destinations by invoking AdjustLayersAndDepthFor3DImages (remapping baseArrayLayer into the depth offsets), resolveColorWithCommand lacks any equivalent guard.

Depending on the Vulkan driver implementation, resolving with an out-of-bounds baseArrayLayer on a VK_IMAGE_TYPE_3D destination can result in memory corruption or an out-of-bounds heap write in the GPU process.

Potential Steps to Trigger (Hypothetical)

Note: Our tooling does not yet have the ability to execute code locally; the following are suggested steps to trigger the issue:

  1. In a WebGL2 context, allocate a multisampled renderbuffer with gl.renderbufferStorageMultisample(gl.RENDERBUFFER, 4, gl.RGBA8, width, height) and attach it to a source FBO.
  2. Draw or clear into the source FBO, and call gl.finish() to complete and flush the active render pass on the source framebuffer.
  3. Create a 3D texture with depth D > 1 using gl.texStorage3D(gl.TEXTURE_3D, 1, gl.RGBA8, width, height, D).
  4. Create a destination FBO, and attach a specific slice N (where 1 <= N < D) using gl.framebufferTextureLayer(gl.DRAW_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, tex3D, 0, N).
  5. Call gl.blitFramebuffer(0, 0, width, height, 0, 0, width, height, gl.COLOR_BUFFER_BIT, gl.NEAREST).
  6. This forces ANGLE to resolve outside of a render pass via resolveColorWithCommand, recording vkCmdResolveImage with dstSubresource.baseArrayLayer = N and violating the Vulkan specification.

Suggested Fix

To correct this, check if the destination image is of type VK_IMAGE_TYPE_3D inside resolveColorWithCommand, and if so, adjust the subresource parameters appropriately (setting baseArrayLayer to 0 and routing the slice index into dstOffset.z).

For example:

C++
const bool isDst3D = dstImage.getType() == VK_IMAGE_TYPE_3D;
if (isDst3D)
{
    resolveRegion.dstOffset.z = drawRenderTarget->getLayerIndex();
    resolveRegion.dstSubresource.baseArrayLayer = 0;
}
else
{
    resolveRegion.dstOffset.z = 0;
    resolveRegion.dstSubresource.baseArrayLayer = drawRenderTarget->getLayerIndex();
}

Evaluated with Chrome root at commit: 84065d9121f6e48f67755f0ae963cc09617e5c85


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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 resolve function does not check if the destination is a 3D texture and incorrectly sets baseArrayLayer to the layer index instead of adjusting the depth offset.

Impact

Depending on the Vulkan driver, this could potentially lead to a heap out-of-bounds write in the GPU process.

What the attacker needed

WebGL2 support; vulnerable Vulkan driver

The fix

The fix should check if the destination image is a 3D texture and, if so, set baseArrayLayer to 0 and route the slice index into dstOffset.z.

How it was found

  1. Create a multisampled renderbuffer and attach it to a source framebuffer.
  2. Draw or clear into the source framebuffer and call gl.finish().
  3. Create a 3D texture with depth greater than 1.
  4. Create a destination framebuffer and attach a specific slice of the 3D texture.
  5. Call gl.blitFramebuffer to trigger the resolve operation.

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 program uses a 3D texture as a drawing target, it can ask the graphics system to copy a multisampled image into a specific slice of that texture. The code that performs this copy mistakenly tells the graphics driver to write to a layer number that doesn't exist, which can cause memory corruption 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.