Uninitialized resource in Media (CVE-2026-87456)
A compromised renderer can send a crafted audio buffer with a bitstream format and a huge frame count but tiny payload, bypassing size validation. This causes the GPU process to allocate uninitialized memory, which is then encoded and returned to the renderer, leaking sensitive GPU process data.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 6 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A compromised renderer can bypass data size validation in media_type_converters.cc by sending a bitstream AudioBuffer with a massive frame count and tiny payload. This causes the GPU process to allocate a large, uninitialized AudioBus which is subsequently processed as PCM audio by Mac and Android platform encoders in release builds. The encoder compresses this uninitialized heap memory and returns it to the renderer, leaking sensitive GPU process data.
Affected files:
media/base/audio_bus.ccmedia/mojo/services/mojo_audio_encoder_service.ccmedia/base/audio_buffer.ccmedia/mojo/common/media_type_converters.cc
Estimated timestamp from git blame: 2025-01-24
Description
There is a potential uninitialized heap memory disclosure vulnerability in the GPU process's audio encoding pipeline. A compromised renderer can craft a malicious mojom::AudioBuffer that bypasses size validation during Mojo type conversion. This results in the allocation of an AudioBus backed by largely uninitialized heap memory. Due to the reliance on DCHECK instead of CHECK for bitstream format validation in the audio FIFO path, platform encoders on Mac and Android process this uninitialized memory as PCM audio data, compress it, and send it back to the renderer.
Technical Details
- Validation Bypass: In
media/mojo/common/media_type_converters.cc, theTypeConverterformojom::AudioBufferPtrchecksif (IsBitstream(input->sample_format))on line 235 and returns early if true. Crucially, this early return completely bypasses themin_data_sizecalculation and validation (input->data.size() < min_data_size) that occurs later on line 251. This allows an attacker to specify a massiveframe_count(e.g., 100,000) with a tinydata.size()(e.g., 1 byte). - Uninitialized Allocation: When
MojoAudioEncoderService::Encodereceives this buffer, it callsAudioBuffer::WrapOrCopyToAudioBus. Since bitstream formats cannot be directly wrapped, it invokesAudioBus::Create(channels, frames), allocating memory for the massiveframe_count. TheAudioBusconstructor usesbase::AlignedUninit<float>to allocate this backing memory, leaving it completely uninitialized. - Partial Initialization: The subsequent call to
AudioBuffer::ReadFramescopies only the tiny provided payload (1 byte) into theAudioBus, leaving the remaining 99,999+ frames worth of float data uninitialized, containing residual GPU process heap data. - DCHECK Bypass in Release Builds: The
AudioBusis then passed to the platform encoder. On Mac (AudioToolboxAudioEncoder) and Android (NdkAudioEncoder), the encoder usesConvertingAudioFifoto manage frame chunking. The FIFO pulls data by callingAudioBus::CopyPartialFramesTo. This method contains aDCHECK(!is_bitstream_format_)to prevent reading bitstream memory as PCM frames. However, becauseDCHECKs are removed in Release builds, the check is silently bypassed. - Information Leak:
CopyPartialFramesTocopies the uninitialized heap data into an output buffer, which is fed into the underlying AAC encoder. The encoder compresses this uninitialized memory and returns it to the renderer viaclient_->OnEncodedBufferReady, resulting in a substantial heap disclosure.
Note: Windows is not affected because MFAudioEncoder uses ToInterleaved(), which invokes channel() containing a mandatory CHECK(!is_bitstream_format_) that safely crashes the process.
Potential Attacker Steps
Note: These are suggested/potential steps as our setup does not currently have the ability to run code or verify a live Proof of Concept.
- Compromise a renderer process (e.g., via a v8 exploit).
- Connect to the
media::mojom::InterfaceFactoryand create anAudioEncoderbound to the GPU process. - Initialize the encoder with an AAC codec.
- Optionally, perform heap grooming in the GPU process to position sensitive targets (like IPC handles or cryptographic tokens) into predictable allocations matching the
AudioBussizing. - Craft a
media::mojom::AudioBufferwith a bitstreamsample_format(e.g.,kSampleFormatAc3), a largeframe_count, and a minimal 1-bytedatapayload. - Send this buffer via the
EncodeMojo method. - Receive the encoded AAC buffers sent back from the GPU process.
- Decode the AAC audio and use signal analysis to recover the uninitialized GPU heap memory, aiding in a sandbox escape.
Suggested Fix
- Enforce strict validation: In
media/mojo/common/media_type_converters.cc, move themin_data_sizecalculation and check so that it also applies to bitstream formats beforeCopyBitstreamFromis called. Ensure the validation accurately reflects bitstream sizing requirements. - Harden AudioBus accessors: Upgrade the
DCHECK(!is_bitstream_format_)inAudioBus::CopyPartialFramesToand related methods (likechannel(),Scale(),SwapChannels()) to a mandatoryCHECK(!is_bitstream_format_). This will ensure the process safely terminates in Release builds if anomalous bitstream processing occurs, mirroring the safety of the WindowsToInterleaved()path.
Evaluated with Chrome root at commit: bb48272cafb7e24c93f55ef40da398cd206ee651
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. Please feel free to reach out to me if you have concerns or feedback.
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 type converter for audio buffers returns early for bitstream formats, skipping the data size validation, and later a debug-only check (DCHECK) that would catch the misuse is removed in release builds.
Impact
A compromised renderer could leak sensitive GPU process heap data, potentially aiding a sandbox escape; Windows is not affected because its encoder uses a mandatory check that crashes the process.
What the attacker needed
Compromised renderer process; ability to send Mojo messages to GPU process
The fix
The type converter should validate data size for bitstream formats before copying, and the debug-only checks in AudioBus accessors should be upgraded to mandatory checks that terminate the process in release builds.
How it was found
- Compromise a renderer process.
- Connect to the media interface factory and create an audio encoder bound to the GPU process.
- Initialize the encoder with an AAC codec.
- Craft an audio buffer with a bitstream sample format, a large frame count, and a minimal data payload.
- Send the buffer via the Encode method.
- Receive the encoded buffers and decode them to recover uninitialized 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 renderer is the part of a browser that runs web pages. If an attacker can take control of it, they can send special messages to the GPU process, which handles graphics and audio. Here, a missing size check lets the attacker make the GPU process read and send back leftover memory that was never cleared, which might contain secrets.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.