Skip to content
Memory corruption Advisory Advanced CVE-2026-17723

Use after free in Media (CVE-2026-17723)

A compromised renderer could force an early error in the D3D12 video encoder after asynchronous GPU work had been submitted but before the CPU waited for it, so teardown released D3D12 resources while the GPU was still using them. This use-after-free in the unsandboxed GPU process could potentially be exploited for arbitrary code execution and a sandbox escape.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 46 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 compromised renderer can trigger an early error in D3D12 video encoding after asynchronous video processing work has been submitted to the GPU. This early error bypasses the necessary CPU-side synchronization, leading to a Use-After-Free of D3D12 resources when the encoder is destroyed while the GPU is still executing commands.

Affected files:

  • media/gpu/windows/d3d12_video_processor_wrapper.cc
  • media/gpu/windows/d3d12_video_encode_delegate.cc
  • media/gpu/windows/d3d12_video_encode_accelerator.cc
  • media/gpu/windows/d3d12_video_encode_h265_delegate.cc
  • media/gpu/windows/d3d12_video_encode_h264_delegate.cc

Estimated timestamp from git blame: 2026-02-05

Background

In the D3D12 Video Encode Accelerator, when an input frame requires format or color space conversion, the work is asynchronously submitted to the GPU via D3D12VideoProcessorWrapper::ProcessFrames(). The CPU synchronization to wait for this GPU work to finish is normally performed later in the pipeline, specifically inside D3D12VideoEncoderWrapper::Encode(), which calls fence_->SignalAndWaitCPU().

Root Cause

A compromised renderer process can supply a maliciously crafted VideoEncodeOptions struct over the media.mojom.VideoEncodeAccelerator Mojo interface to force an error to occur after ProcessFrames() has submitted work, but before the synchronization in D3D12VideoEncoderWrapper::Encode() is reached.

Specifically, the attacker configures the session for manual reference buffer control. They then send an Encode() request where the reference_buffers array contains an index that is mathematically within the maximum allowed range, but has never been previously populated with a valid reference frame.

Potential Exploit Steps

  1. Attacker Setup: A compromised renderer calls Initialize on the VideoEncodeAccelerator Mojo interface with config.manual_reference_buffer_control = true.
  2. Triggering the UAF:
    • The attacker calls Encode with a frame that requires color conversion (e.g., NV12 input for a P010 profile) and a VideoEncodeOptions struct containing an unpopulated reference buffer index (e.g., index 1).
    • In the GPU process, D3D12VideoEncodeDelegate::Encode performs an "early validation" (lines 286-292). It only checks if the index is less than GetMaxNumOfManualRefBuffers(). Because the index is within bounds, validation passes.
    • Because color conversion is needed, video_processor_wrapper_->ProcessFrames() is called. This submits asynchronous commands to the D3D12 video process queue. The CPU does not wait here.
    • The delegate then calls the virtual EncodeImpl() (e.g., D3D12VideoEncodeH265Delegate::EncodeImpl).
    • Inside EncodeImpl, a secondary validation occurs. The code calls reference_frame_manager_.GetReferenceFrameId(reference_buffers[i]). Because the buffer index was never populated, this returns std::nullopt.
    • EncodeImpl immediately returns an EncoderStatus::Codes::kBadReferenceBuffer error.
    • This early error return bypasses the call to video_encoder_wrapper_->Encode(), meaning the critical SignalAndWaitCPU() synchronization step is entirely skipped.
  3. Teardown and UAF:
    • The error propagates back to D3D12VideoEncodeAccelerator::Encode, which calls NotifyError(), initiating the teardown of the encoding session.
    • During teardown, ~D3D12VideoEncodeAccelerator only explicitly waits on its copy_command_queue_; it does not wait on the video processing queue.
    • The D3D12VideoEncodeDelegate and its D3D12VideoProcessorWrapper member are destroyed. The wrapper's destructor is defaulted, meaning its D3D12 COM objects (command_allocator_, command_list_, and processed_input_frame_) are released.
    • At this exact moment, the GPU is still actively executing the commands submitted during ProcessFrames(). This results in a highly deterministic D3D12 Use-After-Free in the unsandboxed GPU process.

Impact

This vulnerability allows a compromised renderer process to trigger a Use-After-Free in the GPU process. Because the GPU process is unsandboxed (or highly privileged depending on the specific Windows architecture), an attacker could potentially groom memory and exploit this UAF to achieve arbitrary code execution, resulting in a full Sandbox Escape.

Suggested Fix

Ensure that the CPU always synchronizes with the video processing queue during teardown if there is in-flight work. This could be achieved by adding an explicit wait in the destructor of D3D12VideoEncodeDelegate or by giving D3D12VideoProcessorWrapper a non-default destructor that waits on its internal fence before releasing its D3D12 resources. Alternatively, all validation regarding reference buffers must be completed before ProcessFrames() is called.

Evaluated with Chrome root at commit: 65b3256311f3ab6fb9870eaa522de7e6dd2663bb


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 an early validation error path returns before the CPU-side fence wait, and teardown does not wait on the video processing queue before releasing D3D12 resources.

Impact

A compromised renderer could potentially groom memory and exploit the use-after-free in the unsandboxed GPU process to achieve arbitrary code execution and a full sandbox escape.

What the attacker needed

Compromised renderer process; Windows with D3D12 video encoding; manual reference buffer control enabled

The fix

The CPU should always synchronise with the video processing queue during teardown when work is in flight, or all reference buffer validation should happen before the asynchronous submission.

How it was found

  1. A compromised renderer initialises the video encode accelerator with manual reference buffer control enabled.
  2. It sends an encode request needing colour conversion with a reference buffer index that is in range but was never populated.
  3. The first validation passes, GPU work is submitted asynchronously, and a later check returns a bad reference buffer error.
  4. The error skips the CPU wait and triggers teardown, which does not wait on the video processing queue.
  5. The encoder and processor wrapper are destroyed, releasing D3D12 objects while the GPU still executes commands.

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 use-after-free happens when a program frees some memory and then keeps using it, so an attacker who can control what lands in that memory may take over the program. Here the browser's graphics helper process (the GPU process) frees graphics resources while the graphics card is still working on them. Because that process is not sandboxed, breaking it could let an attacker escape the browser's protection.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.