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

Uninitialized Use in ANGLE (CVE-2026-10994)

ANGLE's robust resource initialization can fail to clear stencil buffers because the internal clear helper does not restore stencil write masks, allowing stale stencil data to persist. An attacker could use WebGL to read this stale stencil information as colour output.

Mufeed VH Follow

Originally disclosed on Chrome VRP

Bounty$2,000 Medium View original
  • Fix shipped in 43 days

Security Bug

VULNERABILITY DETAILS

ANGLE's OpenGL robust-resource-initialization path can preserve stale stencil contents because the internal clear helper in BlitGL::SetClearState() sets glClearStencil(0) but never restores the front/back stencil write masks to all-ones before the later glClear(GL_STENCIL_BUFFER_BIT).

On the GL backend, FramebufferGL::ensureAttachmentsInitialized() routes first-use attachment initialization through BlitGL::clearFramebuffer(). If attacker-controlled WebGL state has already latched stencilMask(0) into the underlying GL state machine, the internal stencil clear can be suppressed while ANGLE still marks the attachment initialized. A later stencil-tested draw can then turn the stale stencil bits into script-readable color output.

The sink is still present in current source:

C++
if (stencilClear)
{
    stateManager->setClearStencil(0);
    *outClearMask |= GL_STENCIL_BUFFER_BIT;
}

Source references:

  • third_party/angle/src/libANGLE/context_private_call.inl.h
  • third_party/angle/src/libANGLE/State.cpp
  • third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp
  • third_party/angle/src/libANGLE/Framebuffer.cpp
  • third_party/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp
  • third_party/angle/src/libANGLE/renderer/gl/BlitGL.cpp

The attached browser PoC primes a fresh DEPTH24_STENCIL8 renderbuffer with stencil value 1, deletes it, syncs stencilMask(0) on a separate initialized framebuffer, then allocates a new depth-stencil attachment and triggers robust initialization on first use. It finally uses stencil-tested drawing plus readPixels() to detect non-zero stale stencil state.

On the latest Chromium main tip I synced for this validation pass, the browser leak is immediate. Importantly, on this Linux/NVIDIA system it reproduces without any backend-forcing flags such as --use-gl=angle, --use-angle=gl, or --ignore-gpu-blocklist; Chromium's default startup path still selects ANGLE (NVIDIA Corporation, NVIDIA L4/PCIe/SSE2, OpenGL 4.5.0) for WebGL on this machine. The first attempted victim allocation already produced sum(red)=4177920, which is the full 128 x 128 x 255 frame, meaning the primed all-ones stencil pattern survived robust initialization intact.

VERSION

Chrome Version: Chromium 149.0.7804.0 + dev (local ASan build from commit edf6e4e6f9d6427ecb954106f5b889f94c30de88)

Operating System: Ubuntu 22.04.5 LTS x86_64

GPU / GL renderer: ANGLE (NVIDIA Corporation, NVIDIA L4/PCIe/SSE2, OpenGL 4.5.0) on desktop Linux

REPRODUCTION CASE

Attachments:

  • poc.html
  • stencil_browser_default_no_backend_flags_14978040.log

Numbered repro steps:

  1. Use a Chromium build configured to run WebGL through ANGLE's GL backend on a real GPU-backed X server.
  2. Serve the attached PoC locally:
Bash
python3 -m http.server 8000
  1. Run Chromium directly. The following command includes only convenience flags for profile/log hygiene; it does not force a specific GL backend:
Bash
out/asan/chrome \
  --user-data-dir=/tmp/chrome-stencil-poc \
  --no-first-run \
  --disable-background-networking \
  --disable-default-apps \
  --disable-sync \
  --metrics-recording-only \
  --enable-logging=stderr \
  'http://127.0.0.1:8000/poc.html?iters=2000&logEvery=50&test=nonzero'

Observed result:

Text
[poc] UNMASKED_RENDERER_WEBGL=ANGLE (NVIDIA Corporation, NVIDIA L4/PCIe/SSE2, OpenGL 4.5.0)
[poc] sync FBO prepared
[poc] LEAK observed iteration=0 sum(red)=4177920

The attached poc.html also supports the exact stencilFunc(EQUAL, 1, 0xFF) mode from the minimal write-up, but the attached browser run uses the broader NOTEQUAL, 0 detection mode to maximize reliability when validating reused stencil contents.

Type of crash: N/A (stale stencil disclosure; no crash required)

