Skip to content
Info disclosure Advisory Advanced CVE-2026-130958

Uninitialized resource in WebRTC (CVE-2026-130958)

WebRTC's buffer pool zero-initialises 8-bit video buffers but not 10-bit ones, even though the H.264 decoder relies on that zeroing. A crafted 10-bit H.264 stream with omitted slices could leave parts of the frame unwritten, letting JavaScript read residual renderer heap memory through WebCodecs.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 7 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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: WebRTC's VideoFrameBufferPool fails to zero-initialize 10-bit video buffers, despite H264DecoderImpl explicitly relying on this feature to prevent uninitialized memory disclosure. By sending a crafted 10-bit H.264 stream with omitted slices, an attacker can cause FFmpeg to partially decode a frame into an uninitialized buffer. This buffer can then be read by JavaScript via WebCodecs, potentially leaking renderer heap memory.

Affected files:

  • third_party/webrtc/common_video/video_frame_buffer_pool.cc
  • third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
  • third_party/webrtc/api/video/i010_buffer.cc
  • third_party/webrtc/rtc_base/memory/aligned_malloc.cc

Estimated timestamp from git blame: 2025-04-16

Overview

WebRTC's software H.264 decoder (H264DecoderImpl) configures its VideoFrameBufferPool to explicitly zero-initialize newly allocated buffers. This is a defense-in-depth measure designed to prevent the disclosure of uninitialized heap memory in cases where FFmpeg decodes an incomplete or truncated frame, leaving portions of the output buffer unwritten.

While this zero-initialization is correctly implemented for 8-bit formats (such as I420), it is omitted for 10-bit formats (such as I010, I210, I410). Because these buffers are allocated via AlignedMalloc (which maps to PartitionAlloc's un-zeroed bucketed freelists for small resolutions), an attacker can exploit this discrepancy to reliably leak renderer heap memory to JavaScript.

Vulnerability Details

Based on source code analysis, the following sequence of events outlines how an attacker could potentially exploit this vulnerability:

  1. Establish WebRTC Connection: An attacker-controlled web page establishes a WebRTC RTCPeerConnection and negotiates a 10-bit H.264 video stream (e.g., High 10 Profile, mapping to AV_PIX_FMT_YUV420P10LE).
  2. Decoder Initialization: H264DecoderImpl is instantiated. In its constructor, it initializes its ffmpeg_buffer_pool_ with zero_initialize=true (third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc:280).
  3. Crafted H.264 Stream: The attacker sends an H.264 access unit that is syntactically valid but intentionally omits certain slices (e.g., missing macroblock rows).
  4. Buffer Allocation: When FFmpeg begins decoding the frame, it requests a buffer via H264DecoderImpl::AVGetBuffer2(). For 10-bit formats, this invokes decoder->ffmpeg_buffer_pool_.CreateI010Buffer(width, height).
  5. Missing Initialization: Inside VideoFrameBufferPool::CreateI010Buffer (third_party/webrtc/common_video/video_frame_buffer_pool.cc:262), the code allocates a new I010Buffer but fails to check the zero_initialize_ flag or call any initialization method. In contrast, 8-bit methods like CreateI420Buffer explicitly check this flag and call InitializeData().
  6. Uninitialized Memory: I010Buffer allocates its memory using AlignedMalloc(). For typical attacker-controlled resolutions (e.g., 16x16, which requires ~768 bytes), PartitionAlloc serves the allocation from its un-zeroed freelists. Thus, the buffer contains residual renderer heap data.
  7. Partial Decode: Because CONFIG_ERROR_RESILIENCE is disabled (0) in Chromium's FFmpeg build, error concealment is bypassed. FFmpeg writes decoded pixels for the present slices, but leaves the memory for the omitted slices completely untouched.
  8. Data Leakage: Because H264DecoderImpl does not enable the AV_EF_EXPLODE error recognition flag (unlike Chrome's media pipeline), FFmpeg returns the partially decoded frame without error. The frame propagates to the WebRTC sink, where JavaScript can use MediaStreamTrackProcessor and VideoFrame.copyTo() to directly read the uninitialized 16-bit values, resulting in an information leak that could be used to defeat ASLR.

(Note: These are potential steps based on code analysis; our tooling has not executed a live proof-of-concept.)

Suggested Fix

  1. Update I010Buffer, I210Buffer, and I410Buffer classes to implement an InitializeData() method that safely zeroes the allocated memory (similar to I420Buffer::InitializeData()).
  2. Update VideoFrameBufferPool::CreateI010Buffer, CreateI210Buffer, and CreateI410Buffer to check if (zero_initialize_) buffer->InitializeData(); immediately after allocating a new buffer, bringing them in line with the 8-bit buffer creation methods.

Evaluated with Chrome root at commit: 7353d249d9cacf9c7218e1d7b8a39cf39c72d646


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 10-bit buffer creation methods in VideoFrameBufferPool ignore the zero_initialize_ flag and never call an initialisation routine, unlike their 8-bit counterparts.

Impact

An attacker could potentially leak renderer heap memory, which may help defeat ASLR; the report notes no live proof-of-concept was executed.

What the attacker needed

Victim visits attacker page; browser supports 10-bit H.264 decoding; WebCodecs available to the page

The fix

The 10-bit buffer classes should gain an initialisation method that zeroes memory, and the pool's 10-bit creation methods should call it when zero_initialize_ is set.

How it was found

  1. Open an attacker page that sets up a WebRTC peer connection and negotiates a 10-bit H.264 stream.
  2. The H.264 decoder is created with a buffer pool configured to zero-initialise buffers.
  3. Send a syntactically valid H.264 access unit that omits some slices.
  4. FFmpeg requests a 10-bit buffer, which is allocated without being zeroed.
  5. FFmpeg decodes only the present slices and returns the partially filled frame without error.
  6. Read the frame from JavaScript via MediaStreamTrackProcessor and VideoFrame.copyTo().

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 program asks the computer for memory, that memory may still hold old data from other programs. Good practice is to wipe it clean before use. Here the code wipes 8-bit video buffers but forgets to do the same for 10-bit ones, so leftover data could end up inside a video frame that a web page can read.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.