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

Inappropriate implementation in Media (CVE-2026-8585)

The MediaFoundationVideoEncodeAccelerator on Windows fails to clear its pending input queue when reconfiguring for a new resolution, allowing a compromised renderer to queue a small buffer, reconfigure to a large resolution, and cause an out-of-bounds read in the underlying MFT. The leaked GPU process memory is encoded into the bitstream and returned to the attacker.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 41 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: MediaFoundationVideoEncodeAccelerator fails to clear its pending input queue when reconfiguring for a new resolution. A compromised renderer can exploit this to queue a small buffer, reconfigure the encoder to a large resolution, and cause the underlying MFT to perform an out-of-bounds read. The leaked GPU process memory is encoded into the bitstream and returned to the attacker.

Affected files:

  • media/gpu/windows/media_foundation_video_encode_accelerator_win.cc

Estimated timestamp from git blame: 2024-12-03

Vulnerability Details

The MediaFoundationVideoEncodeAccelerator (MFVEA) on Windows contains a flaw in how it handles dynamic resolution changes via UpdateFrameSize(). When a resolution change occurs, the accelerator reconfigures the underlying Media Foundation Transform (MFT) but fails to properly flush or clear its internal pending_input_queue_.

In media/gpu/windows/media_foundation_video_encode_accelerator_win.cc, UpdateFrameSize() uses a DCHECK to assert that the queue is empty before proceeding:

C++
// media/gpu/windows/media_foundation_video_encode_accelerator_win.cc:1036
DCHECK(pending_input_queue_.empty());

Because DCHECK macros are compiled out in Release builds, execution proceeds even if the queue contains frames. The method updates the input_visible_size_ and reconfigures the MFT to the new dimensions. While it explicitly clears bitstream_buffer_queue_ (line 1143), it leaves pending_input_queue_ untouched.

Potential Exploitation Steps

Note: These steps are based on static analysis; a working Proof of Concept has not yet been executed.

  1. Queue a Small Frame: A compromised renderer process floods the GPU process with asynchronous Encode Mojo IPCs containing small VideoFrame objects (e.g., 16x16).
  2. Buffer Allocation: QueueInput() creates IMFSample buffers for these frames based on the current 16x16 input_visible_size_ and pushes them onto pending_input_queue_.
  3. Trigger Resolution Change: Before the hardware encoder finishes processing, the attacker sends a RequestEncodingParametersChange IPC with a large resolution (e.g., 1920x1080).
  4. Reconfiguration: The GPU process calls UpdateFrameSize(), bypassing the DCHECK. The MFT is reconfigured to expect 1080p frames, and input_visible_size_ becomes 1920x1080. The 16x16 samples remain in pending_input_queue_.
  5. Feeding Stale Inputs: When the MFT signals METransformNeedInput, FeedInputs() dequeues the stale 16x16 sample and passes it to encoder_->ProcessInput() without verifying the sample's buffer size against the new input_visible_size_.
  6. Out-of-Bounds Read: The vendor MFT driver (Intel, NVIDIA, AMD) relies on its newly configured MF_MT_FRAME_SIZE (1080p). It assumes the provided buffer is large enough and reads past the end of the 16x16 allocation, resulting in an out-of-bounds read into adjacent GPU heap memory.
  7. Information Leak: The leaked heap memory is encoded as video data and returned to the renderer via the BitstreamBufferReady callback, allowing the attacker to bypass ASLR or steal cross-origin texture data.

Suggested Fix

There are two primary ways to fix this issue:

  1. Clear the Queue on Reconfiguration: In UpdateFrameSize(), explicitly clear the pending_input_queue_ and properly discard/notify the client about the dropped frames, similar to how bitstream_buffer_queue_ is cleared.
  2. Validate Sample Size Before Processing: Add a check in ProcessInput() or FeedInputs() to ensure that the IMFSample buffer dimensions match the currently configured input_visible_size_. If they do not match, the sample should be rejected rather than passed to the hardware encoder.

Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33


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.

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 the UpdateFrameSize() method uses a DCHECK to assert the pending input queue is empty, which is compiled out in release builds, and does not clear the queue before reconfiguring the encoder.

Impact

A compromised renderer could leak GPU process memory, potentially bypassing ASLR or stealing cross-origin texture data, though the report notes these steps are based on static analysis and a working proof of concept has not been executed.

What the attacker needed

Compromised renderer process; ability to send Mojo IPCs to GPU process

The fix

The issue should be fixed by either clearing the pending input queue on reconfiguration or validating sample size before processing.

How it was found

  1. A compromised renderer floods the GPU process with asynchronous Encode Mojo IPCs containing small VideoFrame objects.
  2. QueueInput() creates IMFSample buffers for these frames and pushes them onto pending_input_queue_.
  3. The attacker sends a RequestEncodingParametersChange IPC with a large resolution before the hardware encoder finishes processing.
  4. The GPU process calls UpdateFrameSize(), bypassing the DCHECK, reconfiguring the MFT and updating input_visible_size_ while the small samples remain in pending_input_queue_.
  5. When the MFT signals METransformNeedInput, FeedInputs() dequeues the stale small sample and passes it to encoder_->ProcessInput() without verifying the sample's buffer size against the new input_visible_size_.
  6. The vendor MFT driver reads past the end of the small allocation, resulting in an out-of-bounds read into adjacent GPU heap 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 video encoder in the GPU process keeps a queue of frames waiting to be processed. When the resolution changes, the code checks that the queue is empty but only in debug builds, so in release builds old small frames stay in the queue. Those small frames are then fed to a hardware encoder that now expects large frames, causing it to read past the end of the small buffer and leak memory back to the attacker.

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.