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

Out of bounds read and write in ANGLE (CVE-2026-10881)

ANGLE's CPU fallback copy path unbinds pixel pack/unpack buffers directly in the native GL driver without updating ANGLE's frontend state tracking, leaving the two out of sync. An attacker could then pass a controlled offset that the native driver treats as a raw memory pointer, giving arbitrary read and write in the GPU process.

Anonymous Follow

Originally disclosed on Chrome VRP

Bounty$97,000 Critical View original
  • Fix shipped in 2 months

VULNERABILITY DETAILS

A severe state desynchronization vulnerability exists in the ANGLE OpenGL backend (CopySubTextureCHROMIUM), leading to Arbitrary R/W in the GPU process.

The root cause resides in BlitGL::copySubTextureCPUReadback. When performing a CPU fallback copy, the code explicitly unbinds the PIXEL_PACK_BUFFER mappings through the GL backend StateManagerGL using setPixelPackBuffer(context, nullptr) [0]. An identical mechanism unbinds the PIXEL_UNPACK_BUFFER via setPixelUnpackBuffer [1].

C++
    gl::PixelPackState pack;
    pack.alignment = 1;
    ANGLE_TRY(mStateManager->setPixelPackState(context, pack));
    ANGLE_TRY(mStateManager->setPixelPackBuffer(context, nullptr)); // [0]

    // ...
    gl::PixelUnpackState unpack;
    unpack.alignment = 1;
    ANGLE_TRY(mStateManager->setPixelUnpackState(context, unpack));
    ANGLE_TRY(mStateManager->setPixelUnpackBuffer(context, nullptr)); // [1]

These functions effectively propagate the glBindBuffer command directly to the native GPU driver via StateManagerGL::bindBuffer [2].

C++
angle::Result StateManagerGL::setPixelUnpackBuffer(const gl::Context *context,
                                                   const gl::Buffer *pixelBuffer)
{
    GLuint bufferID = 0;
    if (pixelBuffer != nullptr)
    {
        bufferID = GetImplAs<BufferGL>(pixelBuffer)->getBufferID();
    }
    bindBuffer(gl::BufferBinding::PixelUnpack, bufferID); // [2]

    return angle::Result::Continue;
}

However, they silently bypass the ANGLE frontend tracking system (gl::State). Crucially, the frontend's dirty bits (such as DIRTY_BIT_UNPACK_BUFFER_BINDING) are never set.

Because the frontend gl::State tracking and the native OpenGL driver state become desynchronized, the underlying native GL driver lacks the PBO binding (it was set to 0), while the frontend continues to believe the PBO is actively bound. When a subsequent API call takes an offset, the native driver treats the user-supplied offset as a raw CPU/Host pointer, enabling arbitrary memory operations.

[0] https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/libANGLE/renderer/gl/BlitGL.cpp;drc=a76e73df11cbb5466e8a1c8b3c9c04ce4a981f7b;l=865

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/libANGLE/renderer/gl/BlitGL.cpp;drc=a76e73df11cbb5466e8a1c8b3c9c04ce4a981f7b;l=883

