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

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

Skia Graphite's multi-phase atlas regeneration incorrectly stamps the atlas generation without re-validating earlier glyphs, so a cached PaintRecord can cause stale UVs to be sampled. A compromised renderer could leak cross-origin glyph masks from the shared text atlas.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 50 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: Skia Graphite's multi-phase atlas regeneration incorrectly updates its generation stamp without re-validating previously placed glyphs, leading to stale UVs. A compromised renderer can trigger this by caching a PaintRecord to repeatedly draw the same GlyphData object on the shared GPU recorder. This forces a fast-path bypass that samples stale UV coordinates, potentially leaking cross-origin glyph masks from the shared text atlas.

Affected files:

  • third_party/skia/src/gpu/graphite/text/GlyphData.cpp
  • third_party/skia/src/gpu/graphite/text/GlyphData.h

Estimated timestamp from git blame: Unknown (Google3 checkout)

1. Summary of the Issue (Meant for Human Triage)

A potential logic vulnerability exists in Skia Graphite's GlyphData::regenerateAtlas implementation (third_party/skia/src/gpu/graphite/text/GlyphData.cpp), which handles multi-phase text atlas generation. When an initial attempt to place glyphs exhausts the atlas, the operation suspends and resumes in a subsequent phase (begin > 0). If this resumed phase completes successfully, the code incorrectly stamps the GlyphData's fAtlasGeneration with the post-eviction atlas generation without re-validating the glyphs placed during the earlier phases. Crucially, earlier glyphs may have been evicted during the resumed phase.

Because this breaks the fAtlasGeneration == currentAtlasGen invariant, any subsequent draw of the exact same GlyphData object erroneously takes a fast path that skips hasGlyph liveness checks, emitting stale UV coordinates pointing to recycled atlas plots.

While a standard DrawSlugOp deserializes fresh per raster and prevents GlyphData reuse, an attacker in a compromised renderer can bypass this constraint. By embedding the DrawSlugOp inside a PaintShader of type kPaintRecord, the attacker can force the GPU process to cache the resulting SkPicture (and its underlying Slug/GlyphData). Because RasterDecoderImpl::DoRasterCHROMIUM inadvertently defaults enable_security_constraints to false during paint op deserialization, the GPU process permits the kPaintRecord type. Drawing this cached shader multiple times triggers the Skia fast-path flaw on the shared gpu_main_graphite_recorder_. This allows the attacker to sample from recycled text atlas plots populated by victim origins, leading to a cross-origin GPU-memory disclosure (SOP-bypass read primitive).

2. Proof-of-Concept & Detailed Execution Flow

