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

Out of bounds read in ANGLE (CVE-2026-11004)

ANGLE's ValidImageDataSize function fails to treat CubeMapArray as a 3D texture, so it underestimates the required buffer size for texture uploads. A compromised renderer can exploit this to cause a heap-buffer-overflow read in the GPU process by sending a crafted TexSubImage3D command with a CubeMapArray target and an undersized pixel unpack buffer.

86ac1f1587b71893ed2ad792cd7dde32 Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months

Summary

ANGLE's ValidImageDataSize function fails to account for CubeMapArray when computing endByte, treating it as a 2D upload instead of a 3D one. This causes the PBO bounds check and the robust-variant bufSize check to use an underestimated byte count, allowing undersized source buffers to pass validation. The backend then reads the full 3D extent from the undersized buffer, producing a heap-buffer-overflow. The bug is reachable from a compromised renderer on platforms where the ANGLE Vulkan or OpenGL backend exposes the GL_EXT_texture_cube_map_array extension (Linux, Android, Windows with Vulkan). It affects the GPU process.

Bisect

Introducing Commit: 7fde3673a473621063f88faa35294dde43dd07c0

This commit added CubeMapArray to ImageIndex::usesTex3D() and to various frontend dispatch paths, but did not update the targetIs3D variable in ValidImageDataSize. The original targetIs3D check was introduced earlier in commit ff5b2d5128 when the GL_ANGLE_robust_client_memory extension was added.

Root Cause

ValidImageDataSize in validationES.cpp determines whether a texture target requires 3D data layout calculations through a local boolean:

C++
// third_party/angle/src/libANGLE/validationES.cpp
bool targetIs3D = texType == TextureType::_3D || texType == TextureType::_2DArray;

This variable is missing TextureType::CubeMapArray (and TextureType::_2DMultisampleArray). It is passed to computePackUnpackEndByte, which uses it to decide whether to include the depth pitch in the total byte count:

C++
// third_party/angle/src/libANGLE/formatutils.cpp
if (is3D)
{
    CheckedNumeric<GLuint> depthMinusOne = size.depth - 1;
    checkedCopyBytes += depthMinusOne * depthPitch;
}

When is3D is false, the entire depth contribution is omitted. For a 4x4 RGBA8 CubeMapArray texture with depth=6, the correct endByte is 64 + 5×64 = 384, but the function computes only 64.

The implementation side does not share this oversight. ImageIndex::usesTex3D() correctly includes CubeMapArray:

C++
// third_party/angle/src/libANGLE/ImageIndex.cpp
bool ImageIndex::usesTex3D() const
{
    return mType == TextureType::_3D || mType == TextureType::_2DArray ||
           mType == TextureType::_2DMultisampleArray || mType == TextureType::CubeMapArray;
}

The Vulkan backend calls calculateBufferInfo with index.usesTex3D(), which returns true for CubeMapArray, and proceeds to read the full depth extent from the source buffer.

The underestimated endByte is used in two places that constitute real security checks. For PBO uploads, ValidImageDataSize verifies that the pixel unpack buffer is large enough:

C++
// third_party/angle/src/libANGLE/validationES.cpp
if (pixelUnpackBuffer)
{
    CheckedNumeric<size_t> checkedEndByte(endByte);
    CheckedNumeric<size_t> checkedOffset(reinterpret_cast<size_t>(pixels));
    checkedEndByte += checkedOffset;
    if (checkedEndByte.ValueOrDie() > static_cast<size_t>(pixelUnpackBuffer->getSize()))
    {
        return false;
    }
}

For the GL_ANGLE_robust_client_memory path (used by the Chromium command buffer via glTexSubImage3DRobustANGLE), it checks that the caller-supplied bufSize covers the pixel data:

C++
if (pixels != nullptr && endByte > static_cast<GLuint>(imageSize))
{
    return false;
}

Both checks pass with the underestimated endByte, but the backend reads the correct, larger amount.

In Chromium's GPU process architecture, the passthrough command buffer decoder forwards texture targets to ANGLE without independent validation. A compromised renderer can therefore send GL_TEXTURE_CUBE_MAP_ARRAY (0x9009) as the target for TexSubImage3D, and if the ANGLE backend supports the extension, the command reaches the vulnerable validation path in the GPU process. The CubeMapArray extension is not requested by default for WebGL contexts, but a compromised renderer can enable it by calling RequestExtensionCHROMIUM("GL_EXT_texture_cube_map_array") through the command buffer; this maps to glRequestExtensionANGLE, which is processed in the GPU process and enables the extension if the Vulkan device supports imageCubeArray.

Reproduce

This issue was tested on Chromium commit e6831951cd5fd2d7db105507e6f5e06ba600e073, Ubuntu 22.04. The ANGLE Vulkan backend is required because GL_EXT_texture_cube_map_array must be available and the vulnerable CPU copy path is Vulkan-specific. Use --use-angle=vulkan on all platforms.

Check out the commit and apply the patch, which modifies WebGL2RenderingContextBase::texSubImage3D in the renderer process to inject CubeMapArray commands when it detects a sentinel PBO offset value. This simulates a compromised renderer that sends crafted GL commands through the passthrough command buffer decoder. No GPU process code is modified.

Configure an ASAN build with out/asan/args.gn as follows, then build:

