Integer overflow in ANGLE (CVE-2026-11088)
ANGLE's Vulkan backend fails to validate that requested mip levels for texture copy operations are at or above the texture's effective base level, causing an integer underflow that produces an extremely large mip level index. This can lead to out-of-bounds GPU memory reads (information disclosure) or writes (potential RCE and sandbox escape 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 potential vulnerability in ANGLE's Vulkan backend allows for an integer underflow when copying textures via glCopySubTextureCHROMIUM. If a requested source or destination mip level is less than the texture's effective base level, an underflow occurs, leading to an extremely large mip level index passed to Vulkan. This can result in out-of-bounds GPU memory reads (information disclosure) or writes (RCE/sandbox escape in the GPU process).
Affected files:
third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_utils.cppthird_party/angle/src/libANGLE/validationES2.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp
Estimated timestamp from git blame: 2023-07-13
Vulnerability Details
A potential integer underflow vulnerability exists in ANGLE's Vulkan backend implementation of the GL_CHROMIUM_copy_texture and GL_CHROMIUM_copy_sub_texture extensions. The issue stems from insufficient validation of the sourceLevel and destLevel parameters relative to the texture's current state, combined with an unsafe level conversion in the Vulkan backend.
-
Validation Bypass: In
third_party/angle/src/libANGLE/validationES2.cpp, the functionsValidateCopySubTextureCHROMIUMandValidateCopyTextureCHROMIUMuseIsValidCopyTextureSourceLevelandIsValidCopyTextureDestinationLevelto validate the mip levels. These checks only ensure the level is within a generic valid range (e.g.,>= 0and<= log2(MAX_TEXTURE_SIZE)); they do not verify that the requested level is at or above the texture'sGL_TEXTURE_BASE_LEVEL(effective base level). -
Vulkan Backend Allocation: For non-immutable textures, the Vulkan backend (
TextureVk::initImageinTextureVk.cpp) allocates the underlyingVkImagestarting frommState.getEffectiveBaseLevel(). This starting level is recorded asmFirstAllocatedLevelwithin thevk::ImageHelperobject. -
Integer Underflow: During the copy operation,
TextureVk::copySubImageImplWithTransfer(and similar functions) translates the GL mip level to a Vulkan-relative mip level usingsrcImage->toVkLevel(sourceLevelGL). This callsgl_vk::GetLevelIndexinvk_utils.cpp:C++ vk::LevelIndex GetLevelIndex(gl::LevelIndex levelGL, gl::LevelIndex baseLevel) { ASSERT(baseLevel <= levelGL); return vk::LevelIndex(levelGL.get() - baseLevel.get()); }When
sourceLevelGLis less thanbaseLevel(e.g., source level 0 with a base level of 2), the subtraction underflows. Sincevk::LevelIndexwraps auint32_t, the result becomes a very large value (e.g.,-2becomes0xFFFFFFFE). In release builds, theASSERTis removed, and this invalid index is returned. -
Out-of-Bounds Access: The massive underflowed
mipLevelis assigned toVkImageSubresourceLayers::mipLeveland passed directly into Vulkan commands such asvkCmdCopyImage. Because the value exceeds the actual number of mip levels in theVkImage, it causes the GPU driver to compute an out-of-bounds offset into GPU memory.
Security Impact
- Out-of-Bounds Read: By requesting a copy from an underflowed
sourceLevel, an attacker can instruct the GPU to read uninitialized or adjacent GPU memory into a destination texture. Reading this destination texture back to the compromised renderer process allows exfiltration of sensitive cross-origin or cross-process data from GPU memory. - Out-of-Bounds Write (RCE): The vulnerability is symmetrical. If the destination texture has a
baseLevel> 0 and the attacker requests copying intodestLevel0, an underflow occurs on the destination side. Writing to an OOB GPU memory offset viavkCmdCopyImagecan corrupt adjacent GPU buffers, driver structures, or shader code, potentially leading to arbitrary Remote Code Execution (RCE) and a sandbox escape in the highly privileged GPU process.
Suggested Reproduction Steps
Note: These are potential steps as our tooling agent does not have the ability to run code to verify.
OOB Read (Information Disclosure):
- From a compromised renderer, create a source texture (
src) and allocate multiple mip levels (e.g., levels 0 and 2) viaglTexImage2D. - Set the source texture's base level to 2:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 2). - Create a destination texture (
dst) and allocate mip level 0. - Trigger the underflow via
glCopySubTextureCHROMIUM(src, 0, GL_TEXTURE_2D, dst, 0, 0, 0, 0, 0, 64, 64, GL_FALSE, GL_FALSE, GL_FALSE). This requests reading fromsrcat level 0 (which is now below the base level of 2). - Bind
dstto an FBO and callglReadPixelsto read back the exfiltrated OOB GPU memory.
OOB Write (RCE / Sandbox Escape):
- Reverse the setup: Create a destination texture (
dst), allocate levels 0 and 2, and set itsGL_TEXTURE_BASE_LEVELto 2. - Create a source texture (
src) with attacker-controlled payload data at level 0. - Call
glCopySubTextureCHROMIUM(src, 0, GL_TEXTURE_2D, dst, 0, 0, 0, 0, 0, 64, 64, GL_FALSE, GL_FALSE, GL_FALSE). This triggers an underflow for thedestLevel, causing the GPU to write the payload out-of-bounds.
Suggested Fix
The validation logic for the Chromium copy texture extensions must be hardened to respect the texture's effective base level and max level.
In third_party/angle/src/libANGLE/validationES2.cpp:
- Update
IsValidCopyTextureSourceLevelto enforce thatlevel >= source->getTextureState().getEffectiveBaseLevel()andlevel <= source->getTextureState().getEffectiveMaxLevel(). - Update
IsValidCopyTextureDestinationLevelsimilarly for the destination texture. - Ensure that any generic checks (like
ValidMipLevel) do not override the strict requirements of the currently configured base/max levels when performing copies.
Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad
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
Likely the validation functions for the copy texture extensions only check a generic valid range for mip levels and do not enforce that the level is at or above the texture's effective base level, leading to an integer underflow in the Vulkan level conversion.
Impact
An attacker could read sensitive GPU memory (information disclosure) or write out-of-bounds to GPU memory, potentially leading to remote code execution and a sandbox escape in the GPU process.
What the attacker needed
Compromised renderer process; ability to call ANGLE copy texture functions
The fix
The validation logic should be updated to enforce that the requested mip level is within the texture's effective base and max levels.
How it was found
- Create a source texture and allocate multiple mip levels.
- Set the source texture's base level to 2.
- Create a destination texture and allocate mip level 0.
- Call glCopySubTextureCHROMIUM requesting to read from source level 0, which is below the base level.
- Bind the destination texture to an FBO and call glReadPixels to read back the out-of-bounds GPU memory.
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 copying textures, the software checks that the mip level (a detail level of the texture) is within a general range but forgets to check it against the texture's current base level. If you ask to copy from a level below the base, a subtraction goes negative and wraps around to a huge number. That huge number is then used as an index into GPU memory, causing the GPU to read or write outside the intended texture.
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.