[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp;drc=a76e73df11cbb5466e8a1c8b3c9c04ce4a981f7b;l=642

Vulnerability Exploit

The PoC leverages the desynchronization bug to transform a PBO offset into an arbitrary memory pointer. The process relies on intentionally triggering a CPU fallback path (e.g., via copyTextureCHROMIUM), which silently unbinds the PIXEL_PACK_BUFFER in the native OpenGL driver while the ANGLE frontend state remains intact.

Steps to achieve an arbitrary write:

  1. Desynchronize the PIXEL_PACK_BUFFER state.
  2. Manipulate the frontend state system (e.g., via dummy readPixels calls) to clear dirty bits, preventing the buffer from re-binding to the driver.
  3. Call readPixels using a controlled integer (e.g. 0x41414141) as the offset.
  4. Since the native OpenGL driver considers the PBO unbound (id = 0), it interprets the offset as an absolute virtual memory pointer, writing pixel data directly to this address.

The arbitrary read is achieved via a similar state desynchronization for PIXEL_UNPACK_BUFFER during operations like texSubImage2D.

Arbitrary Write Crash Site

Thread 1 "chrome" received signal SIGSEGV, Segmentation fault.
__memcpy_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:271
warning: 271	../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory
(gdb) x/i $pc
=> 0x7f264e788aa1 <__memcpy_avx_unaligned_erms+33>:	vmovdqu %ymm0,(%rdi)
(gdb) i r rdi
rdi            0x41414141          1094795585
(gdb) i r ymm0
ymm0           {v16_bfloat16 = {0x4242 <repeats 16 times>}, v16_half = {0x4242 <repeats 16 times>}, v8_float = {0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242}, v4_double = {0x4242424242424242, 0x4242424242424242, 0x4242424242424242, 0x4242424242424242}, v32_int8 = {0x42 <repeats 32 times>}, v16_int16 = {0x4242 <repeats 16 times>}, v8_int32 = {0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242}, v4_int64 = {0x4242424242424242, 0x4242424242424242, 0x4242424242424242, 0x4242424242424242}, v2_int128 = {0x42424242424242424242424242424242, 0x42424242424242424242424242424242}}
(gdb) bt
#0  __memcpy_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:271
#1  0x000056c2930d7edc in __interceptor_memcpy ()
#2  0x00007b221f1b443e in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#3  0x00007b221f20cc9b in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#4  0x00007b221f1b4d3a in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#5  0x00007b221f1b50d5 in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#6  0x00007b2241cca380 in readPixelsAllAtOnce ()
    at ../../third_party/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp:1684
#7  0x00007b2241cc9442 in readPixels ()
    at ../../third_party/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp:816
// ...

BISECTION

Introduced by ANGLE upstream commit [0] which added the CPU fallback implementation for CopyTextureCHROMIUM on OpenGL but failed to safely track buffer unbindings within the frontend state.

This regression was rolled into Chromium in commit [1].

[0] https://chromium.googlesource.com/angle/angle/+/aadc8f376a2c797db98d69d308c9980ca818f57f (Implement the CPU fallback for CopyTextureCHROMIUM on OpenGL)

[1] https://chromium.googlesource.com/chromium/src/+/236105a6afc95bfab50b0a3e3487c85cc049b49c (Roll ANGLE 79f7104..92996b0)

VERSION

Chrome Version: HEAD

Operating System: Linux

REPRODUCTION CASE

  1. Apply renderer.patch and build Chromium with ASan.
  2. Host the poc.html on an HTTP server.
  3. Run Chrome against the PoC.
Bash
$ python3 -m http.server 8000
$ ./out/asan/chrome "http://localhost:8000/poc.html"

CRASH INFORMATION

Type of crash: GPU process

Crash log: Attached asan_read.txt (Arbitrary Read) and asan_write.txt (Arbitrary Write).

CREDIT INFORMATION

Reporter credit: Anonymous

The original report as published on the Chromium issue tracker, by Anonymous. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

ANGLE is the translation layer Chromium uses to run OpenGL ES content on top of the platform's native graphics APIs. On Linux, the OpenGL backend of ANGLE forwards GL calls to the native driver through StateManagerGL, while a frontend state tracker (gl::State) keeps its own model of what is bound, what is dirty and what the driver should be told next.

The feature at the centre of this report is CopySubTextureCHROMIUM, and specifically the CPU fallback path in BlitGL::copySubTextureCPUReadback. That path exists for cases where the copy cannot be done on the GPU and has to be performed by reading pixels back into CPU memory and then uploading them again. To do that safely it manipulates the pixel pack and unpack buffer bindings (PIXEL_PACK_BUFFER and PIXEL_UNPACK_BUFFER).

The vulnerability is a state desynchronization between the ANGLE frontend and the native OpenGL driver. It leads to an out of bounds read and write, and in the reported case to arbitrary read and write inside the GPU process. It is tracked as CVE-2026-10881, rated critical, with a bounty of 97,000 USD under the Chrome VRP. The reporter is credited as Anonymous.

Setup

The report describes the target as Chrome at HEAD on Linux. The reproduction uses a Chromium build with ASan enabled and a patch applied to the renderer, plus a poc.html page served over HTTP. The crash traces show the Mesa Gallium driver (libgallium-25.2.8-0ubuntu0.24.04.1.so) in the stack, so the native driver in the tested environment is the open source Mesa stack.

The preconditions are:

  1. A Chromium build with the renderer patch applied and ASan enabled.
  2. A local HTTP server hosting the PoC page.
  3. Chrome launched against that page.

Finding it

The researcher looked at BlitGL::copySubTextureCPUReadback and found that the CPU fallback copy explicitly unbinds the pixel pack and unpack buffers through the GL backend state manager:

C++
    gl::PixelPackState pack;
    pack.alignment = 1;
    ANGLE_TRY(mStateManager->setPixelPackState(context, pack));
    ANGLE_TRY(mStateManager->setPixelPackBuffer(context, nullptr)); // [0]

    // ...
    gl::PixelUnpackState unpack;
    unpack.alignment = 1;
    ANGLE_TRY(mStateManager->setPixelUnpackState(context, unpack));
    ANGLE_TRY(mStateManager->setPixelUnpackBuffer(context, nullptr)); // [1]

Those calls go straight to the native driver. StateManagerGL::setPixelUnpackBuffer resolves the buffer ID and calls bindBuffer with it, passing 0 when the buffer is nullptr:

C++
angle::Result StateManagerGL::setPixelUnpackBuffer(const gl::Context *context,
                                                   const gl::Buffer *pixelBuffer)
{
    GLuint bufferID = 0;
    if (pixelBuffer != nullptr)
    {
        bufferID = GetImplAs<BufferGL>(pixelBuffer)->getBufferID();
    }
    bindBuffer(gl::BufferBinding::PixelUnpack, bufferID); // [2]

    return angle::Result::Continue;
}

The problem is what these functions do not do: they never update the ANGLE frontend tracking in gl::State, and in particular they never set the frontend dirty bits such as DIRTY_BIT_UNPACK_BUFFER_BINDING. The native driver now has no PBO bound, while the frontend still believes the PBO is bound. The two views of the world have diverged.

The consequence appears on the next API call that takes an offset. Because the frontend thinks a PBO is bound, it passes the user supplied offset through as an offset into that buffer. Because the native driver has no PBO bound, it treats the same value as a raw CPU/host pointer. That turns a buffer offset into an arbitrary memory address.

Exploitation

The PoC turns the desynchronization into an arbitrary memory pointer. It starts by intentionally triggering the CPU fallback path, for example through copyTextureCHROMIUM, which silently unbinds PIXEL_PACK_BUFFER in the native driver while the ANGLE frontend state stays as it was.

Step 1: desynchronize the pack buffer state

Trigger the CPU fallback copy so that setPixelPackBuffer(context, nullptr) reaches the native driver. The driver now has no pack buffer bound; the frontend still records one.

Step 2: clear the dirty bits

Manipulate the frontend state system, for example with dummy readPixels calls, so that the dirty bits are cleared. This prevents the frontend from re-binding the buffer to the driver on the next operation, which would otherwise repair the desynchronization before it can be used.

Step 3: call readPixels with a controlled offset

Issue a readPixels call using a controlled integer as the offset, for example 0x41414141.

Step 4: the driver writes to the offset as a pointer

Since the native driver considers the PBO unbound (id = 0), it interprets the offset as an absolute virtual memory pointer and writes the pixel data directly to that address. The crash site confirms this: the faulting instruction is a vector store to the address taken from the offset.

Thread 1 "chrome" received signal SIGSEGV, Segmentation fault.
__memcpy_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:271
warning: 271	../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory
(gdb) x/i $pc
=> 0x7f264e788aa1 <__memcpy_avx_unaligned_erms+33>:	vmovdqu %ymm0,(%rdi)
(gdb) i r rdi
rdi            0x41414141          1094795585
(gdb) i r ymm0
ymm0           {v16_bfloat16 = {0x4242 <repeats 16 times>}, v16_half = {0x4242 <repeats 16 times>}, v8_float = {0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242}, v4_double = {0x4242424242424242, 0x4242424242424242, 0x4242424242424242, 0x4242424242424242}, v32_int8 = {0x42 <repeats 32 times>}, v16_int16 = {0x4242 <repeats 16 times>}, v8_int32 = {0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242}, v4_int64 = {0x4242424242424242, 0x4242424242424242, 0x4242424242424242, 0x4242424242424242}, v2_int128 = {[redacted], [redacted]}}
(gdb) bt
#0  __memcpy_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:271
#1  0x000056c2930d7edc in __interceptor_memcpy ()
#2  0x00007b221f1b443e in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#3  0x00007b221f20cc9b in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#4  0x00007b221f1b4d3a in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#5  0x00007b221f1b50d5 in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#6  0x00007b2241cca380 in readPixelsAllAtOnce ()
    at ../../third_party/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp:1684
#7  0x00007b2241cc9442 in readPixels ()
    at ../../third_party/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp:816
// ...

rdi holds the destination of the store and contains 0x41414141, the offset supplied by the caller. ymm0 holds 0x42 repeated, the pixel data being written. The backtrace runs from readPixels in FramebufferGL.cpp through readPixelsAllAtOnce into the Gallium driver and finally into memcpy.

The arbitrary read is achieved the same way, using the equivalent desynchronization of PIXEL_UNPACK_BUFFER during operations such as texSubImage2D.

Root cause

The CPU fallback implementation for CopyTextureCHROMIUM on OpenGL was added by an ANGLE upstream commit, and that commit failed to track buffer unbindings safely in the frontend state. The backend state manager calls bindBuffer on the native driver directly, but the frontend gl::State is never told, and the dirty bits that would force a re-bind are never set.

The regression was rolled into Chromium by a subsequent ANGLE roll. The bisection points to these two commits:

  1. [redacted] in ANGLE, "Implement the CPU fallback for CopyTextureCHROMIUM on OpenGL".
  2. [redacted] in Chromium, "Roll ANGLE 79f7104..92996b0".

Because the backend bypasses it, the tracker's model is wrong and the dirty bit mechanism cannot correct it. The PoC deliberately clears the dirty bits with dummy calls so the frontend does not re-bind the buffer before the offset is used.

Impact

The result is arbitrary read and write in the GPU process. An attacker who can get the CPU fallback path to run and then issue the crafted readPixels or texSubImage2D call controls the address that the native driver reads from or writes to. The crash information lists the GPU process as the crash type, with separate ASan logs attached for the arbitrary read and the arbitrary write.

The report does not describe what an attacker could do after gaining read and write in the GPU process, nor which renderer side conditions are needed beyond the renderer patch used for the PoC. The severity assigned by the platform is critical.

Fix

The report does not describe the fix. What the root cause implies is that the backend unbind helpers must keep the frontend gl::State in sync, setting the relevant dirty bits (such as DIRTY_BIT_UNPACK_BUFFER_BINDING) whenever setPixelPackBuffer or setPixelUnpackBuffer changes the native binding, so that the frontend and the driver cannot diverge.

Variants to test

  1. Other backend state manager helpers that call bindBuffer directly. A positive result is a frontend binding that no longer matches the native driver after the helper runs, with the corresponding dirty bit unset.
  2. Other CPU fallback paths that unbind pixel pack or unpack buffers, beyond copySubTextureCPUReadback. A positive result is the same desynchronization reachable from a different entry point.
  3. The unpack side through texSubImage2D with a controlled offset. A positive result is a read from an address derived from the offset rather than from a bound buffer.
  4. Dirty bit clearing sequences using dummy calls before the offset-bearing call. A positive result is that the buffer is not re-bound and the offset is still treated as a pointer.
  5. The same pattern on other native drivers and platforms. The report demonstrates the behaviour on Linux, with the Mesa Gallium driver appearing in the crash trace.

Reproduction

  1. Apply renderer.patch and build Chromium with ASan.
  2. Host the poc.html on an HTTP server.
  3. Run Chrome against the PoC.
Bash
$ python3 -m http.server 8000
$ ./out/asan/chrome "http://localhost:8000/poc.html"

The crash logs attached to the report are asan_read.txt for the arbitrary read and asan_write.txt for the arbitrary write.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 16 min read.

What happened, in plain words

A web browser is a program that draws web pages on your screen. To draw anything with 3D graphics, a browser does not talk to your graphics card directly. It goes through a middleman, a piece of software called ANGLE. ANGLE takes the drawing instructions a web page gives it and translates them into instructions the graphics card's own driver understands. Think of ANGLE as an interpreter at a meeting: the web page speaks one language, the graphics card speaks another, and ANGLE translates between them.

To do its job, ANGLE keeps two records of what is going on. One record lives in ANGLE itself (the frontend), and one record lives in the graphics card driver (the backend). Normally the two records say the same thing. This report is about a bug where the two records stopped agreeing. ANGLE thought one thing was set up, the driver thought something else was set up, and that mismatch let a web page make the browser write data to any memory address it chose.

The bug is tracked as CVE-2026-10881, rated critical, with a bounty of 97,000 USD under the Chrome VRP (Chrome's Vulnerability Reward Program, the scheme Google runs to pay people who report security bugs). The reporter is credited as Anonymous.

The pieces you need to know

Before the details, here are the ideas that come up again and again.

  • API: an API is a fixed set of commands one program offers to another. It is like a restaurant menu: you can only order what is on the menu, in the way the menu says. A web page can only ask the browser to do things that are on the browser's menu.
  • GPU: the graphics processing unit, the chip that draws images. Browsers put graphics work in a separate process, the GPU process, so that a crash or bug there does not take down the whole browser.
  • Process: a running program with its own private memory. Chrome splits itself into several processes; the GPU process is the one that talks to the graphics card.
  • Buffer: a block of memory used to hold data, for example the pixels of an image. In OpenGL, a PBO (Pixel Buffer Object) is a buffer used to move pixel data around.
  • Binding: telling the driver "use this buffer for the next operation". It is like putting a document on a desk: whatever you do next happens to the document on the desk. Binding a buffer with the value 0 means "no buffer on the desk".
  • Offset: a position inside a buffer, counted from its start. If a buffer is a book, the offset is the page number.
  • Pointer: a memory address. If memory is a street of houses, a pointer is a house number. A program that treats a page number as a house number will knock on the wrong door, possibly a door that does not exist.
  • Out of bounds read and write: reading or writing memory outside the area a program was supposed to touch. It is like reaching past the edge of your own garden into a neighbour's.
  • Arbitrary read and write: the stronger version, where the attacker chooses any address at all. This is usually the most serious kind of memory bug, because it lets an attacker inspect or change anything in that process.
  • State desynchronization: two parts of a system keeping different records of the same thing. Like two clocks in the same house showing different times, so everyone arrives at the wrong moment.
  • Dirty bit: a small marker a program sets to mean "this setting has changed, tell the driver about it next time". It is a sticky note saying "remember to mention this".
  • CPU fallback: when the graphics card cannot do a job, the browser does it on the ordinary processor (the CPU) instead. Slower, but it still works.
  • ASan: AddressSanitizer, a tool built into a test build of a program that shouts loudly when memory is used wrongly. It is a smoke alarm for memory bugs.
  • Bisection: finding the change that introduced a bug by narrowing down between versions, the way you find a broken link in a chain by testing it in the middle.

The context: what ANGLE does

ANGLE is the translation layer Chromium uses to run OpenGL ES content on top of whatever graphics system the operating system provides. OpenGL ES is a standard set of drawing commands; the operating system on Linux uses its own graphics driver underneath. On Linux, ANGLE's OpenGL backend forwards the drawing commands to the native driver through a helper called StateManagerGL. At the same time, a frontend state tracker called gl::State keeps its own model of what is bound, what is dirty, and what the driver should be told next.

So there are two records: gl::State (the frontend, ANGLE's own notebook) and the native driver (the backend, the graphics card's actual settings). The whole design depends on the notebook being right.

The feature at the centre of the report is CopySubTextureCHROMIUM, a command that copies part of one texture (an image stored for drawing) into another. Specifically, the bug is in the CPU fallback path, BlitGL::copySubTextureCPUReadback. That path exists for cases where the copy cannot be done on the GPU and has to be done by reading pixels back into ordinary memory and then uploading them again. To do that safely, it changes which pixel pack and unpack buffers are bound: PIXEL_PACK_BUFFER (used when reading pixels out) and PIXEL_UNPACK_BUFFER (used when sending pixels in).

The vulnerability is a state desynchronization between the ANGLE frontend and the native OpenGL driver. It leads to an out of bounds read and write, and in the reported case to arbitrary read and write inside the GPU process.

Setup: what the researcher needed

The report describes the target as Chrome at HEAD on Linux. "HEAD" means the very latest development version of the code, not a released build. The reproduction uses a Chromium build with ASan enabled and a patch applied to the renderer, plus a poc.html page served over HTTP. The crash traces show the Mesa Gallium driver (libgallium-25.2.8-0ubuntu0.24.04.1.so) in the stack, so the native driver in the tested environment is the open source Mesa stack.

The preconditions are:

  1. A Chromium build with the renderer patch applied and ASan enabled.
  2. A local HTTP server hosting the PoC page.
  3. Chrome launched against that page.

A PoC is a proof of concept: the smallest page or program that demonstrates the bug actually happening.

Finding it: the code that forgets to tell the notebook

The researcher looked at BlitGL::copySubTextureCPUReadback and found that the CPU fallback copy explicitly unbinds the pixel pack and unpack buffers through the GL backend state manager:

C++
    gl::PixelPackState pack;
    pack.alignment = 1;
    ANGLE_TRY(mStateManager->setPixelPackState(context, pack));
    ANGLE_TRY(mStateManager->setPixelPackBuffer(context, nullptr)); // [0]

    // ...
    gl::PixelUnpackState unpack;
    unpack.alignment = 1;
    ANGLE_TRY(mStateManager->setPixelUnpackState(context, unpack));
    ANGLE_TRY(mStateManager->setPixelUnpackBuffer(context, nullptr)); // [1]

Line by line:

  • gl::PixelPackState pack; creates a small settings object for reading pixels out.
  • pack.alignment = 1; sets how pixel rows are aligned in memory; 1 means no padding.
  • ANGLE_TRY(mStateManager->setPixelPackState(context, pack)); applies those settings. ANGLE_TRY is a wrapper that stops and returns if the call fails.
  • ANGLE_TRY(mStateManager->setPixelPackBuffer(context, nullptr)); // [0] unbinds the pack buffer. nullptr means "no buffer". This is the first place the bug lives.
  • The next four lines do the same for the unpack side: create the settings, set alignment, apply them, and unbind the unpack buffer with nullptr at // [1].

Those calls go straight to the native driver. StateManagerGL::setPixelUnpackBuffer resolves the buffer ID and calls bindBuffer with it, passing 0 when the buffer is nullptr:

C++
angle::Result StateManagerGL::setPixelUnpackBuffer(const gl::Context *context,
                                                   const gl::Buffer *pixelBuffer)
{
    GLuint bufferID = 0;
    if (pixelBuffer != nullptr)
    {
        bufferID = GetImplAs<BufferGL>(pixelBuffer)->getBufferID();
    }
    bindBuffer(gl::BufferBinding::PixelUnpack, bufferID); // [2]

    return angle::Result::Continue;
}

Line by line:

  • The function takes a context (the current drawing session) and a pixelBuffer (the buffer to bind, or nothing).
  • GLuint bufferID = 0; starts with the value 0, which in OpenGL means "no buffer".
  • if (pixelBuffer != nullptr) checks whether a real buffer was passed.
  • bufferID = GetImplAs<BufferGL>(pixelBuffer)->getBufferID(); if so, looks up that buffer's numeric ID.
  • bindBuffer(gl::BufferBinding::PixelUnpack, bufferID); // [2] tells the native driver to bind that ID for unpacking. This is the direct line to the driver.
  • return angle::Result::Continue; reports success.

The problem is what these functions do not do: they never update the ANGLE frontend tracking in gl::State, and in particular they never set the frontend dirty bits such as DIRTY_BIT_UNPACK_BUFFER_BINDING. The native driver now has no PBO bound, while the frontend still believes the PBO is bound. The two views of the world have diverged. The notebook still says a buffer is on the desk, but the desk is empty.

The consequence appears on the next API call that takes an offset. Because the frontend thinks a PBO is bound, it passes the user supplied offset through as an offset into that buffer. Because the native driver has no PBO bound, it treats the same value as a raw CPU/host pointer. That turns a buffer offset into an arbitrary memory address. In the book comparison: the reader is told "go to page 0x41414141 of the book", but there is no book, so the number is taken as a street address instead.

Exploitation: turning the mismatch into a memory pointer

The PoC turns the desynchronization into an arbitrary memory pointer. It starts by intentionally triggering the CPU fallback path, for example through copyTextureCHROMIUM, which silently unbinds PIXEL_PACK_BUFFER in the native driver while the ANGLE frontend state stays as it was.

Step 1: desynchronize the pack buffer state

Trigger the CPU fallback copy so that setPixelPackBuffer(context, nullptr) reaches the native driver. The driver now has no pack buffer bound; the frontend still records one. This step is taken first because the bug lives in the fallback path, so the fallback path has to run.

Step 2: clear the dirty bits

Manipulate the frontend state system, for example with dummy readPixels calls, so that the dirty bits are cleared. This prevents the frontend from re-binding the buffer to the driver on the next operation, which would otherwise repair the desynchronization before it can be used. In other words, the sticky note saying "remember to mention this" is removed, so the frontend never gets round to fixing the desk.

Step 3: call readPixels with a controlled offset

Issue a readPixels call using a controlled integer as the offset, for example 0x41414141. readPixels is the command that reads pixels out of the drawing area. The number 0x41414141 is written in hexadecimal (base 16); it is just a chosen value the attacker controls, not a real buffer position.

Step 4: the driver writes to the offset as a pointer

Since the native driver considers the PBO unbound (id = 0), it interprets the offset as an absolute virtual memory pointer and writes the pixel data directly to that address. The crash site confirms this: the faulting instruction is a vector store to the address taken from the offset.

Thread 1 "chrome" received signal SIGSEGV, Segmentation fault.
__memcpy_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:271
warning: 271	../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory
(gdb) x/i $pc
=> 0x7f264e788aa1 <__memcpy_avx_unaligned_erms+33>:	vmovdqu %ymm0,(%rdi)
(gdb) i r rdi
rdi            0x41414141          1094795585
(gdb) i r ymm0
ymm0           {v16_bfloat16 = {0x4242 <repeats 16 times>}, v16_half = {0x4242 <repeats 16 times>}, v8_float = {0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242}, v4_double = {0x4242424242424242, 0x4242424242424242, 0x4242424242424242, 0x4242424242424242}, v32_int8 = {0x42 <repeats 32 times>}, v16_int16 = {0x4242 <repeats 16 times>}, v8_int32 = {0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242, 0x42424242}, v4_int64 = {0x4242424242424242, 0x4242424242424242, 0x4242424242424242, 0x4242424242424242}, v2_int128 = {[redacted], [redacted]}}
(gdb) bt
#0  __memcpy_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:271
#1  0x000056c2930d7edc in __interceptor_memcpy ()
#2  0x00007b221f1b443e in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#3  0x00007b221f20cc9b in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#4  0x00007b221f1b4d3a in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#5  0x00007b221f1b50d5 in ??? ()
    at /lib/x86_64-linux-gnu/libgallium-25.2.8-0ubuntu0.24.04.1.so
#6  0x00007b2241cca380 in readPixelsAllAtOnce ()
    at ../../third_party/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp:1684
#7  0x00007b2241cc9442 in readPixels ()
    at ../../third_party/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp:816
// ...

This is a debugger transcript, taken with gdb, a tool that lets you stop a running program and inspect it. Line by line:

  • Thread 1 "chrome" received signal SIGSEGV, Segmentation fault. The program tried to touch memory it is not allowed to touch, and the operating system stopped it. SIGSEGV is the signal the system sends in that case.
  • __memcpy_avx_unaligned_erms () is the function that was running: a fast memory copy routine.
  • The warning: line says the debugger could not find the source file for that routine, which is normal for system libraries.
  • (gdb) x/i $pc asks the debugger to show the instruction at the current program counter ($pc), the place where execution stopped.
  • => 0x7f264e788aa1 <__memcpy_avx_unaligned_erms+33>: vmovdqu %ymm0,(%rdi) is that instruction: store the contents of a vector register called ymm0 at the address held in rdi.
  • (gdb) i r rdi asks for the value of rdi, the register holding the destination address.
  • rdi 0x41414141 1094795585 shows it is 0x41414141, the offset supplied by the caller, shown also in decimal.
  • (gdb) i r ymm0 asks for the contents of ymm0, the data being written.
  • The long ymm0 line shows the same value repeated in many interpretations: 0x42 repeated, which is the pixel data being written.
  • (gdb) bt asks for the backtrace, the list of function calls that led here.
  • #0 is the memory copy routine itself.
  • #1 is __interceptor_memcpy, the ASan wrapper around the copy, which is how ASan notices the bad access.
  • #2 to #5 are unnamed functions inside the Mesa Gallium driver library.
  • #6 is readPixelsAllAtOnce in FramebufferGL.cpp, the ANGLE code that reads pixels in one go.
  • #7 is readPixels in the same file, the entry point the attacker called.

So rdi holds the destination of the store and contains 0x41414141, the offset supplied by the caller. ymm0 holds 0x42 repeated, the pixel data being written. The backtrace runs from readPixels in FramebufferGL.cpp through readPixelsAllAtOnce into the Gallium driver and finally into memcpy.

The arbitrary read is achieved the same way, using the equivalent desynchronization of PIXEL_UNPACK_BUFFER during operations such as texSubImage2D. texSubImage2D is the command that sends pixel data into a texture; if the driver treats its offset as a pointer, it reads from an address the attacker chose instead of from a buffer.

Root cause: which change introduced it

The CPU fallback implementation for CopyTextureCHROMIUM on OpenGL was added by an ANGLE upstream commit, and that commit failed to track buffer unbindings safely in the frontend state. The backend state manager calls bindBuffer on the native driver directly, but the frontend gl::State is never told, and the dirty bits that would force a re-bind are never set.

The regression was rolled into Chromium by a subsequent ANGLE roll. A roll is when Chromium updates the copy of ANGLE it bundles to a newer version. The bisection points to these two commits:

  1. [redacted] in ANGLE, "Implement the CPU fallback for CopyTextureCHROMIUM on OpenGL".
  2. [redacted] in Chromium, "Roll ANGLE 79f7104..92996b0".

Because the backend bypasses it, the tracker's model is wrong and the dirty bit mechanism cannot correct it. The PoC deliberately clears the dirty bits with dummy calls so the frontend does not re-bind the buffer before the offset is used.

Impact: what an attacker gets

The result is arbitrary read and write in the GPU process. An attacker who can get the CPU fallback path to run and then issue the crafted readPixels or texSubImage2D call controls the address that the native driver reads from or writes to. The crash information lists the GPU process as the crash type, with separate ASan logs attached for the arbitrary read and the arbitrary write.

The report does not describe what an attacker could do after gaining read and write in the GPU process, nor which renderer side conditions are needed beyond the renderer patch used for the PoC. The severity assigned by the platform is critical.

Fix

The report does not describe the fix. What the root cause implies is that the backend unbind helpers must keep the frontend gl::State in sync, setting the relevant dirty bits (such as DIRTY_BIT_UNPACK_BUFFER_BINDING) whenever setPixelPackBuffer or setPixelUnpackBuffer changes the native binding, so that the frontend and the driver cannot diverge. In plain terms: whenever the desk is cleared, the notebook has to be updated too.

Variants to test: where else to look

  1. Other backend state manager helpers that call bindBuffer directly. A positive result is a frontend binding that no longer matches the native driver after the helper runs, with the corresponding dirty bit unset.
  2. Other CPU fallback paths that unbind pixel pack or unpack buffers, beyond copySubTextureCPUReadback. A positive result is the same desynchronization reachable from a different entry point.
  3. The unpack side through texSubImage2D with a controlled offset. A positive result is a read from an address derived from the offset rather than from a bound buffer.
  4. Dirty bit clearing sequences using dummy calls before the offset-bearing call. A positive result is that the buffer is not re-bound and the offset is still treated as a pointer.
  5. The same pattern on other native drivers and platforms. The report demonstrates the behaviour on Linux, with the Mesa Gallium driver appearing in the crash trace.

Reproduction: how to see it yourself

  1. Apply renderer.patch and build Chromium with ASan.
  2. Host the poc.html on an HTTP server.
  3. Run Chrome against the PoC.
Bash
$ python3 -m http.server 8000
$ ./out/asan/chrome "http://localhost:8000/poc.html"

Line by line:

  • $ python3 -m http.server 8000 starts a tiny web server on your own machine using Python, serving the current folder on port 8000. The $ is the shell prompt, not part of the command.
  • $ ./out/asan/chrome "http://localhost:8000/poc.html" starts the specially built Chrome from the build output folder (out/asan) and points it at the PoC page on the local server. localhost means this computer.

The crash logs attached to the report are asan_read.txt for the arbitrary read and asan_write.txt for the arbitrary write.

Glossary

  • ANGLE: the translation layer in Chromium that turns web graphics commands into commands the graphics driver understands.
  • API: a fixed set of commands one program offers to another.
  • Arbitrary read and write: the ability to read from or write to any memory address the attacker chooses.
  • ASan (AddressSanitizer): a tool in a test build that detects and reports incorrect memory use.
  • Backend: the part of a system that talks to the underlying hardware or driver.
  • Binding: telling the driver which buffer to use for the next operation; binding 0 means no buffer.
  • Bisection: narrowing down which code change introduced a bug by testing between versions.
  • Buffer: a block of memory holding data, such as pixels.
  • CPU fallback: doing a graphics job on the ordinary processor when the graphics card cannot do it.
  • CVE: a public identifier for a known security vulnerability.
  • Dirty bit: a marker meaning a setting has changed and must be passed on to the driver.
  • Frontend: the part of a system that keeps its own record of what should be happening.
  • gdb: a debugger, a tool to stop a running program and inspect its state.
  • GPU process: the separate Chrome process that handles graphics work.
  • HEAD: the latest development version of a codebase.
  • OpenGL ES: a standard set of graphics commands used by browsers and mobile devices.
  • Out of bounds read and write: reading or writing memory outside the area a program was meant to touch.
  • PBO (Pixel Buffer Object): an OpenGL buffer used to move pixel data.
  • Pointer: a memory address.
  • PoC (proof of concept): a minimal demonstration that a bug can actually be triggered.
  • Roll: updating Chromium's bundled copy of a component such as ANGLE to a newer version.
  • SIGSEGV: the signal the operating system sends when a program touches memory it is not allowed to.
  • State desynchronization: two parts of a system holding different records of the same setting.
  • Texture: an image stored for use in drawing.
  • VRP (Vulnerability Reward Program): a scheme that pays people for reporting security bugs.

More by Anonymous

View all

2,270 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.