Skip to content
Info disclosure Advisory Advanced CVE-2026-14388

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

A vertex count calculation in ANGLE's Vulkan backend over-counts vertices when the remaining buffer bytes are less than the vertex format size, causing an out-of-bounds read during CPU-side divisor emulation. An attacker could use a malicious WebGL page to leak adjacent GPU heap memory, potentially cross-origin data, via shaders and readPixels.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 3 months

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 math error in ANGLE's Vulkan backend over-calculates the number of vertices when a buffer's remaining bytes do not cover the full format size. During CPU-side vertex divisor emulation, this causes an out-of-bounds read of adjacent GPU heap memory, which is then passed to shaders, potentially leading to a cross-origin information leak.

Affected files:

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

Estimated timestamp from git blame: 2024-08-22

Summary

A potential heap-based out-of-bounds (OOB) read exists in ANGLE's Vulkan backend due to an incorrect vertex count calculation in GetVertexCountForRange. When vertex divisors exceed hardware limits (typically > 255), ANGLE performs CPU-side emulation of the divisor. Because the vertex count can be over-calculated by one, the emulation loop reads beyond the allocated bounds of the mapped Vulkan buffer. This OOB data is copied into a new vertex buffer where it can be exfiltrated by attacker-controlled shaders, leading to a potential cross-origin information leak from the GPU process.

Technical Details

The vulnerability originates in third_party/angle/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp within GetVertexCountForRange:

C++
size_t GetVertexCountForRange(GLint64 srcBufferBytes,
                              uint32_t srcFormatSize,
                              uint32_t srcVertexStride)
{
    // ... 
    size_t numVertices =
        static_cast<size_t>(srcBufferBytes + srcVertexStride - 1) / srcVertexStride;
    return numVertices;
}

This calculation is equivalent to ceil(srcBufferBytes / srcVertexStride). However, a vertex starting at the last possible stride-aligned position is only valid if the remaining buffer space is at least the size of the vertex format (srcFormatSize). If the remaining bytes are less than srcFormatSize but non-zero modulo srcVertexStride, the function over-counts the valid vertices by exactly one.

When a WebGL application requests a vertex attribute divisor exceeding ANGLE's capped hardware maximum (255), the attribute enters the mStreamingVertexAttribsMask path and triggers CPU-side emulation in VertexArrayVk::updateStreamedAttribs.

Front-end software bounds validation (ValidateDrawInstancedAttribs) is intentionally bypassed for these draws because Chrome relies on the Vulkan driver's robustBufferAccessBehaviorKHR to handle out-of-bounds accesses safely. However, because the divisor emulation is performed on the CPU using raw memory mapping (bufferVk->mapForReadAccessOnly), the hardware protections are entirely bypassed.

The over-calculated vertex count is passed to StreamVertexDataWithDivisor. On the final (over-counted) vertex iteration, the source pointer srcData is advanced past the valid data, and the subsequent memory copy (via CopyNativeVertexData) performs a memcpy that reads up to 15 bytes out-of-bounds from the adjacent heap suballocation.

Potential Attack Steps

These are the suggested steps an attacker would follow to trigger the vulnerability from a malicious website:

  1. Create a WebGL context and allocate an ArrayBuffer for vertex data.
  2. Groom the Vulkan heap to position sensitive cross-origin data immediately following the vertex buffer suballocation.
  3. Configure gl.vertexAttribPointer with a specific stride and format (e.g., gl.RGBA32F requiring 16 bytes) such that the available bytes at the end of the buffer trigger the over-calculation (e.g., leaving exactly 1 byte after the final stride).
  4. Call gl.vertexAttribDivisorANGLE with a divisor > 255 to force CPU-side emulation.
  5. Issue an instanced draw call using gl.drawArraysInstancedANGLE.
  6. The CPU emulation copies the out-of-bounds bytes into a new valid vertex buffer.
  7. The attacker's vertex shader receives the leaked bytes as normal attributes and forwards them to a fragment shader.
  8. The attacker calls gl.readPixels() to extract the leaked cross-origin memory.

Suggested Remediation

The vertex count calculation in GetVertexCountForRange should be corrected directly to ensure the available bytes can cover the full srcFormatSize of the final vertex.

C++
size_t GetVertexCountForRange(GLint64 srcBufferBytes,
                              uint32_t srcFormatSize,
                              uint32_t srcVertexStride)
{
    // ...
    if (srcBufferBytes < srcFormatSize)
    {
        return 0;
    }
    return static_cast<size_t>(srcBufferBytes - srcFormatSize) / srcVertexStride + 1;
}

Applying this fix directly inside GetVertexCountForRange will resolve the issue for all callers, including the divisor emulation path.

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 vertex count calculation uses ceiling division without checking that the remaining bytes cover the full vertex format size, so it over-counts by one when the remainder is non-zero but smaller than the format size.

Impact

A malicious website could potentially leak cross-origin GPU memory, but the report notes this is a potential issue and does not demonstrate a working exploit.

What the attacker needed

Victim visits a malicious website; browser uses ANGLE with Vulkan backend; WebGL support enabled

The fix

The vertex count calculation should be corrected to ensure the available bytes cover the full format size of the final vertex.

How it was found

  1. Create a WebGL context and allocate an ArrayBuffer for vertex data.
  2. Groom the Vulkan heap to place sensitive data after the vertex buffer.
  3. Set a vertex attribute pointer with a stride and format that leaves a small remainder.
  4. Set a vertex attribute divisor greater than 255 to force CPU-side emulation.
  5. Issue an instanced draw call.
  6. Read back the leaked bytes using readPixels.

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.

WebGL lets websites draw 3D graphics using the GPU. ANGLE is a component that translates WebGL commands for different graphics systems. A maths mistake in ANGLE's Vulkan backend made it read a little past the end of a buffer, and a malicious website could use that to read memory belonging to other sites.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.