Insufficient validation of untrusted input in GPU (CVE-2026-17663)
A compromised renderer can supply unvalidated Vulkan YCbCr conversion metadata to the GPU process via a TransferableResource. The Ganesh-Vulkan backend fails to verify this metadata against the actual backing texture, causing Skia to bind mismatched Vulkan samplers and image views, which violates Vulkan specifications and can lead to driver-level memory corruption and a GPU sandbox escape.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 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 without the security team.
Overview: A compromised renderer can supply unvalidated Vulkan YCbCr conversion metadata to the GPU process via a TransferableResource. The Ganesh-Vulkan backend fails to verify this metadata against the actual backing texture, causing Skia to bind mismatched Vulkan samplers and image views. This violates Vulkan specifications and can lead to driver-level memory corruption and a GPU sandbox escape.
Affected files:
components/viz/service/display_embedder/image_context_impl.ccgpu/command_buffer/service/skia_utils.ccgpu/ipc/common/vulkan_ycbcr_info_mojom_traits.hservices/viz/public/mojom/compositing/transferable_resource.mojom
Estimated timestamp from git blame: 2023-05-02
Summary
There is a potential sandbox escape vulnerability in the Ganesh-Vulkan rendering path within the GPU process. When a renderer provides a TransferableResource, it can optionally include gpu.mojom.VulkanYCbCrInfo. This metadata is deserialized via Mojo without validation. While the newer Skia Graphite path correctly validates that the provided YCbCr info matches the actual backing texture, the Ganesh path skips this validation entirely.
This discrepancy allows a compromised renderer to trick Skia into creating a Vulkan rendering pipeline with an attacker-controlled VkSamplerYcbcrConversion object (e.g., using an arbitrary externalFormat), but fulfilling it with a standard texture that lacks this conversion. Binding these mismatched objects violates Vulkan specification VUID-VkWriteDescriptorSet-descriptorType-01948, leading to undefined behavior in the GPU driver and potential memory corruption in the highly privileged GPU process.
Technical Details
- Unvalidated Deserialization: A renderer can populate the
ycbcr_infofield of aTransferableResource. The Mojo traits ingpu/ipc/common/vulkan_ycbcr_info_mojom_traits.hdeserialize this data directly into agpu::VulkanYCbCrInfostruct without bounds checking or validation. - Missing Ganesh Validation: In
components/viz/service/display_embedder/image_context_impl.cc, the functionImageContextImpl::BeginAccessIfNecessaryInternalretrieves the actual fulfillment texture.- For the Graphite path, it performs a strict compatibility check (
DawnYCbCrVkDescriptorsAreCompatible) to ensure the promised YCbCr info matches the actual texture. - For the Ganesh path (the
elseblock at lines 469-476), this validation is missing. It simply accepts the texture.
- For the Graphite path, it performs a strict compatibility check (
- Promise Image Creation: Viz uses the attacker's
ycbcr_infoviaSkiaOutputSurfaceImpl::GetGrBackendFormatForTextureto create aGrBackendFormat. This format is passed toSkImages::PromiseTextureFromto create a Skia promise image. Skia uses this promised format to build the Vulkan pipeline (GrVkPipelineState), creating an immutableVkSamplerconfigured with the attacker'sVkSamplerYcbcrConversionobject. - Skia Release Build Blind Spot: When Skia fulfills the promise image during drawing, the provided
GrBackendTexturemay have a standard format (e.g., RGB with noexternalFormat). Skia'sGrSurfaceProxy::validateSurfaceattempts to check if the fulfillment format matches the promised format, but this check is wrapped inSkDEBUGCODEand is compiled out of release builds. - Vulkan Spec Violation: Skia creates a
VkImageViewfrom the fulfillment texture, which lacks theVkSamplerYcbcrConversion(because the actual texture doesn't have one). During drawing (GrVkPipelineState::setAndBindTextures), Skia binds the immutable sampler (with conversion) and theVkImageView(without conversion) into the same descriptor set. This violates Vulkan VUID-VkWriteDescriptorSet-descriptorType-01948.
Suggested Attacker Steps
(Note: These are potential steps based on code analysis; our tooling cannot yet execute a working proof of concept.)
- Compromise a renderer process.
- Create a standard shared image (e.g., RGBA8) in the GPU process.
- Construct a
viz::CompositorFramecontaining aviz::TransferableResourcethat references the standard shared image. - Populate the
ycbcr_infofield of theTransferableResourcewith crafted values, specifically targeting the 64-bitexternal_formatfield with an arbitrary or out-of-bounds value. - Submit the frame via
viz::mojom::CompositorFrameSink::SubmitCompositorFrameto a device utilizing Ganesh over Vulkan (e.g., many Android devices). - When the GPU process attempts to composite the frame, the Vulkan driver will be forced to consume the mismatched descriptors, triggering driver-level undefined behavior (e.g., out-of-bounds read/write) that the attacker can potentially shape into a full GPU process compromise.
Suggested Fix
Implement a validation check for the Ganesh branch in ImageContextImpl::BeginAccessIfNecessaryInternal (located in components/viz/service/display_embedder/image_context_impl.cc).
Before populating promise_image_textures_, the code should compare the ycbcr_info() promised by the renderer against the actual skgpu::VulkanYcbcrConversionInfo or GrBackendFormat of the backend textures retrieved from representation_scoped_read_access_. If they do not match, the access should be rejected (similar to how the Graphite branch returns false), preventing Skia from consuming mismatched Vulkan resources.
Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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 Ganesh-Vulkan path in ImageContextImpl::BeginAccessIfNecessaryInternal does not validate the renderer-supplied YCbCr info against the actual backing texture, unlike the Graphite path.
Impact
A compromised renderer could potentially cause driver-level memory corruption and escape the GPU sandbox, though the report notes that a working proof of concept has not been executed.
What the attacker needed
Compromised renderer process; device using Ganesh over Vulkan
The fix
Implement a validation check for the Ganesh branch in ImageContextImpl::BeginAccessIfNecessaryInternal to compare the promised ycbcr_info against the actual backend texture and reject mismatches.
How it was found
- Compromise a renderer process.
- Create a standard shared image (e.g., RGBA8) in the GPU process.
- Construct a CompositorFrame containing a TransferableResource that references the standard shared image.
- Populate the ycbcr_info field of the TransferableResource with crafted values, specifically targeting the 64-bit external_format field with an arbitrary or out-of-bounds value.
- Submit the frame via CompositorFrameSink::SubmitCompositorFrame to a device utilizing Ganesh over Vulkan (e.g., many Android devices).
- When the GPU process attempts to composite the frame, the Vulkan driver will be forced to consume the mismatched descriptors, triggering driver-level undefined behavior.
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 renderer process (which draws web content) can send extra information about a texture to the more privileged GPU process. The GPU process trusts this information without checking it against the real texture, so it sets up the graphics driver incorrectly. This can crash the driver or let an attacker break out of the sandbox that normally confines the renderer.
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.