Uninitialized resource in Dawn (CVE-2026-113322)
A logic bug in Dawn's Vulkan backend marks a destination texture as initialized before a fallible temporary buffer allocation. If the allocation fails with a validation error, the device stays alive but the texture remains marked initialized, so later reads skip lazy-clearing and may expose uninitialized GPU memory to a web page.
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: A logic bug in Dawn's Vulkan backend prematurely commits a destination texture's initialization state before a fallible temporary buffer allocation. If the allocation fails with a validation error, the device remains alive but the texture is permanently marked initialized. Subsequent reads from this texture bypass lazy-clearing, potentially exposing uninitialized cross-origin GPU memory to a web page.
Affected files:
third_party/dawn/src/dawn/native/vulkan/CommandBufferVk.cppthird_party/dawn/src/dawn/native/Texture.cpp
Estimated timestamp from git blame: Unknown (Google3 checkout)
1. Summary of the Issue (Meant for Human Triage)
A potential logic error in Dawn's Vulkan backend allows web pages to read uninitialized GPU memory. When executing a CopyTextureToTexture command, the destination texture's subresources are persistently marked as initialized (via state tracking in TextureBase) before verifying and running the fallible temporary-buffer-based copy workaround (RecordCopyImageWithTemporaryBuffer).
If the texture copy requires a temporary buffer whose size exceeds the WebGPU maximum buffer size limit (maxBufferSize, default 256 MiB), the internal CreateBuffer call fails and throws a validation-typed error (InternalErrorType::Validation). Because Dawn's error handler (DeviceBase::HandleError) permits validation errors without escalating to a "device-lost" state, the device remains alive and fully functional. However, the destination texture's poisoned initialization bit is already committed and persists despite the copy operation failing.
Subsequently, when JavaScript requests to copy from this destination texture into a mappable buffer, Dawn's lazy-clearing guard (EnsureSubresourceContentInitialized) reads the poisoned bit, falsely believes the texture is already initialized, and bypasses the ClearTexture operation. The backend then copies raw, uninitialized VkDeviceMemory from the driver directly into a buffer accessible to JavaScript. Because large allocations bypass the local suballocator and map directly to dedicated physical memory allocations, the leaked contents are highly likely to contain stale data from other WebGL/WebGPU contexts or system compositors, representing a High severity (S1) cross-origin GPU-memory disclosure.
Note: This sequence has been meticulously traced through the Chromium/Dawn codebase statically; tooling currently lacks the capability to execute a live Proof of Concept, so this is flagged as a potential vulnerability based on code auditing.
2. Proof-of-Concept & Detailed Execution Flow
The following is a potential step-by-step execution flow an attacker could use to trigger this vulnerability, mapping directly to confirmed codebase paths:
-
Attacker Setup: The attacker requests a Vulkan-backend WebGPU device (the default on Android, Linux, and ChromeOS) via
navigator.gpu.requestDevice(). They request a compressed texture feature (e.g.,'texture-compression-bc'or'texture-compression-astc') and retain the default device limits (maxBufferSize= 256 MiB). -
Source and Destination Texture Creation: The attacker creates a large compressed source texture (
src), e.g., size[4092, 4092, 65],mipLevelCount: 2. The virtual size of mip level 1 is 2046x2046, but its physical size is 2048x2048 due to block alignment. They also create a destination texture (dst), size[2048, 2048, 65], 1 mip level (physical size 2048x2048). -
Source Initialization: The attacker writes a small amount of data to
srcatmipLevel: 1usingqueue.writeTexture()to pre-initialize it, avoiding later lazy-clearing complications. -
Command Encoding and Frontend Validation: The attacker issues a
copyTextureToTexturecommand fromsrc(mip 1) todst(mip 0) with acopySizeof[2048, 2048, 65]. Inthird_party/dawn/src/dawn/native/CommandValidation.cpp:474-503,ValidateTextureCopyRangechecks the copy size against the physical size of the textures (2048x2048 for both). Validation passes. -
Premature Commit of Initialized Tracking: In the backend (
third_party/dawn/src/dawn/native/vulkan/CommandBufferVk.cpp:1300-1307), Dawn checks if the entire subresource is being copied. Because thecopySizematches the destination physical size, it immediately marks it as initialized:C++ if (IsCompleteSubresourceCopiedTo(dst.texture.Get(), copy->copySize, dst.mipLevel, dst.aspect)) { // Since destination texture has been overwritten, it has been "initialized" dst.texture->SetIsSubresourceContentInitialized(true, dstRange); // ← Persistent commit! } -
Divergent Physical/Virtual Size Workaround: For compressed formats, if physical extents differ from virtual extents, Dawn forces a temporary buffer copy (
CommandBufferVk.cpp:1336-1340).HasSameTextureCopyExtentreturnsfalsebecause the clamped virtual extent forsrc(2046) does not matchdst(2048). -
Fallible Internal Allocation: At
CommandBufferVk.cpp:1358-1359,RecordCopyImageWithTemporaryBufferis called, attempting to instantiate a temporary buffer. The required buffer size for a 2048x2048x65 BC7 copy is512 * 512 * 65 * 16 = 272,629,760bytes (~272.6 MiB).C++ uint64_t tempBufferSize = blockInfo.ToBytes(widthInBlocks * heightInBlocks * copySize.depthOrArrayLayers); ... DAWN_TRY_ASSIGN(tempBufferBase, device->CreateBuffer(&tempBufferDescriptor)); -
Validation-Typed Error Propagation: Inside
DeviceBase::CreateBuffer, validation occurs viaValidateBufferDescriptor(third_party/dawn/src/dawn/native/Buffer.cpp:409-414). BecausetempBufferSize(~272.6 MiB) exceedsmaxBufferSize(256 MiB), validation fails:C++ uint64_t maxBufferSize = device->GetLimits().v1.maxBufferSize; DAWN_INVALID_IF(descriptor->size > maxBufferSize, ...); // Returns InternalErrorType::Validation -
Device Kept Alive: The error propagates to
QueueBase::APISubmit, which callsDeviceBase::ConsumeError. AtDeviceBase::HandleError(Device.cpp:664-685), the error is evaluated:C++ InternalErrorType allowedErrors = InternalErrorType::Validation | additionalAllowedErrors; if (!(allowedErrors & type)) { type = InternalErrorType::DeviceLost; // Not reached for Validation errors! }The GPU device stays alive. However, Dawn possesses no state-rollback mechanism for command recording failures. The destination texture has its
mIsSubresourceContentInitializedAtIndexbit permanently set totruedespite never being written to. -
Lazy-Clear Bypass (Read Path): The attacker requests to read the
dsttexture into a mappable buffer (rb) viacopyTextureToBuffer. During command execution, Dawn evaluatesEnsureSubresourceContentInitializedatTextureVk.cpp:1393-1404:
if (!IsSubresourceContentInitialized(range)) {
DAWN_TRY(ClearTexture(recordingContext, range, TextureBase::ClearValue::Zero));
}
Because the state was poisoned to true during the previous aborted transaction, this returns without clearing. vkCmdCopyImageToBuffer executes, pulling stale GPU memory directly from the uninitialized VkDeviceMemory into the user-space destination buffer.
Suggested Fix
Refactor CommandBufferVk::RecordCommands for Command::CopyTextureToTexture so that the destination texture's initialization tracking (SetIsSubresourceContentInitialized(true, dstRange)) is only committed after all fallible operations (such as RecordCopyImageWithTemporaryBuffer) have successfully completed. Alternatively, implement a transaction or rollback mechanism that safely reverts mIsSubresourceContentInitializedAtIndex mutations if a DAWN_TRY fails during command recording.
3. Technical Verification Details (Automated Audit Logs - Reviewers may skip this section)
Prior Critic Verdict: "The vulnerability demonstrates a WebGPU logic bug in Dawn's Vulkan backend that leads to an uninitialized GPU-memory read. In
CommandBufferVk::RecordCommands,SetIsSubresourceContentInitialized(true)is prematurely committed on the destination texture before calling a fallible helper,RecordCopyImageWithTemporaryBuffer. If this copy requires a temporary buffer that exceedsmaxBufferSize(e.g., ~272 MiB > 256 MiB default), the helper fails withInternalErrorType::Validation. Crucially,DeviceBase::HandleErrorexplicitly allowsValidationerrors, meaning the device is not lost, but the poisonedmIsSubresourceContentInitializedAtIndexstate persists on the texture object. A subsequentcopyTextureToBufferoperation on this texture will see the subresources as initialized and skipLazyClearResourceOnFirstUse, proceeding to copy raw, uninitializedVkDeviceMemorybytes into a mappable buffer accessible by JavaScript. ... Therefore, the vulnerability is rated High (S1)."
Codebase Verification Ledger:
- Premature Commit: Confirmed at
third_party/dawn/src/dawn/native/vulkan/CommandBufferVk.cpp:1300-1303.dst.texture->SetIsSubresourceContentInitialized(true, dstRange)happens statically before thecopyUsingTemporaryBufferfallback. - Virtual/Physical Mismatch Fallback: Confirmed at
CommandBufferVk.cpp:1336-1340.!HasSameTextureCopyExtent(src, dst, copy->copySize)triggers when source and destination clamped virtual extents differ, whichUtilsVulkan.cpp:205-223dictates for mip level block alignments. - Fallible Helper Execution: Confirmed at
CommandBufferVk.cpp:1358viaDAWN_TRY(RecordCopyImageWithTemporaryBuffer(recordingContext, src, dst, copy->copySize));. - Buffer Limit Rejection: Confirmed at
third_party/dawn/src/dawn/native/Buffer.cpp:409-411.DAWN_INVALID_IF(descriptor->size > maxBufferSize, ...)correctly triggersInternalErrorType::Validation. - Device-Lost Evasion: Confirmed at
third_party/dawn/src/dawn/native/Device.cpp:679-681.InternalErrorType allowedErrors = InternalErrorType::Validation | additionalAllowedErrors;prevents escalation of validation errors toDeviceLost. - Lazy-Clear Bypass: Confirmed at
third_party/dawn/src/dawn/native/vulkan/TextureVk.cpp:1393-1404.Texture::EnsureSubresourceContentInitializedrelies strictly onIsSubresourceContentInitialized(range), returning{}without dispatchingClearTextureif previously poisoned. - Allocation Boundary: Verified in
third_party/dawn/src/dawn/native/vulkan/ResourceMemoryAllocatorVk.cpp:198that resources overmMaxSizeForSuballocation(typically 4MB) fall back to directvkAllocateMemory, validating the cross-origin exposure assumption. - Environmental Assumptions: Assumes WebGPU implementation running the Vulkan backend (default for Linux, ChromeOS, Android). Assumes BC/ASTC texture compression features are supported by the GPU.
Evaluated with Chrome root at commit: b96d2ec58f4f5f92b540a723966b199d6e9951b4
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 destination texture's initialized flag is set before a fallible temporary-buffer copy, and there is no rollback when that copy fails with a validation error.
Impact
A web page could read uninitialized GPU memory that may contain stale data from other WebGL/WebGPU contexts or system compositors, but the report is based on static code analysis and no live proof of concept was executed.
What the attacker needed
WebGPU with Vulkan backend; compressed texture feature support; default maxBufferSize limit
The fix
The destination texture's initialization tracking should only be committed after all fallible operations succeed, or a rollback mechanism should revert the flag if a DAWN_TRY fails.
How it was found
- Request a Vulkan-backend WebGPU device with a compressed texture feature and default limits.
- Create a large compressed source texture and a destination texture with mismatched virtual and physical sizes.
- Write a small amount of data to the source texture to pre-initialize it.
- Issue a copyTextureToTexture command from the source to the destination that passes frontend validation.
- The copy requires a temporary buffer larger than maxBufferSize, so the internal buffer creation fails with a validation error.
- The device stays alive, the destination texture remains marked initialized, and a later copyTextureToBuffer reads uninitialized GPU memory.
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 uses WebGPU to copy textures, the browser normally clears new textures to zero before letting the page read them, to avoid leaking old data. This report says a bug can mark a texture as 'already cleared' even though the copy failed, so the page might read leftover memory from other programs. The report is based on reading the code, not on running an actual attack.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.