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

Uninitialized Use in Skia (CVE-2026-16417)

A potential logic flaw in Skia's Ganesh backend could let a compromised renderer read stale cross-origin texture data. When a fast-path readback reuses a scratch texture and the subsequent flush fails, the copy task is dropped but the readback still returns success with the old pixels.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 44 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 logic vulnerability in Skia's Ganesh backend could allow a compromised renderer to read cross-origin texture data. When executing a synchronous readback via the fast-path copy branch, Skia eagerly instantiates a scratch render target which may contain stale texture contents from another origin. If the subsequent drawing manager flush fails due to GPU memory pressure or atlas allocation issues, the copy operation is silently dropped while the readback still returns success with the stale data.

Affected files:

  • third_party/skia/src/gpu/ganesh/SurfaceContext.cpp
  • third_party/skia/src/gpu/ganesh/GrDrawingManager.cpp
  • third_party/skia/src/gpu/ganesh/ops/AtlasPathRenderer.cpp
  • third_party/skia/src/gpu/ganesh/GrResourceAllocator.cpp

Estimated timestamp from git blame: 2019-05-10

Description

A potential information disclosure vulnerability exists in Skia's Ganesh backend, specifically within SurfaceContext::readPixels. When a readback utilizes the fast-path copy branch (canvas2DFastPath or kCopyToTexture2D), Skia allocates an internal kApprox scratch render target to perform the readback. Under certain circumstances where a subsequent flush fails, this can allow a compromised renderer to read stale recycled-texture contents (cross-origin pixel bytes) from the global, shared cache instead of the correct source pixels.

Root Cause Analysis

In third_party/skia/src/gpu/ganesh/SurfaceContext.cpp:

C++
if (readFlag == GrCaps::SurfaceReadPixelsSupport::kCopyToTexture2D || canvas2DFastPath) {
    ...
    auto sfc = dContext->priv().makeSFC(
            tempInfo, "SurfaceContext_ReadPixels", SkBackingFit::kApprox);   // 1. Deferred approx RT proxy
    ...
    sfc->fillRectToRectWithFP(..., std::move(fp));                           // 2. Queues OpsTask in shared DAG
    pt = {0, 0};
    tempCtx = std::move(sfc);
    ...
    return tempCtx->readPixels(dContext, dst, pt);                           // 3. Recurse on temp surface
}

The recursive call re-enters readPixels with srcProxy equal to the temporary SFC's proxy. Because this proxy is non-lazy, it is immediately instantiated:

C++
if (!srcProxy->instantiate(dContext->priv().resourceProvider())) {
    return false;
}

Since SkBackingFit::kApprox is used, the resource provider queries the shared GrResourceCache for a matching scratch texture. Because the GrResourceCache is shared globally on the GPU thread across all renderers on the same context, the returned texture may contain another origin's last-rendered pixels.

Following instantiation, the code reaches the direct-read path:

C++
dContext->priv().flushSurface(srcProxy.get());          // 4. flushSurface() return value is IGNORED
dContext->submit();                                      // 5. submit() return value is IGNORED
if (!dContext->priv().getGpu()->readPixels(srcSurface, ..., readDst, readRB)) {
    return false;
}

When flushSurface() invokes GrDrawingManager::flush(), several gates are checked. If any GrOnFlushCallbackObject::preFlush() returns false (e.g., AtlasPathRenderer::preFlush on atlas-texture allocation failure under GPU memory pressure) or if GrResourceAllocator::assign() fails to instantiate any other co-pending lazy proxy in the shared DAG:

  • The entire executeRenderTasks() execution is skipped.
  • The drawing manager calls removeRenderTasks(), which discards all tasks in the DAG, including the attacker's queued fillRectToRectWithFP copy task.
  • flush() still returns true (signaling success but executing no tasks).

Because the copy task was discarded, the recycled scratch texture is never overwritten. The subsequent call to GrGpu::readPixels proceeds to copy the stale, recycled scratch texture contents containing the victim's cross-origin pixel bytes into the caller's shared memory buffer and reports success.

Potential Step-by-Step Attack Path

(Note: These are potential steps as our tooling does not currently have the capability to run code or compile a working PoC.)

  1. A compromised renderer causes a victim origin to perform GPU rasterization of a specific, predictable approximate size (e.g., $256 \times 256$ pixels), ensuring a dirty texture of that size is released and recycled into GrResourceCache's fScratchMap.
  2. The attacker's command buffer channel queues work in the shared DAG that is guaranteed to fail during flush (e.g., complex clipped paths targeting AtlasPathRenderer or allocating extremely large SharedImages to induce memory pressure).
  3. The attacker issues a ReadbackARGBImagePixelsINTERNAL IPC command on the raster command buffer, setting dst_sk_alpha_type to kUnpremul_SkAlphaType and dst_sk_color_type to kRGBA_8888_SkColorType to force canvas2DFastPath during readPixels.
  4. Skia's readPixels recycles the victim's scratch texture but fails to run the draw-overwrite task because the pre-flush/allocator failure aborts render task execution.
  5. The driver maps the un-overwritten GPU texture and copies the raw stale pixel data directly into the attacker's shared memory buffer, returning success.

Suggested Fix

Propagate flush execution failures or require that any temporary scratch target allocated with SkBackingFit::kApprox is explicitly zero-initialized or cleared before reading back if the associated drawing tasks were skipped. Alternatively, ensure that SurfaceContext::readPixels validates that the required render tasks successfully executed before copying data from the GPU texture.

Evaluated with Chrome root at commit: 3947e01999a53d4e2382e39736cb79d79c7dffcf


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 readback path ignores the return value of flushSurface and submit, so when the flush aborts and discards the queued copy task, the code still reads from the recycled scratch texture.

Impact

A compromised renderer could read cross-origin pixel bytes from recycled GPU textures, but the report notes the tooling has not produced a working proof of concept.

What the attacker needed

Compromised renderer; GPU memory pressure or atlas failure; shared GPU context across origins

The fix

The report suggests propagating flush failures or clearing any approximate scratch target before reading back if its drawing tasks were skipped.

How it was found

  1. A compromised renderer causes a victim origin to rasterise a predictable approximate size, releasing a dirty texture into the shared scratch cache.
  2. The attacker queues work in the shared DAG that is guaranteed to fail during flush, such as atlas allocation failure or memory pressure.
  3. The attacker issues a readback IPC command with settings that force the canvas2DFastPath.
  4. Skia recycles the victim's scratch texture but the draw-overwrite task is aborted by the pre-flush or allocator failure.
  5. The driver copies the un-overwritten stale pixel data into the attacker's shared memory buffer and reports success.

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 things on screen. When it needs a temporary image to copy pixels into, it may reuse an old one from a shared pool instead of making a fresh blank one. If the step that would overwrite that old image fails, the code still hands back the old contents, which could be pixels from another website.

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.