Crash State:

Text
N/A

Client ID (if relevant): N/A

CREDIT INFORMATION

Reporter credit: Mufeed VH from Winfunc Research (winfunc.com)

The original report as published on the Chromium issue tracker, by Mufeed VH from Winfunc Research (winfunc.com). 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. 5 min read.

Context

ANGLE is the translation layer Chromium uses to run WebGL on top of native graphics APIs. On the GL backend, ANGLE sits on top of the driver's OpenGL implementation, and it has to emulate some behaviour that the underlying API does not guarantee. One of those behaviours is robust resource initialization: when a WebGL application first uses a framebuffer attachment, the specification requires the contents to be defined (zeroed) rather than whatever happened to be in memory. ANGLE implements this by clearing the attachment the first time it is used.

The report concerns the stencil part of that clear path. The internal helper in BlitGL::SetClearState() sets the stencil clear value with glClearStencil(0), but it does not restore the front and back stencil write masks to all-ones before the later glClear(GL_STENCIL_BUFFER_BIT). If the stencil write mask has been left at zero by earlier WebGL state, the clear is silently suppressed while ANGLE still records the attachment as initialized. Stale stencil bits then survive into a buffer that the application is allowed to read back.

The issue is tracked as CVE-2026-10994, an uninitialized use in ANGLE, rated medium severity, disclosed on 2026-06-02 through the Chrome VRP with a bounty of 2000.00 USD. The reporter is Mufeed VH from Winfunc Research (winfunc.com).

Setup

The validation was done on a local build of Chromium 149.0.7804.0 plus dev, an ASan build from commit [redacted], running on Ubuntu 22.04.5 LTS x86_64. The GPU and GL renderer reported by the browser was:

Text
ANGLE (NVIDIA Corporation, NVIDIA L4/PCIe/SSE2, OpenGL 4.5.0)

The build has to run WebGL through ANGLE's GL backend on a real GPU-backed X server. The report notes that on this Linux/NVIDIA system the bug reproduces without any backend-forcing flags such as --use-gl=angle, --use-angle=gl, or --ignore-gpu-blocklist: the default startup path already selects the ANGLE GL renderer above for WebGL on this machine.

Two attachments accompany the report: poc.html and [redacted].log.

Finding it

The starting point is the robust-resource-initialization path. On the GL backend, FramebufferGL::ensureAttachmentsInitialized() routes first-use attachment initialization through BlitGL::clearFramebuffer(). The clear helper in BlitGL::SetClearState() prepares the GL state for that clear. For the stencil buffer it sets the clear value to zero and adds GL_STENCIL_BUFFER_BIT to the clear mask, but it never resets the stencil write masks to all-ones.

That matters because the stencil write mask is part of the underlying GL state machine, and WebGL state set by the page is latched into that same machine. If the page has already set stencilMask(0), the internal glClear(GL_STENCIL_BUFFER_BIT) does nothing to the stencil bits, yet ANGLE still marks the attachment as initialized. The attachment is then treated as safe to use, and a later stencil-tested draw can turn the stale stencil bits into colour output that the page can read back with readPixels().

The sink was still present in current source at the time of the report:

C++
if (stencilClear)
{
    stateManager->setClearStencil(0);
    *outClearMask |= GL_STENCIL_BUFFER_BIT;
}

Relevant source files listed in the report:

  • third_party/angle/src/libANGLE/context_private_call.inl.h
  • third_party/angle/src/libANGLE/State.cpp
  • third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp
  • third_party/angle/src/libANGLE/Framebuffer.cpp
  • third_party/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp
  • third_party/angle/src/libANGLE/renderer/gl/BlitGL.cpp

Exploitation

The browser PoC follows a fixed sequence. It primes a fresh DEPTH24_STENCIL8 renderbuffer with stencil value 1, deletes it, syncs stencilMask(0) on a separate initialized framebuffer, then allocates a new depth-stencil attachment and triggers robust initialization on first use. Finally it uses stencil-tested drawing plus readPixels() to detect non-zero stale stencil state.

Step 1: Prepare the environment

Use a Chromium build configured to run WebGL through ANGLE's GL backend on a real GPU-backed X server. No backend-forcing flags are required on the test machine.

Step 2: Serve the PoC locally

Bash
python3 -m http.server 8000

This serves poc.html from the working directory on port 8000.

Step 3: Run Chromium against the PoC

