Uninitialized Use in Video (CVE-2026-11696)
Uninitialized padding in D3D11 textures used for GPU-accelerated video encoding could leak stale cross-origin GPU VRAM data. A compromised renderer could potentially extract this data from the compressed output stream.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 11 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 potential information disclosure vulnerability exists in the Windows Media Foundation Video Encode Accelerator (MFVEA) during GPU-accelerated zero-copy video encoding. When allocating D3D11 textures for NV12 encoding where the coded size exceeds the visible size, the padding regions are left uninitialized. Because the hardware encoder processes the full texture dimensions, a compromised renderer could potentially extract stale cross-origin GPU VRAM data from the returned compressed stream.
Affected files:
media/base/win/mf_helpers.ccmedia/gpu/windows/media_foundation_video_encode_accelerator_win.cc
Estimated timestamp from git blame: 2024-12-05
Description
There is a potential information disclosure (uninitialized GPU VRAM leak) in the Windows Media Foundation Video Encode Accelerator (MediaFoundationVideoEncodeAccelerator) zero-copy GPU encoding path.
When handling video frames where the coded_size is larger than the visible_rect, the GPU process allocates new default-heap D3D11 textures to perform necessary copies (e.g., due to different devices or to avoid concurrency issues). However, these textures are allocated without initial data, and only the subregion corresponding to the visible_rect is populated via CopySubresourceRegion. The remaining padding area contains uninitialized stale GPU VRAM. The hardware encoder subsequently processes the entire macroblock-aligned texture (including the uninitialized padding), which gets compressed and returned to the renderer, potentially disclosing cross-origin graphics memory (such as WebGL or canvas contents from other processes).
Root Cause & Technical Details
There are multiple locations where uninitialized textures are created and partially populated with only visible subregions:
-
Same-device NV12 copy path (
CreateSampleFromTexture): Inmedia/base/win/mf_helpers.cc(line 885), ifneed_perform_copyis true, the texture is allocated using:C++ hr = device->CreateTexture2D(&desc, nullptr, &copied_texture);The second argument is
nullptr, leaving the texture uninitialized. Subsequently,device_context->CopySubresourceRegion(line 918) is called with a source boxsrc_boxrestricted only tovisible_rect. The padding areas (betweenvisible_rectandcoded_size) remain uninitialized. -
Cross-device / texture-array fallback path (
GenerateResourceOnSyncTokenReleased): Inmedia/base/win/mf_helpers.cc(line 1167), a similar pattern occurs whereshared_d3d11_device->CreateTexture2D(&texture_desc, nullptr, &shared_texture)creates an uninitialized texture, andCopySubresourceRegion(line 1185) only copies thevisible_rectportion. -
Encoding copy path (
PerformD3DCopy): Inmedia/gpu/windows/media_foundation_video_encode_accelerator_win.cc, when scaling is not required but copy is needed to prevent concurrent access issues,PerformD3DCopy(line 3013) is invoked. InsideInitializeD3DCopying(line 2974),CreateTexture2Dis called withnullptras the initial data.CopySubresourceRegionis then used to copy only thevisible_rect(line 3063).
In all these cases, the sample is constructed, and its active length is set to the full buffer size (input_buffer->SetCurrentLength(buffer_length)) inside PopulateInputSampleBufferGpu (lines 2421-2425). This advertises the uninitialized padding to the encoder.
In contrast, the CPU readback path in CopyInputSampleBufferFromGpu (lines 2297-2302) explicitly zero-fills trailing padding bytes via std::ranges::fill to prevent information disclosure. This mitigation is missing from the GPU-to-GPU paths.
Potential Steps to Trigger (Hypothetical)
Note: Our tooling does not currently support code execution to verify these steps.
- Establish a Mojo connection to
media.mojom.VideoEncodeAcceleratorProviderand initialize a configuration with an NV12 format and a visible size of1920x1080. - Construct an NV12 SharedImage video frame with a
coded_sizeof1920x1088and avisible_rectof(0, 0, 1920, 1080). - Send an
Encoderequest containing this frame to the GPU process. - Read and decode the compressed output bitstream. The pixels in the padding rows (y-indices 1080 to 1087) could potentially contain stale GPU memory data.
Suggested Fix
Ensure that the allocated D3D11 textures are cleared or that the padding regions are zero-initialized prior to handing them over to the encoder. Alternatively, in the copy paths (CreateSampleFromTexture, GenerateResourceOnSyncTokenReleased, and PerformD3DCopy), any allocated destination textures should be initialized/cleared to black/zeroes if the visible rectangle does not cover the entire texture size.
Evaluated with Chrome root at commit: fb72408a8493c46bc75fae1c70d03daec96b3040
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
Impact
A compromised renderer could potentially extract stale cross-origin GPU VRAM data from the compressed stream.
What the attacker needed
Compromised renderer; GPU-accelerated video encoding; NV12 format with coded size larger than visible
The fix
The allocated D3D11 textures should be cleared or the padding regions zero-initialized before being handed to the encoder.
How it was found
- Establish a Mojo connection to the video encode accelerator provider and initialise with NV12 format and visible size 1920x1080.
- Construct an NV12 SharedImage video frame with coded size 1920x1088 and visible rectangle (0,0,1920,1080).
- Send an Encode request containing this frame to the GPU process.
- Read and decode the compressed output bitstream; padding rows may contain stale 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 video frame is encoded, the graphics card may allocate a texture larger than the visible picture, leaving the extra padding uninitialized. If an attacker controls the renderer, they might read leftover data from other processes in that padding. This is a potential information leak.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.