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

Heap buffer overflow in ANGLE (CVE-2026-10929)

A size mismatch in ANGLE's Vulkan backend causes a heap buffer overflow when updating a paletted texture from a framebuffer. An attacker with a compromised renderer could write attacker-controlled data out of bounds in the GPU process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 57 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 security team.

Overview: A format size mismatch in ANGLE's Vulkan backend leads to a potential heap buffer overflow in the GPU process during texture updates from a framebuffer. When falling back to a CPU readback for paletted textures, the scratch buffer is allocated assuming 4 bytes per pixel, but the pixel packing logic advances the pointer by 5 bytes per pixel, causing an out-of-bounds write.

Affected files:

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

Estimated timestamp from git blame: 2026-03-06

Vulnerability Details

In third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp, the function stageSubresourceUpdateFromFramebuffer handles updating a texture's subresource from a framebuffer. If hardware copy paths fail, it falls back to a CPU readback. If format conversion is required (loadFunction.requiresConversion), it allocates a scratch MemoryBuffer.

The size of this scratch buffer is calculated using storageFormat.pixelBytes:

C++
const size_t bufferSize = static_cast<size_t>(clippedRectangle.width) * 
                          static_cast<size_t>(clippedRectangle.height) * 
                          storageFormat.pixelBytes;

For a texture with internal format GL_PALETTE8_RGBA8_OES, the actual Vulkan storage format resolves to R8G8B8A8_UNORM, which has a pixelBytes value of 4. Therefore, the buffer is allocated with 4 * width * height bytes.

However, the subsequent call to readPixelsImpl uses a PackPixelsParams object initialized with copyFormat:

C++
const angle::Format &copyFormat =
    GetFormatFromFormatType(formatInfo.internalFormat, formatInfo.type);
PackPixelsParams params(clippedRectangle, copyFormat, static_cast<GLuint>(outputRowPitch),
                        isViewportFlipEnabled, nullptr, 0);

For GL_PALETTE8_RGBA8_OES, copyFormat resolves to PALETTE8_R8G8B8A8_UNORM, which has a pixelBytes value of 5 (Format_table_autogen.cpp:153).

When framebufferVk->readPixelsImpl subsequently invokes PackPixels (renderer_utils.cpp), the pointer for each pixel (x, y) is calculated as: dest = destWithOffset + y * params.outputPitch + x * params.destFormat->pixelBytes

Because destFormat->pixelBytes is 5 instead of 4, the horizontal offset grows by 5 bytes per pixel instead of 4. On the final row, the pointer advances width - 2 bytes past the end of the 4 * width * height allocated buffer. PackPixels then writes 4 bytes of attacker-controlled framebuffer data at this out-of-bounds location, resulting in a heap buffer overflow in the GPU process.

Potential Exploitation Steps

(Note: These are suggested steps based on code analysis; a working proof-of-concept has not yet been executed.)

This vulnerability is reachable from a compromised renderer process sending commands to the GPU process.

  1. Create a Paletted Texture: The attacker issues a command to create a texture with the GL_PALETTE8_RGBA8_OES format.
  2. Create an AHB without the SAMPLED bit: The attacker allocates an Android AHardwareBuffer (AHB) with AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT but explicitly omits AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE. This AHB is imported into the GPU process via a SharedImage IPC. The resulting Vulkan image lacks the VK_IMAGE_USAGE_SAMPLED_BIT.
  3. Bind to FBO: The attacker binds this AHB-backed SharedImage as the color attachment of a Framebuffer Object.
  4. Issue Copy Command: The attacker issues glCopyTexSubImage2D, copying from the AHB FBO to the paletted texture. In release builds, Chrome sets EGL_CONTEXT_OPENGL_NO_ERROR_KHR, skipping ANGLE validation and allowing the command to reach the Vulkan backend.
  5. Trigger Fallback: In TextureVk::copySubImage, hardware transfer and draw copies both fail (because paletted formats are emulated, causing a format mismatch, and the AHB lacks the SAMPLED bit required for a draw copy). ANGLE falls back to stageSubresourceUpdateFromFramebuffer, triggering the undersized buffer allocation and the out-of-bounds write.

Suggested Fix

Ensure that the scratch buffer allocation size in stageSubresourceUpdateFromFramebuffer is calculated using copyFormat.pixelBytes rather than storageFormat.pixelBytes, so that the allocation matches the pointer arithmetic performed inside PackPixels.

C++
const size_t bufferSize = static_cast<size_t>(clippedRectangle.width) *
                          static_cast<size_t>(clippedRectangle.height) *
                          copyFormat.pixelBytes;

Alternatively, PackPixels could be adjusted to rely entirely on storageFormat for this operation.

Evaluated with Chrome root at commit: 137d451a126685dd5010e6609db9f6d4a78d8234


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

The scratch buffer size is calculated using the storage format's pixel size (4 bytes) while the packing routine uses the copy format's pixel size (5 bytes), so the allocation is too small for the pointer arithmetic.

Impact

A compromised renderer could cause an out-of-bounds write of attacker-controlled framebuffer data in the GPU process, potentially leading to memory corruption; no working proof-of-concept has been executed.

What the attacker needed

Compromised renderer process; Android hardware buffer support; release build with error checking disabled

The fix

The scratch buffer allocation should use the copy format's pixel size instead of the storage format's pixel size.

How it was found

  1. Create a texture with the paletted format.
  2. Allocate an Android hardware buffer without the sampled-image usage flag and import it as a shared image.
  3. Bind the shared image as a framebuffer colour attachment.
  4. Issue a copy command from the framebuffer to the paletted texture.
  5. Trigger the CPU readback fallback, which allocates the undersized buffer and writes out of 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 texture is a block of image data in memory. When copying pixels into a texture, the program first reserves a temporary buffer sized for 4 bytes per pixel, but then writes using 5 bytes per pixel. This makes the last write land past the end of the buffer, corrupting nearby memory 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.