The command below includes only convenience flags for profile and log hygiene; it does not force a specific GL backend:

Bash
out/asan/chrome \
  --user-data-dir=/tmp/chrome-stencil-poc \
  --no-first-run \
  --disable-background-networking \
  --disable-default-apps \
  --disable-sync \
  --metrics-recording-only \
  --enable-logging=stderr \
  'http://[redacted]:8000/poc.html?iters=2000&logEvery=50&test=nonzero'

The URL passes iters=2000, logEvery=50 and test=nonzero to the page. The --user-data-dir keeps the profile isolated, and the remaining flags suppress first-run and background behaviour so the log is clean.

Step 4: Observe the result

Text
[poc] UNMASKED_RENDERER_WEBGL=ANGLE (NVIDIA Corporation, NVIDIA L4/PCIe/SSE2, OpenGL 4.5.0)
[poc] sync FBO prepared
[poc] LEAK observed iteration=0 sum(red)=4177920

The first line confirms the renderer is the ANGLE GL backend on the NVIDIA L4. The third is the leak: it fires on the very first iteration, and sum(red)=4177920 is the full 128 x 128 x 255 frame, meaning the primed all-ones stencil pattern survived robust initialization intact and was converted into colour by the stencil-tested draw.

The report notes that on the latest Chromium main tip synced for this validation pass, the browser leak is immediate. The first attempted victim allocation already produced the full-frame sum above.

poc.html also supports the exact stencilFunc(EQUAL, 1, 0xFF) mode from the minimal write-up, but the attached browser run uses the broader NOTEQUAL, 0 detection mode to maximise reliability when validating reused stencil contents.

No crash is required for this issue: the crash type is listed as N/A, the crash state is N/A, and the client ID is not relevant.

Root cause

The internal clear helper in BlitGL::SetClearState() sets the stencil clear value but leaves the front and back stencil write masks untouched. Because the write mask is shared GL state that the page can set through WebGL, a page that has latched stencilMask(0) causes the internal glClear(GL_STENCIL_BUFFER_BIT) to be a no-op. ANGLE does not verify that the clear actually took effect, so it marks the attachment initialized regardless. The robust-initialization guarantee is therefore broken: the attachment is presented as zeroed while it still holds whatever stencil bits were there before.

Impact

An attacker-controlled WebGL page can read stencil contents that robust initialization was supposed to erase. In the demonstrated case the stale pattern is one the page itself primed, but the mechanism is a stale-content disclosure: the page obtains data from a buffer that the specification says has been initialized. The report does not claim cross-origin or cross-process leakage beyond what the PoC shows. The issue is rated medium severity.

Fix

The report does not state what fix was applied.

Variants to test

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. 17 min read.

What happened, in plain words

A security researcher found a bug in a piece of software called ANGLE, which is a component that ships inside Google Chrome. The bug lets a web page read back stencil data that should have been wiped before first use. The data in question lives in something called the stencil buffer, a small scratch area the graphics hardware uses while drawing. Chrome is supposed to wipe that scratch area clean before a web page starts using it, but under certain conditions the wipe silently does nothing, and the page can then read the old contents back.

The bug is tracked as CVE-2026-10994. A CVE is a public catalogue number given to a security flaw so people can refer to it unambiguously. It is classified as an uninitialized use, which means software uses a piece of memory as if it had been set up properly when in fact it still holds whatever was there before. The severity is medium, and the report was disclosed on 2026-06-02 through the Chrome VRP, Chrome's bug bounty programme, with a reward of 2000.00 USD. The reporter is Mufeed VH from Winfunc Research (winfunc.com).

To follow the rest of this article you only need to know how to use a browser. Every technical term is explained where it first appears, and there is a glossary at the end.

Some background before the details

What WebGL is

WebGL is a feature built into browsers that lets a web page draw 3D and 2D graphics using the computer's graphics card (the GPU). Think of the GPU as a very fast but very narrow-minded artist: it only understands a specific language of drawing commands. WebGL is the way a web page speaks to that artist.

What ANGLE is

Different operating systems and graphics cards speak slightly different versions of that drawing language. To avoid writing separate code for every combination, Chrome uses a translation layer called ANGLE. ANGLE takes the WebGL commands a page issues and translates them into whatever the underlying graphics system on that machine understands. You can compare it to a interpreter at a meeting: the web page speaks one language, the graphics driver speaks another, and ANGLE translates between them.