Note: The following steps describe a potential attack sequence. Our tooling agent does not have the ability to run code to produce a live proof-of-concept, but this trace is confirmed against the source code.

  1. Attacker Payload Construction: A compromised renderer constructs a PaintOpBuffer IPC message intended for Out-Of-Process Rasterization (OOP-R). The buffer contains a DrawRectOp utilizing a PaintFlags object configured with a PaintShader.
  2. Nested PaintRecord: The attacker sets the PaintShader type to PaintShader::Type::kPaintRecord and provides a custom shader_id. Inside this PaintRecord, the attacker embeds a DrawSlugOp containing an sktext::gpu::Slug with a massive number of distinct glyphs (gc). The count gc is chosen to exceed the capacity of all plots on all pages of the Graphite text atlas.
  3. Missing Security Constraints: The IPC is received by RasterDecoderImpl::DoRasterCHROMIUM (gpu/command_buffer/service/raster_decoder.cc). It calls cc::PaintOp::Deserialize, which instantiates a PaintOpReader. Because RasterDecoderImpl does not explicitly provide the enable_security_constraints argument, it defaults to false (cc/paint/paint_op_reader.h:56).
  4. Deserialization and Caching: In PaintOpReader::Read (cc/paint/paint_op_reader.cc:697), the kPaintRecord type is accepted because enable_security_constraints_ is false. The reader calls PaintShader::ResolveSkObjects(), which uses ToSkPicture to play back the PaintRecord into an SkPicture. This SkPicture inherently retains the deserialized Slug object. PaintOpReader then caches this SkPicture on the GPU process via options_.transfer_cache->CreateLocalEntry using the attacker's shader_id.
  5. Phase-1 Atlas Generation: The first draw rasterizes the DrawRectOp, evaluating the cached SkPicture and calling Device::drawAtlasSubRun. This invokes GlyphData::regenerateAtlas(0, gc). fAtlasGeneration is kInvalidGeneration, forcing the slow path. Glyphs [0, k) fill the atlas, and their plots are marked with flush token T1. Glyph k fails (kTryAgain). regenerateAtlas returns {true, k}.
  6. Inter-Phase Flush: Device::drawAtlasSubRun flushes tracked devices, advancing the global flush token from T1 to T2 (third_party/skia/src/gpu/graphite/Recorder.cpp:650).
  7. Phase-2 Atlas Generation: regenerateAtlas(k, gc) is called for the resumed phase. At GlyphData.cpp:60, fBulkUseUpdater.reset() unconditionally discards the Phase-1 plot tracking. Placing glyph k triggers an LRU eviction. Plot P, holding the early [0, k) glyphs, has lastUseToken T1 < T2, so it is evicted and recycled. The global atlas generation increments to G2.
  8. Stale UV Generation Stamp: The Phase-2 loop completes. At GlyphData.cpp:86-89, because begin + glyphsPlacedInAtlas == gc, the code incorrectly stamps fAtlasGeneration with G2 (the post-eviction generation) without re-validating the [0, k) glyphs. Their GlyphEntry::fAtlasLocator coordinates now point to stale UVs in the recycled Plot P.
  9. Victim Rendering: A victim origin (sharing the global gpu_main_graphite_recorder_) draws text. Its glyph masks are placed into the recycled Plot P. The atlas generation remains G2.
  10. Fast-Path Trigger: The attacker sends a second PaintOpBuffer referencing the same shader_id. PaintOpReader looks up the cache and assigns the exact same SkPicture (ref.sk_cached_picture_ = entry->shader()->sk_cached_picture_).
  11. Cross-Origin Leak: Rasterizing the second draw invokes regenerateAtlas(0, gc) on the same GlyphData object. Because fAtlasGeneration == G2 == currentAtlasGen, it takes the fast path (GlyphData.cpp:93-101), bypassing the hasGlyph check for the [0, k) glyphs. GlyphData::fillInstanceData reads the stale UVs (glyph.entry().fAtlasLocator.getUVs()), sampling the victim's glyph masks from Plot P. The attacker reads the composited surface (getImageData()), achieving a cross-origin text leak.

Suggested Fix

  1. Skia (Graphite): In third_party/skia/src/gpu/graphite/text/GlyphData.cpp:86-89, gate the fAtlasGeneration stamp on begin == 0 (so it only stamps if the entire run was validated in a single pass). Alternatively, re-run the hasGlyph check over [0, begin) before updating fAtlasGeneration. Also, at GlyphData.cpp:60, gate fBulkUseUpdater.reset() on begin == 0 so tracking accumulates across resumed phases.
  2. Chromium (cc/paint): In gpu/command_buffer/service/raster_decoder.cc, DoRasterCHROMIUM should explicitly pass enable_security_constraints = true when constructing the cc::PaintOp::DeserializeOptions or invoking cc::PaintOp::Deserialize, matching the strict constraints enforced elsewhere for untrusted IPC.

3. Technical Verification Details (Automated Audit Logs - Reviewers may skip this section)

The vulnerability report accurately identifies a logic flaw in Skia Graphite's GlyphData::regenerateAtlas during a multi-phase atlas regeneration. When resuming at begin > 0, it incorrectly stamps fAtlasGeneration with the post-eviction generation without re-validating the earlier glyphs. This causes subsequent redraws taking the fast path to use stale atlas UVs. ... Since gpu_main_graphite_recorder_ is shared across all origins/decoders, this bug causes the GPU to sample stale UVs from a recycled plot containing another origin's glyph masks. The attacker can extract these masks via getImageData(). Per the severity guidelines, a cross-origin GPU-memory disclosure (SOP-tier read primitive) from a compromised renderer is High (S1) severity.

