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

Insufficient validation of untrusted input in ANGLE (CVE-2026-5879)

An integer overflow in ANGLE's buffer handling meant a very large ArrayBuffer size could be converted inconsistently between signed and unsigned types, so the GL driver received a size that did not match the actual data. This led to out-of-bounds read and write memory corruption when a page was loaded.

parkminchan Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 2.5 years

Steps to reproduce the problem:
Insufficient input validation for large size ArrayBuffer results in an Out of Bound (R/W) vulnerability in the glBufferData_Exec function of the GL driver.

Problem Description:

ROOT CAUSE ANALYSIS

* Due to various characteristics, it will not be possible to reproduce in ClusterFuzzer.
* Because it occurs within the GL Driver, accurate root cause analysis is impossible.
* Since this vulnerability is reproduced when a page is loaded more than three times, it may be related to GPU task scheduling.

C++
angle::Result Buffer::bufferDataImpl(Context \*context,  
                                     BufferBinding target,  
                                     const void \*data,  
                                     GLsizeiptr size,  
                                     BufferUsage usage,  
                                     GLbitfield flags)  
{  
	...  
	  
    if (context && context->isRobustResourceInitEnabled() && !data && size > 0)  
    {  
        angle::MemoryBuffer \*scratchBuffer = nullptr;  
        ANGLE_CHECK_GL_ALLOC(  
            context, context->getZeroFilledBuffer(static_cast<size_t>(size), &scratchBuffer));  
        dataForImpl = scratchBuffer->data();  
    }  
  
	...  
}  

If the size of the ArrayBuffer is close to the maximum value of the GLsizeiptr(signed long int), an integer overflow occurs.

C++
bool ScratchBuffer::getImpl(size_t requestedSize,  
                            MemoryBuffer \*\*memoryBufferOut,  
                            Optional<uint8_t> initValue)  
{  
    ...  
  
    if (mScratchMemory.size() < requestedSize)  
    {  
        if (!mScratchMemory.resize(requestedSize))  
        {  
            return false;  
        }  
        mResetCounter = mLifetime;  
        if (initValue.valid())  
        {  
            mScratchMemory.fill(initValue.value());  
        }  
    }  
      
    ...  
}  

The buffer is allocated by the size converted from the size in which the integer overflow has occurred to size_t.

C++
angle::Result BufferGL::setData(const gl::Context \*context,  
                                gl::BufferBinding target,  
                                const void \*data,  
                                size_t size,  
                                gl::BufferUsage usage)  
{  
	...  
	ANGLE_GL_TRY(context, functions->bufferData(gl::ToGLenum(DestBufferOperationTarget), size, data,  
                                                ToGLenum(usage)));  
	...  
}  

When handling with data in bufferData functions of GL driver, the actual size of data and size parameters are different, resulting in out of bound r/w memory corruptions.

RECOMMENDED PATCHES

Diff
--- a/third_party/angle/src/libANGLE/Buffer.cpp  
+++ b/third_party/angle/src/libANGLE/Buffer.cpp  
@@ -140,7 +140,7 @@  
         dataForImpl = scratchBuffer->data();  
     }  
   
-    if (mImpl->setDataWithUsageFlags(context, target, nullptr, dataForImpl, size, usage, flags) ==  
+    if (mImpl->setDataWithUsageFlags(context, target, nullptr, dataForImpl, static_cast<size_t>(size), usage, flags) ==  
         angle::Result::Stop)  
     {  
         // If setData fails, the buffer contents are undefined. Set a zero size to indicate that.  

When calling the setData function, if the size parameter is also converted to size_t, memory corruptions caused by different sizes from the data can be prevented.


VERSION

* Chrome Version: 116.0.5845.0 (Developer Build) (x86_64)
/ 118.0.5970.0 (Developer Build) (x86_64)
* Operating System: macOS Monterey Version 12.6.8 (21G725)
* Hardware: Intel Core i5, 8GB RAM
* GPU: Intel Iris Graphics 540 1536 MB
(**I have attached the contents of the chrome://gpu page.**)

REPRODUCE CASE

You can simply reproduce by opening the attached poc.html in Chromium.

./Chromium --no-sandbox poc.html

CREDIT

parkminchan, working for SSD Labs Korea.

Additional Comments:

**Chrome version: ** 117.0.0.0 **Channel: ** Stable

OS: Mac OS

The original report as published on the Chromium issue tracker, by parkminchan, working for SSD Labs Korea. 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 a signed-to-unsigned size conversion mismatch: a GLsizeiptr size that overflowed is passed to setData and then to the GL driver without being cast to size_t, so the allocated buffer and the reported size disagree.

Impact

An attacker could trigger out-of-bounds read and write memory corruption in the GL driver, which may lead to a browser crash or potentially further exploitation; the report notes reproduction depends on repeated page loads and GPU scheduling.

What the attacker needed

Victim loads a malicious page; page loaded more than three times; Chromium on macOS with Intel GPU

The fix

The size should be cast to size_t when passed to setDataWithUsageFlags so the buffer allocation and the reported size stay consistent.

How it was found

  1. Open the attached proof-of-concept HTML file in Chromium, optionally with the no-sandbox flag.
  2. Load the page more than three times, as the issue reportedly only reproduces after repeated loads.

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 web page can ask the graphics layer to store a chunk of data in a buffer. If the requested size is huge, a number conversion goes wrong and the graphics driver is told a different size than the real data, so it reads or writes past the end of the buffer. That kind of memory mistake can crash the browser or potentially be abused to run code.

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.