ANGLE has several backends. A backend is the specific underlying graphics system ANGLE translates into. The one relevant here is the GL backend, which sits on top of the driver's OpenGL implementation. OpenGL is one of the standard languages for talking to graphics hardware.

What a framebuffer and an attachment are

When the GPU draws something, it does not draw straight onto your screen. It draws into a temporary workspace in memory called a framebuffer. A framebuffer is like a sheet of paper the artist works on before the result is shown.

A framebuffer is made of several layers called attachments. Each attachment stores one kind of information:

  • a colour attachment stores the actual pixel colours;
  • a depth attachment stores how far away each pixel is, so the GPU knows what is in front of what;
  • a stencil attachment stores small extra numbers used for masking effects, for example drawing only inside a certain shape.

What the stencil buffer is

The stencil buffer is easiest to picture as a sheet of tracing paper with holes cut in it. When you draw through it, only the parts where there are holes let paint through. In graphics terms, each pixel has a small number stored in the stencil buffer, and drawing commands can be told to only affect pixels whose stencil number matches a condition. That is called a stencil test.

What robust resource initialization means

When a web page asks for a new framebuffer attachment, the memory behind it is reused from earlier work. It may still contain data from earlier work on the GPU. The WebGL specification says this must not happen: the first time a page uses an attachment, its contents must be defined, meaning zeroed out, not whatever was left over.

ANGLE implements this rule by clearing the attachment the first time it is used. This is called robust resource initialization. Think of it as a hotel that promises every guest a freshly cleaned room: before you get the key, housekeeping is supposed to have wiped everything down.

What a write mask is

Graphics systems have switches called masks that control which parts of a buffer a drawing or clearing operation is allowed to touch. A write mask set to all-ones means every bit can be written. A write mask set to zero means nothing can be written, so the operation is silently ignored. It is like a stencil with no holes at all: you can move the brush, but no paint reaches the paper.

Web pages can set these masks through WebGL. The function stencilMask(0) sets the stencil write mask to zero.

The vulnerability in detail

The report concerns the stencil part of ANGLE's initialization clear. The internal helper in BlitGL::SetClearState() sets the stencil clear value with glClearStencil(0), but it does not restore the front and back stencil write masks to all-ones before the later glClear(GL_STENCIL_BUFFER_BIT).

In plain words: before wiping the stencil buffer, ANGLE tells the GPU what value to write (zero), but it forgets to make sure writing is actually allowed. If the stencil write mask has been left at zero by earlier WebGL state, the clear is silently suppressed while ANGLE still records the attachment as initialized. Stale stencil bits then survive into a buffer that the application is allowed to read back.

Why this happens

On the GL backend, FramebufferGL::ensureAttachmentsInitialized() routes first-use attachment initialization through BlitGL::clearFramebuffer(). The clear helper in BlitGL::SetClearState() prepares the GL state for that clear. For the stencil buffer it sets the clear value to zero and adds GL_STENCIL_BUFFER_BIT to the clear mask, but it never resets the stencil write masks to all-ones.

That matters because the stencil write mask is part of the underlying GL state machine, and WebGL state set by the page is latched into that same machine. If the page has already set stencilMask(0), the internal glClear(GL_STENCIL_BUFFER_BIT) does nothing to the stencil bits, yet ANGLE still marks the attachment as initialized. The attachment is then treated as safe to use, and a later stencil-tested draw can turn the stale stencil bits into colour output that the page can read back with readPixels().

readPixels() is a WebGL function that copies pixels from the framebuffer back into a place where JavaScript can read them. It is the page's way of looking at what the GPU produced.

The faulty code

The sink, meaning the exact place in the code where the problem lives, was still present in current source at the time of the report:

C++
if (stencilClear)
{
    stateManager->setClearStencil(0);
    *outClearMask |= GL_STENCIL_BUFFER_BIT;
}

Line by line:

  • if (stencilClear) checks whether a stencil clear is needed. If the caller asked for the stencil buffer to be cleared, the block runs.
  • stateManager->setClearStencil(0); tells the graphics state manager to use zero as the value to write into the stencil buffer. This is the equivalent of glClearStencil(0).
  • *outClearMask |= GL_STENCIL_BUFFER_BIT; adds the stencil buffer to the list of buffers that will be cleared. The |= means "add this flag to the existing set of flags".

What is missing is a line that would reset the stencil write masks to all-ones. Because that line is absent, a page that has set stencilMask(0) can make the clear do nothing.

