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

Out of bounds read and write in Media (CVE-2026-11690)

A state-machine defect in the macOS audio decoder can leave the decoder with a larger channel count than the allocated output buffer list after a failed re-initialization. A compromised renderer could then trigger an out-of-bounds heap read/write in the GPU process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 12 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 state-machine defect in AudioToolboxAudioDecoder during re-initialization can potentially lead to a mismatch between the AudioConverter channel count and the allocated output buffer size. If re-initialization fails after the converter is created, the decoder reference is updated with the new channel configuration while staging buffers retain stale, smaller allocations. A subsequent decode call can trigger an out-of-bounds read/write on the heap in the macOS GPU process.

Affected files:

  • media/filters/mac/audio_toolbox_audio_decoder.cc

Estimated timestamp from git blame: 2022-03-01

Description

There is a potential state-machine mismatch vulnerability in media/filters/mac/audio_toolbox_audio_decoder.cc when handling decoder re-initialization on macOS. If a re-initialization attempt partially succeeds (the core AudioConverterRef is instantiated with a larger channel configuration $M$) but fails during subsequent parameter/property setup (such as setting the magic cookie or target program loudness), the decoder is left in an inconsistent state.

Specifically, the decoder_ member holds the new $M$-channel converter, but the staging structures (output_bus_ and output_buffer_list_) are not re-allocated to match, retaining their stale $N$-channel configurations ($N < M$) from the previous successful initialization.

Because the Mojo service layer (MojoAudioDecoderService) does not track initialization failure state to block subsequent decode attempts, a compromised renderer can immediately call Decode(). During decoding, AudioConverterFillComplexBuffer assumes the output list has $M$ channels, leading CoreAudio to perform out-of-bounds reads and writes on the PartitionAlloc heap relative to the output_buffer_list_ allocation.

Code Analysis

In media/filters/mac/audio_toolbox_audio_decoder.cc, Initialize() resets the decoder and delegates to CreateDecoder():

C++
// media/filters/mac/audio_toolbox_audio_decoder.cc
void AudioToolboxAudioDecoder::Initialize(const AudioDecoderConfig& config, ...) {
  ...
  decoder_.reset();
  ...
  .Run(CreateDecoder(config) ? ...);
}

In CreateDecoder(), AudioConverterNew() is called early in the function, populating decoder_ with the new $M$-channel converter:

C++
// Create the decoder.
auto result = AudioConverterNew(&input_format, &output_format,
                                decoder_.InitializeInto());
if (result != noErr) {
  return false;
}

Following this creation, multiple property setters can fail and return false early (e.g., setting the decompression magic cookie at line 393, program target loudness at line 406, or DRC effect type at line 419). When an early return occurs, the allocation of staging structures at the end of CreateDecoder() is bypassed:

C++
// This block is bypassed on early return
output_bus_ = AudioBus::Create(input_format.mChannelsPerFrame, ...);
output_buffer_list_.reset(reinterpret_cast<AudioBufferList*>(
    calloc(1, sizeof(AudioBufferList) + output_bus_->channels() * sizeof(AudioBuffer))));

If the compromised renderer calls Decode() immediately after initialization fails, AudioToolboxAudioDecoder::Decode() is executed. It sets output_buffer_list_->mNumberBuffers to the stale size of output_bus_ ($N$) at line 167:

C++
output_buffer_list_->mNumberBuffers = output_bus_->channels();

When AudioConverterFillComplexBuffer is invoked with the $M$-channel converter, it expects $M$ output buffers. It will read past the allocated bounds of output_buffer_list_ (which only has space for $N$ buffers), parsing adjacent heap metadata as AudioBuffer structures. If an attacker grooms the heap to control the adjacent slots, they can supply an arbitrary mData destination pointer, resulting in CoreAudio writing decoded samples directly to that address.

Potential Steps to Reproduce (Suggested)

Note: These are suggested/potential steps to trigger the issue, as our tooling environment does not currently have the capability to run code or execute a live proof of concept.

  1. Establish a Mojo connection to MojoAudioDecoderService inside the macOS GPU process.
  2. Call Initialize() with a valid $N$-channel configuration (e.g., $N=1$).
  3. Call SetDataSource() to set up the data stream pipe and instantiate mojo_decoder_buffer_reader_.
  4. Call Initialize() a second time with an $M$-channel configuration (where $M > N$, e.g., $M=8$) containing a malformed or corrupted extra data payload (such as a malformed MPEG-4 ESDescriptor) to ensure that AudioConverterSetProperty(..., kAudioConverterDecompressionMagicCookie, ...) fails.
  5. Upon receiving the initialization failure callback, immediately call the Mojo Decode() method with a crafted compressed audio buffer.
  6. Observe CoreAudio performing out-of-bounds access on the heap-allocated output_buffer_list_.

Proposed Remediation

To resolve this issue, ensure that if CreateDecoder fails, all decoder member variables are fully cleared or reset. Alternatively, do not populate decoder_ until the entire configuration is successfully validated and set up.

C++
// Suggested Fix in media/filters/mac/audio_toolbox_audio_decoder.cc
if (!CreateDecoder(config)) {
  decoder_.reset();
  output_bus_.reset();
  output_buffer_list_.reset();
  limiter_queue_.reset();
  discard_helper_.reset();
  std::move(init_cb).Run(DecoderStatus::Codes::kFailedToCreateDecoder);
  return;
}

Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379


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, the decoder reference is updated with the new channel configuration before all setup succeeds, and on failure the staging buffers are not reallocated or cleared, leaving a mismatch.

Impact

A compromised renderer could cause out-of-bounds heap reads and writes in the macOS GPU process, potentially leading to memory corruption or code execution if the heap is groomed.

What the attacker needed

Compromised renderer; macOS GPU process; Mojo connection to audio decoder service

The fix

The decoder should clear all member variables when CreateDecoder fails, or not populate the decoder until the full configuration succeeds.

How it was found

  1. Establish a Mojo connection to the audio decoder service in the macOS GPU process.
  2. Initialize the decoder with a valid smaller channel configuration.
  3. Set up the data source pipe for the decoder.
  4. Initialize again with a larger channel configuration and malformed extra data so a property setter fails.
  5. After the failure callback, immediately call Decode with a crafted compressed audio buffer.
  6. Observe the out-of-bounds heap access.

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 the audio decoder is set up again with more channels, it can fail partway through and leave some buffers sized for the old, smaller channel count. If decoding then runs, the audio library writes more channel data than the buffer can hold, corrupting memory. This only matters if an attacker already controls the renderer process.

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.