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

Use after free in Skia (CVE-2026-11663)

A use-after-free exists in Skia's text rendering when a glyph drawable reentrantly calls drawTextBlob, clearing the shared scratch builder storage that an outer loop is still iterating. A compromised renderer could exploit this to corrupt memory in the GPU process and potentially achieve arbitrary code execution.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 24 days

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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A potential use-after-free (UAF) vulnerability exists in Skia's text rendering pipeline when processing glyph runs with RSX forms. A reentrant call to drawTextBlob via a glyph drawable can clobber the per-canvas scratch builder storage while it is being iterated, leading to memory corruption in the GPU process.

Affected files:

  • third_party/skia/src/core/SkDevice.cpp
  • third_party/skia/include/core/SkCanvas.h
  • third_party/skia/src/text/GlyphRun.cpp
  • third_party/skia/src/core/SkCanvas.cpp
  • third_party/skia/src/text/gpu/SubRunContainer.cpp

Estimated timestamp from git blame: Unknown (Google3 checkout)

Technical Description

Root Cause Analysis

In Skia, SkCanvas manages a single fScratchGlyphRunBuilder (a std::unique_ptr<sktext::GlyphRunBuilder>) used to process text blobs and other text drawing commands. When SkCanvas::onDrawTextBlob is called, it populates this builder via blobToGlyphRunList(). This method returns a GlyphRunList where the internal runs (an SkSpan<const GlyphRun>) point directly into the builder's persistent storage, specifically the fGlyphRunListStorage vector (std::vector<GlyphRun>).

The potential vulnerability occurs in SkDevice::simplifyGlyphRunRSXFormAndRedraw (located in third_party/skia/src/core/SkDevice.cpp). This function iterates over the GlyphRunList stored in the scratch builder. Inside the iteration loop, it may call this->drawGlyphRunList(canvas, subList, paint) synchronously to render the glyphs.

If the drawing operation involves a glyph that uses a custom drawable (such as SkPictureBackedGlyphDrawable), the execution path can reentrantly call canvas->drawTextBlob(). For example, a malicious SkPicture serialized into a font strike can contain a DRAW_TEXT_BLOB command. This reentrant call on the same SkCanvas instance will use the same fScratchGlyphRunBuilder. Any call to blobToGlyphRunList() on the builder invokes prepareBuffers(), which calls fGlyphRunListStorage.clear() and may reallocate the underlying buffers.

When the reentrant call returns, the outer loop in simplifyGlyphRunRSXFormAndRedraw continues to iterate over the now-invalidated storage, leading to a Use-After-Free (UAF). An attacker who controls the contents of the reallocated memory could potentially achieve arbitrary code execution in the GPU process.

Potential Attack Path (Compromised Renderer to GPU Process)

  1. Strike Data Injection: A compromised renderer sends malicious font strike data via the raster command buffer. This strike data includes a glyph drawable serialized as an SkPicture containing a DRAW_TEXT_BLOB record.
  2. Triggering Rasterization: The renderer issues a command to draw a text blob (Blob A) using the malicious font. Blob A is designed to have multiple runs and use RSX forms to ensure the simplifyGlyphRunRSXFormAndRedraw path is taken.
  3. UAF Trigger: During rasterization in the GPU process, the iteration over Blob A's runs triggers the drawing of the malicious glyph. This reentrantly calls drawTextBlob (Blob B), which clobbers the scratch builder's storage. Subsequent iterations over Blob A's runs then access the freed memory.

Impact

This is a potential critical use-after-free vulnerability in the GPU process. Because the GPU process is unsandboxed on certain platforms such as Android, this provides a direct path for a compromised renderer to achieve higher-level privileges and potentially full system compromise.

Suggested Fix

To mitigate this issue, Skia should avoid using a persistent, shared scratch builder for text operations that can trigger reentrant drawing. Potential solutions include:

  1. Using a stack-allocated or local GlyphRunBuilder within drawTextBlob and related methods.
  2. Implementing a reentrancy guard in SkCanvas or GlyphRunBuilder to prevent modification of the scratch storage while it is being iterated.
  3. Ensuring that GlyphRunList objects used in iteration do not hold dangling references to shared builder state across synchronous drawing calls.

Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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

Likely the shared per-canvas scratch GlyphRunBuilder is cleared and reallocated by a reentrant drawTextBlob call while an outer loop still holds spans into its storage.

Impact

A compromised renderer could potentially achieve arbitrary code execution in the GPU process, which is unsandboxed on some platforms such as Android, leading to higher privileges and potentially full system compromise.

What the attacker needed

Compromised renderer process; ability to send malicious font strike data; GPU process rasterisation path

The fix

Skia should avoid a persistent shared scratch builder for reentrant-capable text drawing, for example by using a local builder, adding a reentrancy guard, or ensuring iterated GlyphRunLists do not hold dangling references.

How it was found

  1. A compromised renderer sends malicious font strike data containing a glyph drawable serialised as an SkPicture with a DRAW_TEXT_BLOB record.
  2. The renderer issues a command to draw a text blob (Blob A) using the malicious font, with multiple runs and RSX forms.
  3. During rasterisation in the GPU process, iterating Blob A's runs triggers drawing the malicious glyph.
  4. The glyph drawable reentrantly calls drawTextBlob (Blob B), which clears and may reallocate the scratch builder storage.
  5. The outer loop continues iterating Blob A's runs over the now-freed storage, causing a use-after-free.

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.

Skia is the graphics library Chrome uses to draw text and shapes. The canvas keeps a reusable scratch space for text runs; if drawing one glyph triggers another text draw, that scratch space is wiped while the first draw is still reading from it, so it reads freed memory. An attacker who already controls the renderer process could use this to run code in the more privileged GPU process.

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.