is_asan = true
is_debug = false
dcheck_always_on = false
git apply patch.diff
autoninja -C out/asan chrome

Launch Chrome and open the PoC page:

out/asan/chrome --use-angle=vulkan --enable-logging=stderr --user-data-dir=./userdata poc.html

The PoC page creates a WebGL2 context and calls texSubImage3D with PBO offset 0x900900, which the patched renderer intercepts. The renderer requests the GL_EXT_texture_cube_map_array extension via RequestExtensionCHROMIUM, creates a 1024×1024 CubeMapArray texture with 6 layers (RGBA8), and creates a ~4MB PBO (exactly layerSize+3 bytes). It then calls TexSubImage3D with the CubeMapArray target, depth=6, and PBO offset=3. The non-aligned offset forces ANGLE's Vulkan backend into the CPU copy path. ANGLE's ValidImageDataSize computes endByte for a single layer (~4MB) instead of all 6 layers (~24MB) because it treats CubeMapArray as a 2D target, so the PBO size check passes. The backend then reads ~24MB from the ~4MB PBO allocation, producing a ~20MB heap-buffer-overflow.

ASAN output (Linux):

=================================================================
==345063==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x778695bbb000 at pc 0x5ce65edb700b bp 0x7ffcce9e7d10 sp 0x7ffcce9e74d0
READ of size 25165824 at 0x778695bbb000 thread T0 (chrome)
    #0 0x5ce65edb700a in __asan_memcpy (/home/test/Desktop/chromium/src/out/asan/chrome+0x10d2400a) (BuildId: e191f33f940a09e4)
    #1 0x77875f943833 in void angle::LoadToNative<unsigned char, 4ul>(angle::ImageLoadContext const&, unsigned long, unsigned long, unsigned long, unsigned char const*, unsigned long, unsigned long, unsigned char*, unsigned long, unsigned long) third_party/angle/src/image_util/loadimage.inc
    #2 0x77875f43484e in rx::vk::ImageHelper::stageSubresourceUpdateImpl(rx::ContextVk*, gl::ImageIndex const&, angle::Extents<int> const&, angle::Offset<int> const&, gl::InternalFormat const&, gl::PixelUnpackState const&, unsigned int, unsigned char const*, rx::vk::Format const&, rx::vk::ImageFormatSupport, unsigned int, unsigned int, unsigned int, rx::vk::ApplyImageUpdate, bool*) third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp:8538:5
    #3 0x77875f2a8c34 in rx::TextureVk::setSubImageImpl(gl::Context const*, gl::ImageIndex const&, gl::Box const&, gl::InternalFormat const&, unsigned int, gl::PixelUnpackState const&, gl::Buffer*, unsigned char const*, rx::vk::Format const&) third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp:1310:31
    #4 0x77875f2a7b2f in rx::TextureVk::setSubImage(gl::Context const*, gl::ImageIndex const&, gl::Box const&, unsigned int, unsigned int, gl::PixelUnpackState const&, gl::Buffer*, unsigned char const*) third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp:616:12
    #5 0x77875f84b246 in gl::Texture::setSubImage(gl::Context*, gl::PixelUnpackState const&, gl::Buffer*, gl::TextureTarget, int, gl::Box const&, unsigned int, unsigned int, unsigned char const*) third_party/angle/src/libANGLE/Texture.cpp:1441:25
......

References

Credit

Please use 86ac1f1587b71893ed2ad792cd7dde32 as the credit for this vulnerability. Thank you.

The original report as published on the Chromium issue tracker, by 86ac1f1587b71893ed2ad792cd7dde32. 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 targetIs3D boolean in ValidImageDataSize omits TextureType::CubeMapArray, so the depth contribution to the required byte count is not included, while the backend correctly uses usesTex3D() and reads the full depth.

Impact

A compromised renderer could cause a heap-buffer-overflow read in the GPU process, potentially leading to information disclosure or a crash, but only on platforms where the ANGLE Vulkan or OpenGL backend exposes the GL_EXT_texture_cube_map_array extension.

What the attacker needed

Compromised renderer; ANGLE Vulkan or OpenGL backend with CubeMapArray extension; Linux, Android, or Windows with Vulkan

How it was found

  1. Build Chromium with ASAN and apply a patch that makes the renderer inject CubeMapArray commands when it sees a sentinel PBO offset.
  2. Launch Chrome with the Vulkan ANGLE backend and open the PoC page.
  3. The PoC page requests the GL_EXT_texture_cube_map_array extension via RequestExtensionCHROMIUM.
  4. It creates a 1024×1024 CubeMapArray texture with 6 layers and a PBO of size layerSize+3 bytes.
  5. It calls TexSubImage3D with the CubeMapArray target, depth=6, and a non-aligned PBO offset of 3 to force the CPU copy path.
  6. ANGLE's validation underestimates the required size, so the check passes, and the backend reads ~24MB from the ~4MB PBO, causing a heap-buffer-overflow.

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 library used by Chrome (ANGLE) has a bug in how it checks the size of data buffers when uploading textures. It mistakenly treats a special 3D texture type as if it were 2D, so it thinks the buffer is big enough when it is not. An attacker who already controls the web page's rendering process could trick the GPU process into reading past the end of the buffer, which could crash or leak 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.

More by 86ac1f1587b71893ed2ad792cd7dde32

View all

12 more disclosed reports, best first.

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.