Relevant source files

The report lists these files as relevant:

  • third_party/angle/src/libANGLE/context_private_call.inl.h
  • third_party/angle/src/libANGLE/State.cpp
  • third_party/angle/src/libANGLE/renderer/gl/StateManagerGL.cpp
  • third_party/angle/src/libANGLE/Framebuffer.cpp
  • third_party/angle/src/libANGLE/renderer/gl/FramebufferGL.cpp
  • third_party/angle/src/libANGLE/renderer/gl/BlitGL.cpp

These are the source files in Chromium's copy of ANGLE that the researcher examined while tracing the bug. You do not need to read them to understand the issue; they are listed so that anyone fixing the bug knows where to look.

The test setup

The validation was done on a local build of Chromium 149.0.7804.0 plus dev, an ASan build from commit [redacted], running on Ubuntu 22.04.5 LTS x86_64.

A few terms here:

  • A local build is a version of Chrome compiled by the researcher from the source code, rather than downloaded as a normal installer. This lets them add debugging tools.
  • ASan stands for AddressSanitizer, a tool that watches memory accesses during a program's run and reports suspicious ones. It is used to catch memory bugs early.
  • A commit is a specific saved version of the source code, identified by a long hexadecimal string.
  • Ubuntu is a Linux distribution, and 22.04.5 LTS is the version. x86_64 is the processor architecture.

The GPU and GL renderer reported by the browser was:

Text
ANGLE (NVIDIA Corporation, NVIDIA L4/PCIe/SSE2, OpenGL 4.5.0)

This line is the browser's own description of which graphics hardware and software it is using. It says the renderer is ANGLE, running on an NVIDIA L4 graphics card, using OpenGL 4.5.0. The PCIe/SSE2 part is a technical detail of how the driver identifies itself.

The build has to run WebGL through ANGLE's GL backend on a real GPU-backed X server. An X server is the part of a Linux desktop that manages the display and input; a GPU-backed one means the graphics card is actually doing the drawing, not a software emulator.

The report notes that on this Linux/NVIDIA system the bug reproduces without any backend-forcing flags such as --use-gl=angle, --use-angle=gl, or --ignore-gpu-blocklist. A flag is an extra instruction you can add when starting a program. These particular flags would tell Chrome to use a specific graphics backend. The point is that the researcher did not need them: the default startup path already selects the ANGLE GL renderer above for WebGL on this machine. In other words, on this machine the default startup path already reaches the affected code.

Two attachments accompany the report: poc.html and [redacted].log. A PoC, short for proof of concept, is a small program that demonstrates the bug. The .log file is a recording of the output from the test run.

Reproducing the bug

The browser PoC follows a fixed sequence. It primes a fresh DEPTH24_STENCIL8 renderbuffer with stencil value 1, deletes it, syncs stencilMask(0) on a separate initialized framebuffer, then allocates a new depth-stencil attachment and triggers robust initialization on first use. Finally it uses stencil-tested drawing plus readPixels() to detect non-zero stale stencil state.

Let us unpack that sequence, because it is the heart of the attack:

  1. Prime a fresh renderbuffer. A renderbuffer is a chunk of memory the GPU can draw into. DEPTH24_STENCIL8 is a format that stores both depth and stencil information in one buffer. The PoC fills it with stencil value 1 everywhere, so the memory now contains a known pattern.
  2. Delete it. The page releases the renderbuffer. The memory is not necessarily wiped; it goes back into the pool the GPU reuses.
  3. Sync stencilMask(0) on a separate framebuffer. The page sets the stencil write mask to zero on a different, already-initialized framebuffer. This latches the zero mask into the shared GL state machine.
  4. Allocate a new depth-stencil attachment. The page asks for a new attachment. The page asks for a new attachment, and robust initialization is then triggered on first use.
  5. Trigger robust initialization on first use. ANGLE tries to clear the new attachment, but because the write mask is zero, the clear does nothing. ANGLE still marks the attachment as initialized.
  6. Detect the stale state. The page draws with a stencil test that only lets pixels through where the stencil value is non-zero, then reads the result back with readPixels(). If the primed pattern survived, the readback shows colour where it should have been blank.

Step 1: Prepare the environment

Use a Chromium build configured to run WebGL through ANGLE's GL backend on a real GPU-backed X server. No backend-forcing flags are required on the test machine. This step is just making sure the test runs on the same kind of setup where the bug was found.

