Uninitialized Use in Dawn (CVE-2026-7924)
Dawn tracks 3D texture initialisation per mip level rather than per depth slice, so storing to one slice marks the whole level as initialised. An attacker could then copy from an untouched slice and read uninitialised GPU memory.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 30 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 without the security team.
Overview: Dawn tracks the initialization state of 3D textures at the mip-level granularity, using a single bit for all depth slices. When a render pass targets a single depth slice of a 3D texture with a 'store' operation, Dawn erroneously marks the entire mip level as initialized. This bypasses lazy-clearing for the other slices, potentially allowing an attacker to read uninitialized GPU memory.
Affected files:
third_party/dawn/src/dawn/native/CommandBuffer.cppthird_party/dawn/src/dawn/native/Texture.cppthird_party/dawn/src/dawn/native/Subresource.hthird_party/dawn/src/dawn/native/CommandEncoder.cpp
Estimated timestamp from git blame: 2023-09-13
Overview
Dawn's internal tracking for subresource initialization (mIsSubresourceContentInitializedAtIndex) lacks the granularity to track individual depth slices of 3D textures. When a WebGPU render pass targets a specific depth slice of a 3D texture and stores the result, Dawn incorrectly records the entire mip level (all depth slices) as initialized. Subsequent operations, such as copying from other slices of that 3D texture, will bypass mandatory zero-initialization checks, leading to a potential disclosure of uninitialized GPU memory.
Potential Steps to Reproduce
- Create a 3D Texture: An attacker creates a 3D texture (e.g.,
size: [256, 256, 16]). Dawn's internal tracking mechanism allocates only a single initialization bit for the entire base mip level becauseTextureBase::GetArrayLayers()explicitly returns1for 3D textures (third_party/dawn/src/dawn/native/Texture.cpp:1247). - Begin Render Pass on Slice 0: The attacker begins a render pass, targeting
depthSlice: 0withloadOp: 'clear'andstoreOp: 'store'. - State Corruption: During command submission,
LazyClearRenderPassAttachments(third_party/dawn/src/dawn/native/CommandBuffer.cpp:164) is called. At line 198, becausestoreOpisStore, it callsSetIsSubresourceContentInitialized(true, range). This function completely ignoresattachmentInfo.depthSliceand marks the single tracking bit for the mip level astrue. - Hardware Execution: The hardware backend (e.g., Vulkan) executes the render pass using a temporary 2D view restricted strictly to
depthSlice: 0. Slices 1-15 remain uninitialized. - Copy Uninitialized Slice: The attacker executes a
copyTextureToBuffercommand, copying fromdepthSlice: 1. Dawn calculates the affected subresources, which resolves to the single bit representing the whole mip level. - Bypass Lazy Clear: Dawn calls
EnsureSubresourceContentInitialized. Because the tracking bit was erroneously set totruein step 3, Dawn believes the slice is already initialized and skips zeroing the memory. - Information Leak: The hardware copies the raw, uninitialized memory from
depthSlice: 1into the buffer. The attacker maps the buffer and reads sensitive cross-origin or cross-process GPU memory.
Suggested Fix
Dawn needs to handle the initialization state of 3D textures correctly.
- Option A (Finer Granularity): Update the tracking mechanism to track 3D textures per depth slice, allocating a bit per slice rather than per mip level.
- Option B (Conservative Tracking): If tracking per slice is too expensive,
LazyClearRenderPassAttachmentsshould not mark the entire mip level as initialized unless the entire mip level was rendered to (which is not possible in a single color attachment view for a 3D texture). If a single slice is rendered, the texture should either remain marked as uninitialized (triggering lazy clears later), or Dawn must explicitly clear the remaining slices at creation or during the render pass.
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 initialisation tracking uses one bit per mip level for 3D textures and ignores the depth slice when a render pass stores to a single slice.
Impact
An attacker could read uninitialised GPU memory, potentially including data from other origins or processes, though the report does not demonstrate this end to end.
What the attacker needed
Ability to submit WebGPU commands; a 3D texture with multiple depth slices
The fix
Dawn should either track initialisation per depth slice or conservatively leave the mip level marked uninitialised (or explicitly clear the other slices) when only one slice is rendered.
How it was found
- Create a 3D texture with several depth slices.
- Begin a render pass targeting only depth slice 0 with a store operation.
- Dawn marks the whole mip level as initialised, ignoring the depth slice.
- The hardware renders only slice 0; the other slices stay uninitialised.
- Copy from an untouched slice to a buffer.
- Dawn skips the lazy clear because the level is marked initialised, and the buffer receives raw 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.
A 3D texture is like a stack of 2D images. The graphics library is supposed to zero out any part of a texture before it is read, so old data from other programs cannot leak. Here it only remembered that one image in the stack had been written, assumed the whole stack was safe, and let a read of a different image return whatever was left in memory.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.