Uninitialized Use in Skia (CVE-2026-19161)
In Skia's Ganesh backend, flushSurfaces unconditionally resolves surface proxies even when the preceding flush fails, causing uninitialized or recycled cross-origin MSAA attachment data to be copied into a user-readable texture. An attacker could potentially read GPU memory residue from other origins.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 20 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: In Skia's Ganesh backend, GrDrawingManager::flushSurfaces unconditionally triggers a resolve on provided surface proxies, regardless of whether the preceding flush() call succeeded. On flush failures (e.g., due to allocator or pre-flush failures), discarded tasks leave the target marked dirty, causing recycled or uninitialized cross-origin MSAA attachment data to be copied into the user-readable single-sample texture.
Affected files:
third_party/skia/src/gpu/ganesh/GrDrawingManager.cppthird_party/skia/src/gpu/ganesh/GrRenderTask.cppthird_party/skia/src/gpu/ganesh/ops/OpsTask.cpp
Estimated timestamp from git blame: 2019-05-09
Description
There is a potential cross-origin GPU-process information disclosure vulnerability in the Skia Ganesh rendering backend of Chromium.
Root Cause
In third_party/skia/src/gpu/ganesh/GrDrawingManager.cpp, flushSurfaces() invokes resolve_and_mipmap() on the user-supplied proxies regardless of whether this->flush() succeeded:
// third_party/skia/src/gpu/ganesh/GrDrawingManager.cpp:543-546
bool didFlush = this->flush(proxies, access, info, newState);
for (GrSurfaceProxy* proxy : proxies) {
resolve_and_mipmap(gpu, proxy); // Unconditional execution
}
Inside this->flush(), the drawing manager first closes all tasks in the DAG via this->closeAllTasks() (which calls GrRenderTask::makeClosed()). During this closing phase, if any drawing operations were recorded, OpsTask::onMakeClosed() returns kTargetDirty, which triggers rtProxy->markMSAADirty() on the target proxy's render target [Cite: third_party/skia/src/gpu/ganesh/GrRenderTask.cpp:84-94].
If the flush subsequently fails—for example, due to a resource allocator instantiation failure under memory pressure or a pre-flush callback failure (such as AtlasPathRenderer::preFlush() failing to allocate atlas space)—this->executeRenderTasks() is skipped entirely, and the DAG of render tasks is discarded via this->removeRenderTasks() [Cite: third_party/skia/src/gpu/ganesh/GrDrawingManager.cpp:172-214].
Because the render tasks never ran, nothing was cleared or written to the persistent MSAA color attachment. However, because resolve_and_mipmap() runs unconditionally, it checks rtProxy->isMSAADirty() (which is true from the closed task) and executes a GPU-side resolve (vkCmdResolveImage or glBlitFramebuffer) [Cite: third_party/skia/src/gpu/ganesh/GrDrawingManager.cpp:499-504]. This copies the uninitialized or recycled cross-origin scratch MSAA buffer contents directly into the readable single-sample SharedImage texture.
Since Out-of-Process Rasterization (OOP-R) renderers share a single GrDirectContext (and hence a single GrResourceCache) in the GPU process, the recycled MSAA attachments may contain pixel data belonging to other origins.
Potential Trigger Steps
Note: These are potential steps because our tooling currently lacks the ability to execute code and verify the exploit chain with a running Proof of Concept.
- From a compromised renderer, create a SharedImage and issue
BeginRasterCHROMIUMwithmsaa_mode = gpu::raster::kMSAAandmsaa_sample_count >= 2on a platform where automatic MSAA resolve is disabled (e.g., Vulkan or plain GL). - Record draw operations (such as path drawing via
AtlasPathRenderer) to ensure theOpsTaskis marked as dirty. - Exhaust GPU resources or simulate memory pressure to induce a failure in
AtlasPathRenderer::preFlush()orGrResourceAllocator::assign()on the target flush. - Invoke
EndRasterCHROMIUM. When the GPU process handles the flush,flush()fails and removes the tasks, butresolve_and_mipmap()executes anyway. - Read back the SharedImage texture to obtain the resolved, uninitialized, or recycled cross-origin GPU memory residue.
Suggested Fix
To prevent resolving dirty surfaces when the drawing operations have been aborted, resolve_and_mipmap should only execute if this->flush() succeeded. Gate the resolve loop on the success of didFlush:
bool didFlush = this->flush(proxies, access, info, newState);
if (didFlush) {
for (GrSurfaceProxy* proxy : proxies) {
resolve_and_mipmap(gpu, proxy);
}
}
Evaluated with Chrome root at commit: bf775e5d75cb9e1767e2cd02cc93efa0077d14a5
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.
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 calls resolve_and_mipmap() without checking whether the preceding flush() succeeded, so a failed flush leaves the target marked dirty and the resolve copies uninitialized or recycled MSAA data.
Impact
An attacker could potentially read uninitialized or recycled cross-origin GPU memory residue, leading to information disclosure.
What the attacker needed
Compromised renderer; MSAA enabled with at least 2 samples; platform without automatic MSAA resolve; ability to induce GPU memory pressure
The fix
The resolve loop should only execute if this->flush() succeeded, by gating it on the didFlush boolean.
How it was found
- From a compromised renderer, create a SharedImage and issue BeginRasterCHROMIUM with MSAA enabled and at least 2 samples on a platform where automatic MSAA resolve is disabled.
- Record draw operations to ensure the OpsTask is marked as dirty.
- Exhaust GPU resources or simulate memory pressure to induce a failure in preFlush or resource allocation.
- Invoke EndRasterCHROMIUM; the flush fails and removes tasks, but resolve_and_mipmap() still executes.
- Read back the SharedImage texture to obtain the resolved uninitialized or recycled cross-origin GPU memory residue.
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 a web page draws graphics, the browser's GPU process sometimes uses temporary memory buffers. If a drawing operation fails, the code still copies data from those buffers into a place the page can read. This could let a malicious page see leftover data 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.