Uninitialized resource in GPU (CVE-2026-78986)
In the GPU process, a SharedImage was marked as cleared before the recorded clear commands were actually flushed to the GPU, and any flush failure was silently ignored. A compromised renderer could then bypass lazy-clearing checks and read back uninitialised, recycled GPU memory belonging to other origins.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
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 WebGPUDecoderImpl::ClearSharedImageWithSkia, a SharedImage is unconditionally marked as cleared before its recorded draw commands are successfully flushed to the GPU. If the subsequent Skia Ganesh or Graphite flush fails, the clear is silently dropped while the metadata incorrectly marks the image as cleared. This can potentially allow a compromised renderer to bypass lazy-clearing checks and read back uninitialized, recycled cross-origin GPU memory.
Affected files:
gpu/command_buffer/service/webgpu_decoder_impl.ccgpu/command_buffer/service/graphite_utils.cc
Estimated timestamp from git blame: 2024-05-01
Description and Root Cause
In WebGPUDecoderImpl::ClearSharedImageWithSkia (gpu/command_buffer/service/webgpu_decoder_impl.cc), the GPU process attempts to clear an uninitialized SharedImage to black. However, the backing representation is marked as cleared before the recorded draw commands are successfully flushed and executed on the GPU, and any subsequent flush/submit failures are silently ignored:
// gpu/command_buffer/service/webgpu_decoder_impl.cc
canvas->drawColor(clear_color, SkBlendMode::kSrc); // Command recorded on canvas
representation->SetCleared(); // <-- UNCONDITIONAL
if (shared_context_state_->gr_context()) {
skgpu::ganesh::Flush(surface); // Return value is discarded
} else {
GraphiteFlushAndSubmit(...); // Returns void; errors silently swallowed
}
Silent Failure Mechanics
- Graphite:
GraphiteFlushAndSubmitcallsGraphiteFlush, which callsrecorder->snap(). If the snap fails (returningnullptrdue to transient GPU memory pressure or context issues), the recording is skipped. Even ifsnap()succeeds,insertRecordingcan returnfalseon recoverable failures (e.g., command insertion failure), but this return value is discarded. The subsequentsubmit()returnstruebecause there is no pending work, resulting in a silent failure. - Ganesh: The return value from
skgpu::ganesh::Flushis discarded. Any check on the subsequent context flush is confined toDCHECKstatements, which are compiled out in production release builds.
Impact and Security Implications
If the clear commands are silently dropped, the SharedImage's state remains marked as cleared (IsCleared() == true). This successfully bypasses the safety checks in subsequent read paths (e.g., BeginScopedAccess in DawnImageRepresentation or other representations).
An attacker with a compromised renderer could potentially exploit this state desynchronization to bypass lazy-clear mechanisms, importing the uncleared SharedImage to read back recycled GPU memory containing sensitive cross-origin data (such as page contents, compositor tiles, or video frames belonging to other origins).
Potential Steps to Reproduce (Theoretical)
Note: These are suggested steps; our tooling does not currently have the capability to run or execute exploit code.
- From a compromised renderer, create an uninitialized SharedImage.
- Associate the SharedImage with WebGPU and leave it uncleared.
- Trigger dissociation via
DissociateMailboxForPresentto force the GPU process to executeClearSharedImageWithSkia. - Force GPU resource exhaustion or map large buffers to induce a transient flush failure during the Skia/Graphite recording phase.
- Re-associate the SharedImage. Since
IsCleared()returnstrue, the lazy-clear path is bypassed, potentially allowing the renderer to read back uncleared, recycled GPU memory.
Suggested Remediation
Modify ClearSharedImageWithSkia to ensure that representation->SetCleared() is only called after verifying that the flush or submit operation has succeeded.
- For Graphite, update
GraphiteFlushAndSubmit(andGraphiteFlush) to return aboolrepresenting success, and only callSetCleared()if it returnstrue. - For Ganesh, check the return value of the flush/submit operations to ensure they completed successfully before updating the clear state.
Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379
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
The clear state was set unconditionally before the flush, and the flush/submit return values were discarded, so a failed clear left the image marked as cleared.
Impact
A compromised renderer could potentially read back recycled cross-origin GPU memory such as page contents, compositor tiles or video frames; the report notes the steps are theoretical and were not executed.
What the attacker needed
Compromised renderer; ability to trigger GPU flush failure
The fix
Set the cleared state only after confirming the flush or submit succeeded, by making the Graphite flush helpers return success and checking the Ganesh flush result.
How it was found
- From a compromised renderer, create an uninitialised SharedImage.
- Associate it with WebGPU and leave it uncleared.
- Trigger dissociation so the GPU process runs the Skia clear path.
- Induce a transient flush failure through GPU resource exhaustion.
- Re-associate the image; the lazy-clear path is bypassed and old memory may be readable.
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 graphics buffer (a SharedImage) is shared between the browser's drawing code and the GPU. Before reuse it must be wiped so one page cannot see another page's leftover pixels. Here the code said 'wiped' before the wipe had actually happened, and ignored errors, so a page that already controls part of the browser could potentially read old data from other sites.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.