Step 2: Serve the PoC locally

Bash
python3 -m http.server 8000

Line by line:

  • python3 runs the Python 3 interpreter. Python is a programming language that ships with most Linux systems.
  • -m http.server tells Python to run its built-in module called http.server. This module is a tiny web server.
  • 8000 is the port number. A port is like a numbered door on your computer that network traffic can come through. Port 8000 is a common choice for local testing.

This serves poc.html from the working directory on port 8000. In other words, the researcher's own computer becomes a mini web server so that Chrome can load the PoC page as if it were on the internet.

Step 3: Run Chromium against the PoC

The command below includes only convenience flags for profile and log hygiene; it does not force a specific GL backend:

Bash
out/asan/chrome \
  --user-data-dir=/tmp/chrome-stencil-poc \
  --no-first-run \
  --disable-background-networking \
  --disable-default-apps \
  --disable-sync \
  --metrics-recording-only \
  --enable-logging=stderr \
  'http://[redacted]:8000/poc.html?iters=2000&logEvery=50&test=nonzero'

Line by line:

  • out/asan/chrome is the path to the Chrome executable the researcher built. The out/asan part indicates it is the ASan build.
  • --user-data-dir=/tmp/chrome-stencil-poc tells Chrome to keep its profile (bookmarks, history, settings) in a separate folder. This keeps the test isolated from any normal Chrome profile on the machine.
  • --no-first-run skips the welcome screens Chrome normally shows the first time it starts.
  • --disable-background-networking stops Chrome from making background network requests, which keeps the log clean.
  • --disable-default-apps stops Chrome from installing its default apps.
  • --disable-sync turns off syncing with a Google account.
  • --metrics-recording-only limits metrics recording to the minimum.
  • --enable-logging=stderr sends Chrome's log output to the terminal's standard error stream, so the researcher can see it.
  • The final argument is the URL to open. http://[redacted]:8000/poc.html is the PoC page served by the Python server. [redacted] is the loopback address, meaning "this computer". The part after the ? is the query string, which passes settings to the page.

The URL parameters control the run: iters=2000 sets the iteration count, logEvery=50 controls how often progress is logged, and test=nonzero selects the detection mode. The --user-data-dir keeps the profile isolated, and the remaining flags suppress first-run and background behaviour so the log is clean.

Step 4: Observe the result

Text
[poc] UNMASKED_RENDERER_WEBGL=ANGLE (NVIDIA Corporation, NVIDIA L4/PCIe/SSE2, OpenGL 4.5.0)
[poc] sync FBO prepared
[poc] LEAK observed iteration=0 sum(red)=4177920

Line by line:

  • [poc] UNMASKED_RENDERER_WEBGL=ANGLE (NVIDIA Corporation, NVIDIA L4/PCIe/SSE2, OpenGL 4.5.0) confirms the renderer is the ANGLE GL backend on the NVIDIA L4. UNMASKED_RENDERER_WEBGL is a WebGL query that returns the real name of the graphics renderer, even when the browser normally hides it.
  • [poc] sync FBO prepared confirms the separate framebuffer used to latch stencilMask(0) was prepared. FBO stands for framebuffer object.
  • [poc] LEAK observed iteration=0 sum(red)=4177920 is the leak. It fires on the very first iteration, and sum(red)=4177920 is the full 128 x 128 x 255 frame. That number is the sum of the red channel across every pixel in a 128 by 128 image where every pixel has red value 255: 128 times 128 times 255 equals 4,177,920. In other words, every single pixel came back red, meaning the primed all-ones stencil pattern survived robust initialization intact and was converted into colour by the stencil-tested draw.

The report notes that on the latest Chromium main tip synced for this validation pass, the browser leak is immediate. main is the name of the main development branch of Chromium's source code. The first attempted victim allocation already produced the full-frame sum above.

poc.html also supports the exact stencilFunc(EQUAL, 1, 0xFF) mode from the minimal write-up, but the attached browser run uses the broader NOTEQUAL, 0 detection mode to maximise reliability when validating reused stencil contents. stencilFunc is the WebGL function that sets the condition for the stencil test. EQUAL, 1, 0xFF means "pass only where the stencil value equals 1, comparing all eight bits". NOTEQUAL, 0 means "pass wherever the stencil value is not zero". The broader mode catches more cases, which is why it was chosen for the browser run.