Codebase Investigator Verification Ledger:

  • Missing Security Constraints: Checked PaintOpBuffer::Deserialize -> PaintOp::DeserializeIntoPaintOpBuffer -> PaintOpReader constructor. Verified in cc/paint/paint_op_reader.h:56 that enable_security_constraints defaults to false. Verified in gpu/command_buffer/service/raster_decoder.cc:2958-3100 that DoRasterCHROMIUM does not pass true for this parameter when invoking paint_op_buffer->Deserialize.
  • PaintRecord Serialization Bypass: Checked cc/paint/paint_op_reader.cc:697. The check if (enable_security_constraints_ && shader_type == PaintShader::Type::kPaintRecord) is bypassed because enable_security_constraints_ is false.
  • Transfer Cache / SkPicture Persistence: Checked cc/paint/paint_op_reader.cc:886-901. ResolveSkObjects compiles the PaintRecord into sk_cached_picture_ via ToSkPicture (cc/paint/paint_shader.cc:587). The reader caches this via options_.transfer_cache->CreateLocalEntry(shader_id, ...). Re-reads using the same shader_id fetch the identical SkPicture containing the Slug object.
  • Skia Multi-Phase Flaw: Verified third_party/skia/src/gpu/graphite/text/GlyphData.cpp:57-102. The reset fBulkUseUpdater.reset() runs unconditionally at :60. The stamp fAtlasGeneration = atlasManager->atlasGeneration(maskFormat) runs at :89 even if begin > 0. The fast path at :93-101 unconditionally returns without hasGlyph validation. Stale UVs are sampled at :130 via fAtlasLocator.getUVs().
  • Cross-Origin Recorder: Verified gpu/command_buffer/service/raster_decoder.cc:636-638 and shared_context_state.h:369 that gpu_main_graphite_recorder_ is shared across all decoders/origins, validating the SOP bypass vector.

Original Evidence File Citations (Preserved for Reference):

  • third_party/skia/src/gpu/graphite/text/GlyphData.cpp:57-90 (fBulkUseUpdater.reset() and fAtlasGeneration assignment logic).
  • third_party/skia/src/gpu/graphite/Device.cpp:1443-1482 (multi-phase loop and flushTrackedDevices).
  • third_party/skia/src/gpu/graphite/DrawAtlas.cpp:273-308 (eviction logic and plot recycling).
  • TextAtlasManager.h:31 (lack of PlotEvictionCallback).

Evaluated with Chrome root at commit: 1e8af8af71d04992e29233209225cfdbeeb42672


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 code sets the atlas generation stamp after a resumed placement phase without checking that glyphs from earlier phases are still present, and it resets the bulk-use tracker unconditionally.

Impact

A compromised renderer could read cross-origin glyph masks from the shared GPU text atlas, bypassing the same-origin policy; the report notes this is a potential issue and the proof-of-concept was not run.

What the attacker needed

Compromised renderer; ability to send crafted IPC to GPU process

The fix

The report suggests gating the atlas generation stamp and the bulk-use reset on begin == 0, or re-validating earlier glyphs, and explicitly enabling security constraints in DoRasterCHROMIUM.

How it was found

  1. A compromised renderer builds a PaintOpBuffer containing a DrawRectOp with a PaintShader of type kPaintRecord.
  2. Inside the PaintRecord it embeds a DrawSlugOp with more glyphs than the atlas can hold.
  3. The GPU process deserialises the buffer with security constraints disabled, so the kPaintRecord shader is accepted and cached as an SkPicture.
  4. The first draw triggers multi-phase atlas regeneration; during the resumed phase an eviction recycles the plot holding the early glyphs.
  5. The code stamps the new atlas generation without re-validating those early glyphs, leaving stale UVs.
  6. A second draw using the same cached shader takes the fast path and samples the recycled plot, which may contain another origin's glyph masks.

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 text is drawn, its shapes are stored in a shared GPU texture atlas. A logic error means that after the atlas is reorganised, some old coordinates are not updated, so a malicious page could read pixels that belong to another site's text.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

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.