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

Integer overflow in ANGLE (CVE-2026-11044)

A signed integer overflow in ANGLE's Metal backend row-offset calculation for glReadPixels can wrap to a negative value, shifting the source pointer backwards by about 2GB. An attacker could then read out-of-bounds GPU process memory into a WebGL ArrayBuffer, potentially leaking sensitive data.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 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 signed integer overflow in ANGLE's Metal backend optimization for glReadPixels can cause a massive out-of-bounds read in the GPU process. By allocating a large WebGL texture and reading from a high Y-offset, an attacker can cause row offset pointer arithmetic to wrap to a negative value. This potentially allows exfiltration of sensitive GPU memory to the sandboxed renderer process.

Affected files:

  • third_party/angle/src/libANGLE/renderer/metal/FrameBufferMtl.mm

Estimated timestamp from git blame: 2022-04-26

Vulnerability Details

In ANGLE's Metal backend, the copyTextureToBufferForReadOptimization feature is enabled by default on certain hardware configurations, such as AMD GPUs on macOS. When this optimization is active, FramebufferMtl::readPixelsImpl copies the entire texture into a temporary Metal buffer, maps it into CPU memory, and then copies the requested region row-by-row into the destination buffer.

During this row-by-row copy, a lambda function calculates the source memory address for the read:

C++
// third_party/angle/src/libANGLE/renderer/metal/FrameBufferMtl.mm
int bufferRowPitch =
    texture->width(renderTarget->getLevelIndex()) * readAngleFormat.pixelBytes;
// ...
angle::Result result = readPixelsCopyImpl(
    context, area, packPixelsParams, renderTarget,
    [&](const gl::Rectangle &region, const uint8_t *&src) {
        src =
            bufferData + region.y * bufferRowPitch + region.x * readAngleFormat.pixelBytes;
        return angle::Result::Continue;
    },
    pixels);

Both region.y (from gl::Rectangle's internal RectangleImpl<int>) and bufferRowPitch are 32-bit signed integers (int).

If an attacker creates a texture with maximum dimensions (e.g., width 16384) and a 16-byte-per-pixel format (like RGBA32F), bufferRowPitch evaluates to 262,144. If glReadPixels is called with a Y-offset of 8192, the multiplication region.y * bufferRowPitch equals 2,147,483,648.

This exceeds INT_MAX (2,147,483,647). Because Chromium is compiled with -fno-strict-overflow, the undefined behavior of signed integer overflow wraps around to a negative value (-2,147,483,648).

Due to C++ operator precedence and left-to-right associativity, the 64-bit pointer bufferData is added to this negative 32-bit integer, which gets sign-extended. This shifts the pointer backward by 2GB, causing PackPixels to read massively out-of-bounds GPU process memory. This data is then returned to the WebGL context in the attacker's ArrayBuffer.

Potential Steps to Reproduce

Note: These are suggested steps. As an AI tooling agent, I do not have the ability to run code or execute a live proof-of-concept.

  1. On a macOS system with an AMD GPU, host a webpage with a WebGL 2.0 context.
  2. Query MAX_TEXTURE_SIZE to confirm a limit of at least 16384.
  3. Create a large 2D texture: gl.texImage2D(..., gl.RGBA32F, 16384, 8193, ...), which safely allocates a ~2.14GB texture.
  4. Bind the texture to a Framebuffer Object.
  5. Call gl.readPixels(0, 8192, 16384, 1, gl.RGBA, gl.FLOAT, outputBuffer).
  6. The offset calculation 8192 * (16384 * 16) wraps to a negative value, shifting the read pointer backwards by 2GB.
  7. Inspect outputBuffer in JavaScript to read out-of-bounds GPU memory, potentially leaking cross-origin data or ASLR pointers.

Proposed Fix

To prevent the overflow, cast the region offsets to size_t before multiplication, or simply declare bufferRowPitch as size_t (which forces the promotion of the multiplication).

C++
size_t bufferRowPitch =
    static_cast<size_t>(texture->width(renderTarget->getLevelIndex())) * readAngleFormat.pixelBytes;

// ...
        src =
            bufferData + static_cast<size_t>(region.y) * bufferRowPitch + static_cast<size_t>(region.x) * readAngleFormat.pixelBytes;

Evaluated with Chrome root at commit: e9e0fcbb690b1a8c1a26c81c2a9ea23d6e178368


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 row pitch and Y offset are 32-bit signed integers, so their product can overflow and wrap negative before being added to a 64-bit pointer.

Impact

An attacker could potentially read out-of-bounds GPU process memory and leak cross-origin data or ASLR pointers to the renderer, though the report notes the steps are suggested and not executed.

What the attacker needed

MacOS with an AMD GPU; WebGL 2.0 support; victim visits attacker page; ~2.14GB texture allocation

The fix

The row pitch and offsets should be cast to size_t before multiplication so the arithmetic is done in 64-bit.

How it was found

  1. On macOS with an AMD GPU, host a page with a WebGL 2.0 context.
  2. Confirm the maximum texture size is at least 16384.
  3. Create a large RGBA32F 2D texture with height 8193.
  4. Bind the texture to a framebuffer object.
  5. Call gl.readPixels with a Y offset of 8192 and a height of 1.
  6. Inspect the output buffer in JavaScript for 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 a web page uses WebGL to read pixels back from the graphics card, the browser calculates where in memory to start copying. If that calculation uses a small fixed-size number type, a very large texture and a high row offset can make the number wrap around to a negative value. The browser then reads from the wrong place in memory and hands that data back to the web page.

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.