No crash is required for this issue: the crash type is listed as N/A, the crash state is N/A, and the client ID is not relevant. This is worth emphasising: many security bugs make a program crash, but this one does not. It is a silent data leak. The page simply reads back data it should not have been able to see.

Root cause

The internal clear helper in BlitGL::SetClearState() sets the stencil clear value but leaves the front and back stencil write masks untouched. Because the write mask is shared GL state that the page can set through WebGL, a page that has latched stencilMask(0) causes the internal glClear(GL_STENCIL_BUFFER_BIT) to be a no-op. A no-op is an operation that does nothing. ANGLE does not verify that the clear actually took effect, so it marks the attachment initialized regardless. The robust-initialization guarantee is therefore broken: the attachment is presented as zeroed while it still holds whatever stencil bits were there before.

Impact

An attacker-controlled WebGL page can read stencil contents that robust initialization was supposed to erase. In the demonstrated case the stale pattern is one the page itself primed, but the mechanism is a stale-content disclosure: the page obtains data from a buffer that the specification says has been initialized.

The report does not claim cross-origin or cross-process leakage beyond what the PoC shows. Cross-origin means one website reading data belonging to another; cross-process means one browser process reading another's memory. The researcher is careful not to overstate the finding. The issue is rated medium severity.

Fix

The report does not state what fix was applied. In everyday terms: before housekeeping wipes the room, it should make sure the door is actually open, rather than trusting that nobody locked it.

Variants to test

Glossary

  • ANGLE: A translation layer inside Chrome that converts WebGL commands into the graphics language the local hardware understands.
  • API: Application Programming Interface, a defined set of functions one piece of software offers to another so they can talk to each other.
  • ASan (AddressSanitizer): A debugging tool that watches memory accesses during a program's run and reports suspicious ones.
  • Attachment: One layer of a framebuffer, such as colour, depth or stencil.
  • Backend: The specific underlying graphics system that ANGLE translates into, for example the GL backend.
  • Bug bounty programme: A scheme where organisations pay researchers for responsibly reporting security flaws. Chrome's is called the Chrome VRP.
  • Clear: A graphics operation that fills a buffer with a single value, usually zero.
  • Commit: A specific saved version of source code, identified by a long hexadecimal string.
  • CVE: Common Vulnerabilities and Exposures, a public catalogue number given to a security flaw.
  • Depth buffer: A layer that stores how far away each pixel is, so the GPU knows what is in front of what.
  • Disclosure: The moment a security flaw is made public.
  • FBO (framebuffer object): A framebuffer managed as an object by the graphics API.
  • Flag: An extra instruction added when starting a program to change its behaviour.
  • Framebuffer: A temporary workspace in memory where the GPU draws before the result is shown.
  • GL / OpenGL: A standard language for talking to graphics hardware.
  • GPU: Graphics Processing Unit, the chip that does the drawing.
  • Loopback address: The address [redacted], meaning "this computer".
  • Mask: A switch that controls which bits of a buffer an operation is allowed to touch.
  • Multisampling: A technique where each pixel is sampled several times to smooth edges.
  • No-op: An operation that does nothing.
  • PoC (proof of concept): A small program that demonstrates a bug.
  • Port: A numbered door on a computer that network traffic can come through.
  • Query string: The part of a URL after the ?, used to pass settings to a page.
  • readPixels(): A WebGL function that copies pixels from the framebuffer back into JavaScript.
  • Renderbuffer: A chunk of memory the GPU can draw into.
  • Robust resource initialization: The rule that a buffer must be zeroed before a page first uses it.
  • Scissor: A rectangular clipping region; anything outside it is not drawn.
  • Severity: A rating of how serious a security flaw is, often low, medium, high or critical.
  • Sink: The exact place in code where a problem manifests.
  • Stale data: Leftover data from earlier use that should have been wiped.
  • Stencil buffer: A small per-pixel scratch area used for masking effects.
  • Stencil test: A drawing condition that only affects pixels whose stencil value matches.
  • stencilFunc: The WebGL function that sets the condition for the stencil test.
  • stencilMask: The WebGL function that sets the stencil write mask.
  • Uninitialized use: Using memory as if it had been set up properly when it still holds whatever was there before.
  • WebGL: A browser feature that lets web pages draw using the GPU.
  • Write mask: A mask that controls whether a write operation is allowed to change a buffer.
  • X server: The part of a Linux desktop that manages the display and input.

More by Mufeed VH

View all

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

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.