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

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

ANGLE's Vulkan backend always picked a renderable fallback image format when importing external memory, even when colour attachment usage was not requested. A compromised renderer could then get a wider format image bound to a smaller allocation and issue GL writes, causing an out-of-bounds write on the GPU heap.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 59 days

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: ANGLE's Vulkan backend unconditionally selects a renderable fallback format when importing external memory, even if color attachment usage is not requested. This can cause a larger format Vulkan image (e.g., 4bpp) to be bound to a smaller memory allocation (e.g., 2bpp). A compromised renderer can exploit this size mismatch by issuing GL writes, resulting in a potential out-of-bounds write on the GPU heap.

Affected files:

  • third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/MemoryObjectVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/vk_format_utils.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/vk_format_table_autogen.cpp

Estimated timestamp from git blame: 2024-01-18

Description

A logic error in ANGLE's Vulkan backend leads to a potential Out-of-Bounds (OOB) write in the GPU process. When importing external memory to create a texture, ANGLE unconditionally selects a "renderable" fallback format, regardless of whether the requested usage includes COLOR_ATTACHMENT support.

The vulnerability exists in TextureVk::setStorageExternalMemory and MemoryObjectVk::createImage. In both functions, ANGLE calls vkFormat.getActualRenderableImageFormatID() to determine the internal format. If the Vulkan driver does not support a specific format (e.g., R4G4B4A4_UNORM, 2 bytes per pixel) as a color attachment, ANGLE falls back to a wider format (e.g., R8G8B8A8_UNORM, 4 bytes per pixel).

If the external memory was allocated by Chromium using the native 2bpp format (because it only required SAMPLED usage), ANGLE will subsequently create a 4bpp VkImage and bind it to that same 2bpp physical memory. An ASSERT(externalMemoryRequirements.size == mSize) exists in MemoryObjectVk::createImage to catch this, but it compiles out in release builds. The Passthrough Command Buffer does not prevent GL write commands on read-only SharedImages, allowing an attacker to trigger an OOB write.

Potential Attack Path

Note: These are suggested steps; our tooling agent does not currently have the ability to run code to verify a live PoC.

  1. A compromised renderer process sends a CreateSharedImage IPC requesting the kRGBA_4444 format with strictly read-oriented usages (e.g., SHARED_IMAGE_USAGE_GLES2_READ), omitting write usages that force color attachment requirements.
  2. Chromium's ExternalVkImageBackingFactory allocates a 2bpp VkDeviceMemory backing because the driver supports sampling from R4G4B4A4_UNORM.
  3. The renderer triggers GL access via BeginSharedImageAccessDirectCHROMIUM (in read-only mode).
  4. ANGLE imports the memory via TextureVk::setStorageExternalMemory. It unconditionally calls getActualRenderableImageFormatID().
  5. Lacking color attachment support for RGBA_4444, ANGLE falls back to the 4bpp RGBA8 format and creates a 4bpp VkImage.
  6. In release builds, the ASSERT checking allocation sizes in MemoryObjectVk::createImage is bypassed, and the 4bpp VkImage is bound to the 2bpp VkDeviceMemory.
  7. The renderer issues a GL write command like glTexSubImage2D. The passthrough decoder does not block this despite the SharedImage read-only access mode.
  8. The Vulkan driver executes the memory copy assuming a 4bpp destination, writing past the end of the 2bpp allocation, corrupting the Vulkan GPU heap and potentially leading to a sandbox escape.

Suggested Fix

  1. Respect Usage Flags: Update TextureVk::setStorageExternalMemory and MemoryObjectVk::createImage to evaluate the requested usageFlags. If VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT is not requested, use vkFormat.getActualImageFormatID(vk::ImageFormatSupport::SampleOnly) instead of unconditionally requiring a renderable format.
  2. Enforce Size Checks: Convert the ASSERT(externalMemoryRequirements.size == mSize) in MemoryObjectVk::createImage to a hard macro (e.g., ANGLE_VK_CHECK or returning angle::Result::Stop) so that size mismatches safely fail in release builds.

Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0


Results from 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 the code unconditionally requested a renderable image format instead of checking the requested usage flags, so a wider format was chosen than the memory was allocated for, and the size check was only an ASSERT that disappears in release builds.

Impact

The out-of-bounds write could corrupt the Vulkan GPU heap and potentially lead to a sandbox escape, but only from an already compromised renderer process.

What the attacker needed

Compromised renderer process; Vulkan driver lacking colour attachment for the small format

The fix

The code should respect the requested usage flags and use a sample-only format when colour attachment is not requested, and the size ASSERT should become a hard check that fails safely in release builds.

How it was found

  1. A compromised renderer asks for a shared image in a small 2bpp format with read-only usages.
  2. Chromium allocates 2bpp device memory because the driver can sample that format.
  3. The renderer begins read-only GL access to the shared image.
  4. ANGLE imports the memory and falls back to a 4bpp renderable format, creating a 4bpp image.
  5. The size ASSERT is compiled out in release builds, so the 4bpp image is bound to the 2bpp memory.
  6. The renderer issues a GL write command, and the driver writes past the end of the allocation.

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 in a graphics library can be stored in different pixel sizes, for example two bytes per pixel or four. Here the library asked the graphics driver for a four-byte-per-pixel image but attached it to memory that was only allocated for two bytes per pixel. Writing pixels through that image then spills past the end of the memory, which is a memory corruption bug.

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.