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

Improper state validation in Skia (CVE-2026-91733)

An unchecked return value from flushSurfaces() in Skia's texture upload path allows a compromised renderer to bypass pixel write completion checks. Under GPU memory pressure, the queued write task can be silently discarded while the SharedImage is marked as cleared, potentially leaking uninitialized VRAM from other origins via readback.

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: An unchecked return value of flushSurfaces() in update_texture_with_pixmaps() allows a compromised renderer to bypass pixel write completion checks during texture upload under specific conditions. Under GPU memory pressure or resource allocation failure, the queued write task can be silently discarded while the SharedImage is incorrectly marked as cleared. This can lead to a potential cross-origin uninitialized VRAM leakage via command buffer readback operations.

Affected files:

  • third_party/skia/src/gpu/ganesh/GrDirectContext.cpp
  • third_party/skia/src/gpu/ganesh/SurfaceContext.cpp
  • third_party/skia/src/gpu/ganesh/GrDrawingManager.cpp
  • gpu/command_buffer/service/raster_decoder.cc

Estimated timestamp from git blame: 2021-04-02

Potential cross-origin uninitialized VRAM leakage via unchecked flushSurfaces in Ganesh

Root Cause Analysis

In third_party/skia/src/gpu/ganesh/GrDirectContext.cpp:728-732, update_texture_with_pixmaps() calls flushSurfaces() to push the queued GrWritePixelsTask to the GPU, but it discards the return value and unconditionally returns true:

C++
// third_party/skia/src/gpu/ganesh/GrDirectContext.cpp:728-732
GrSurfaceProxy* p = surfaceContext.asSurfaceProxy();
GrFlushInfo info;
context->priv().drawingManager()->flushSurfaces(
        {&p, 1}, SkSurfaces::BackendSurfaceAccess::kNoAccess, info, nullptr);
return true;      // <-- flushSurfaces() result is discarded

A previous security fix in SurfaceContext::internalWritePixels (SurfaceContext.cpp:616-621) added a checked-flush safety gate (if (!ownAllStorage)) to prevent tasks from being dropped without verification. However, this gate can be bypassed when convertAll is true.

Specifically, when a SharedImage is created with surface_origin = kBottomLeft_GrSurfaceOrigin (which is renderer-controlled), it forces flip = true and convertAll = true in SurfaceContext.cpp:540-546. During level allocation, the conversion path is always taken, leaving ownAllStorage as true (its default initialized state). As a result, the checked-flush gate in internalWritePixels is skipped, returning true with the GrWritePixelsTask still queued in the shared DAG. The only flush of that task is the caller-side flushSurfaces() at GrDirectContext.cpp:730, whose result is discarded.

If the GPU process is primed under memory pressure (or manipulated allocation limits), GrDrawingManager::flush() will set flushSuccessful = false and unconditionally drop every queued task (via removeRenderTasks()) when preFlush() or resourceAllocator.failedInstantiation() fails.

Because updateBackendTexture and FlushWriteAccess both return true to the command buffer decoder, DoWritePixelsINTERNAL marks the SharedImage as fully cleared/initialized (SetClearedRect). However, since the write task was silently discarded on the GPU, the backing texture still contains uninitialized VRAM. The compromised renderer can then issue ReadbackARGBImagePixelsINTERNAL to read back this uninitialized VRAM (which may contain residual rendering contents from other origins).

Note: The following steps are potential/theoretical paths based on manual code inspection; our tooling does not currently have the capability to compile or execute a functional proof-of-concept.

Potential Trigger Steps

  1. SharedImage Allocation: From a compromised renderer, create a SharedImage with surface_origin = kBottomLeft_GrSurfaceOrigin and use flags SHARED_IMAGE_USAGE_RASTER | SHARED_IMAGE_USAGE_READ. Do not clear it.
  2. DAG Context Poisoning: Issue several complex RasterCHROMIUM command buffer draws (utilizing complex path/clip operations) to force the shared GrDirectContext's AtlasPathRenderer to queue an atlas task.
  3. Trigger Allocation Failure: Exhaust GPU resources (e.g., allocating many large temporary SharedImages) so that subsequent instantiate() or allocation attempts in Skia's drawing manager fail.
  4. Direct Write Upload: Send a WritePixelsINTERNAL command targeting the first mailbox with source attributes matching the destination exactly, forcing the decoder to choose the direct texture upload path.
  5. VRAM Readback: Issue ReadbackARGBImagePixelsINTERNAL on the mailbox. Since the SharedImage was marked cleared but never actually written to on the GPU, the readback returns uninitialized GPU memory containing cross-origin pixel residues.

Suggested Fix

The return value of flushSurfaces() in update_texture_with_pixmaps() must be checked. If the flush fails, the function should return false to propagate the write failure back to the command buffer decoder and prevent the SharedImage from being marked as cleared:

C++
// third_party/skia/src/gpu/ganesh/GrDirectContext.cpp:728-732
GrSurfaceProxy* p = surfaceContext.asSurfaceProxy();
GrFlushInfo info;
GrSemaphoresSubmitted result = context->priv().drawingManager()->flushSurfaces(
        {&p, 1}, SkSurfaces::BackendSurfaceAccess::kNoAccess, info, nullptr);
return result == GrSemaphoresSubmitted::kYes;

Evaluated with Chrome root at commit: 94d9235ebe3b7276e5284f0dc5d55577ff949908


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 return value of flushSurfaces() is discarded in update_texture_with_pixmaps(), so a failed flush is not propagated and the SharedImage is marked as cleared even though the write task was dropped.

Impact

A compromised renderer could potentially read uninitialized VRAM containing cross-origin pixel residues, but the report notes the steps are theoretical and no proof-of-concept was compiled or executed.

What the attacker needed

Compromised renderer; GPU memory pressure or allocation failure; specific SharedImage origin and flags

The fix

The return value of flushSurfaces() should be checked and a failed flush should return false so the write failure propagates and the SharedImage is not marked as cleared.

How it was found

  1. Create a SharedImage with a bottom-left surface origin and raster/read usage, without clearing it.
  2. Issue complex raster draws to force an atlas task into the shared drawing context.
  3. Exhaust GPU resources so later allocation attempts fail.
  4. Send a direct write-pixels command targeting the first mailbox with matching source attributes.
  5. Read back pixels from the mailbox to obtain uninitialized GPU memory.

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 browser's graphics system sometimes writes pixels into GPU memory. This report says a failure during that write can be ignored, so the browser thinks the memory is filled with the new image when it is actually still holding old data. A malicious page could then read that leftover memory, which might contain pixels from other websites.

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.