Inappropriate implementation in Skia (CVE-2026-9892)
A missing guard in Skia's Vulkan backend allows invalid command sequences when operating on externally-managed command buffers. In Android WebView, an attacker-controlled renderer could exhaust the glyph atlas to force an inline upload, potentially causing driver-level memory corruption in the unsandboxed browser process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 12 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 missing logic guard in Skia's Vulkan backend can cause invalid command sequences when operating on externally-managed command buffers. In Android WebView, this leads to driver-level undefined behavior within the unsandboxed browser process. An attacker-controlled renderer could potentially trigger this by exhausting the glyph atlas to force an inline upload.
Affected files:
third_party/skia/src/gpu/ganesh/vk/GrVkOpsRenderPass.cppthird_party/skia/src/gpu/ganesh/vk/GrVkCommandBuffer.cppthird_party/skia/src/gpu/ganesh/vk/GrVkRenderTarget.cpp
Estimated timestamp from git blame: 2019-09-05
Summary
A logic error in GrVkOpsRenderPass::inlineUpload in Skia's Ganesh Vulkan backend allows for invalid Vulkan command sequences when drawing into a wrapped secondary command buffer. The method fails to check if it is operating on an externally-owned buffer before attempting to end it and submit it. This results in multiple Vulkan specification violations (VUIDs) and potential driver-level memory corruption.
Root Cause
In third_party/skia/src/gpu/ganesh/vk/GrVkOpsRenderPass.cpp, the inlineUpload method lacks a wrapsSecondaryCommandBuffer() guard. Other methods that interact with secondary command buffers, such as submit() and onEnd(), correctly include this check to prevent improper operations on buffers owned by external systems (like Android's HWUI).
void GrVkOpsRenderPass::inlineUpload(GrOpFlushState* state, GrDeferredTextureUploadFn& upload) {
if (!fCurrentRenderPass) { ...; return; }
if (fCurrentSecondaryCommandBuffer) {
// Missing wrapsSecondaryCommandBuffer() check here
fCurrentSecondaryCommandBuffer->end(fGpu);
fGpu->submitSecondaryCommandBuffer(std::move(fCurrentSecondaryCommandBuffer));
}
fGpu->endRenderPass(fRenderTarget, fOrigin, fBounds);
state->doUpload(upload, true);
this->addAdditionalRenderPass(false);
}
When wrapsSecondaryCommandBuffer() is true, the following sequence of invalid operations occurs in release builds:
- Invalid
vkEndCommandBuffer: Skia callsend()on a secondary command buffer it does not own. - VUID-vkCmdExecuteCommands-pCommandBuffers-00100: Skia's primary command buffer attempts to execute the secondary buffer without an active render pass.
- VUID-vkCmdEndRenderPass-renderpass: Skia attempts to end a render pass on its primary command buffer despite no render pass being active on that buffer.
- State Corruption:
addAdditionalRenderPass(false)proceeds despite being invalid for external render targets, leading to further desynchronization of the Vulkan state machine.
Potential Attack Path
This issue is particularly relevant to Android WebView, where GPU operations run within the unsandboxed browser process. A potential attack could proceed as follows:
- A compromised renderer process saturates the
GrDrawOpAtlas(e.g., by sending a flood of unique glyphs or small textures). - This forces an
inlineUploadto occur within the root render pass. - In the context of WebView, the root render pass often uses a wrapped secondary command buffer provided by the Android framework.
- The missing guard causes the invalid Vulkan command sequence described above, leading to driver-level undefined behavior.
- Because the GPU thread in this context is unsandboxed, an attacker might leverage the resulting memory corruption to achieve code execution in the browser process.
Suggested Fix
Add a wrapsSecondaryCommandBuffer() guard to GrVkOpsRenderPass::inlineUpload to match the logic used in submit(). If the pass wraps a secondary command buffer, the method should handle the upload without attempting to end the current command buffer or the primary render pass record.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
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 inlineUpload method lacks a wrapsSecondaryCommandBuffer() guard, so it ends and submits a secondary command buffer it does not own.
Impact
An attacker might leverage the resulting memory corruption to achieve code execution in the unsandboxed browser process.
What the attacker needed
Compromised renderer process; Android WebView; Vulkan backend
The fix
Add a wrapsSecondaryCommandBuffer() guard to inlineUpload to match the logic used in submit().
How it was found
- A compromised renderer process saturates the GrDrawOpAtlas with unique glyphs or small textures.
- This forces an inlineUpload to occur within the root render pass.
- In WebView, the root render pass often uses a wrapped secondary command buffer from the Android framework.
- The missing guard causes invalid Vulkan command sequences, leading to driver-level undefined behaviour.
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 a graphics library used by Chrome and Android to draw things on screen. It can use Vulkan, a low-level graphics API, to send commands to the GPU. A missing check means Skia sometimes tries to control a command buffer that belongs to another part of the system, which can confuse the GPU driver and potentially lead to memory corruption.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.