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

Integer overflow in Media (CVE-2026-11655)

An integer truncation in a macOS audio utility causes an undersized heap allocation when a large channel count is supplied, leading to a linear out-of-bounds write. A compromised renderer could potentially exploit this to corrupt the GPU process heap and achieve remote code execution.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 25 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: An integer truncation vulnerability in the macOS-specific audio utility code allows for an undersized heap allocation when processing high channel counts. A compromised renderer can potentially exploit this to trigger a massive linear heap out-of-bounds write in the GPU process. The issue stems from a 64-bit to 32-bit truncation during a buffer size calculation.

Affected files:

  • media/base/mac/channel_layout_util_mac.cc
  • media/filters/mac/audio_toolbox_audio_decoder.cc
  • media/base/mac/channel_layout_util_mac.h

Estimated timestamp from git blame: 2023-04-27

Summary

A potential linear heap out-of-bounds (OOB) write vulnerability exists in the macOS GPU process due to an integer truncation in media::ChannelLayoutToAudioChannelLayout. When calculating the required size for an AudioChannelLayout structure, a 64-bit size_t value is truncated into a 32-bit int, leading to an undersized heap allocation. Subsequent initialization of the structure's members results in a linear OOB write.

Root Cause Analysis

The vulnerability is located in media/base/mac/channel_layout_util_mac.cc within the ChannelLayoutToAudioChannelLayout function:

C++
std::unique_ptr<ScopedAudioChannelLayout> ChannelLayoutToAudioChannelLayout(
    ChannelLayout input_layout, int input_channels) {
  // ...
  int output_layout_size =  // [1] Truncation occurs here
      offsetof(AudioChannelLayout, mChannelDescriptions[input_channels]);
  auto new_layout =
      std::make_unique<ScopedAudioChannelLayout>(output_layout_size); // [2] Undersized allocation
  new_layout->layout()->mNumberChannelDescriptions = input_channels; // [3] Large count stored
  // ...
  auto descriptions = GetDescriptions(*new_layout->layout());
  if (input_layout == CHANNEL_LAYOUT_DISCRETE) {
    for (int ch = 0; ch < input_channels; ++ch) {
      descriptions[ch].mChannelLabel = kAudioChannelLabel_Unknown; // [4] OOB write
      descriptions[ch].mChannelFlags = kAudioChannelFlags_AllOff;
    }
  }
  1. Truncation: In [1], offsetof returns a 64-bit size_t. For a sufficiently large input_channels (e.g., 214,748,365), the result 12 + (214,748,365 * 20) = 4,294,967,312 (0x100000010) is truncated when assigned to the 32-bit signed int output_layout_size, resulting in a value of 16.
  2. Allocation: In [2], a base::HeapArray of only 16 bytes is allocated.
  3. Inconsistent State: In [3], the structure's member count is set to the original large value. The GetDescriptions helper subsequently creates a base::span whose length is based on this large value, bypassing span safety checks for the underlying small allocation.
  4. OOB Write: In [4], the loop iterates input_channels times, performing writes starting at offset 12 and continuing linearly well beyond the 16-byte buffer.

Potential Attack Vector

Note: These are potential steps as a functional PoC has not yet been executed.

  1. A compromised renderer binds the media.mojom.AudioDecoder interface in the GPU process (on macOS, this often instantiates AudioToolboxAudioDecoder).
  2. The renderer calls Initialize() with an AudioDecoderConfig where codec is kAAC and profile is kXHE_AAC (xHE-AAC/USAC).
  3. The extra_data field is crafted to contain a USAC configuration that specifies an extremely large channel count (e.g., via ISO/IEC 23003-3 escapedValue syntax).
  4. AudioToolboxAudioDecoder::CreateDecoder uses macOS AudioFormatGetProperty to parse the configuration. If the system API returns the large channel count in mChannelsPerFrame, it triggers the calls to ChannelLayoutToAudioChannelLayout with the malicious count.

Impact

This flaw could allow a compromised renderer to achieve Remote Code Execution (RCE) in the GPU process by corrupting the PartitionAlloc heap. On macOS, the GPU process is sandboxed but maintains access to system audio/graphics frameworks.

Suggested Fix

  1. Use base::CheckedNumeric<size_t> to perform the size calculation in ChannelLayoutToAudioChannelLayout and ensure the result fits in a size_t and is within sane bounds before allocation.
  2. Change the type of output_layout_size from int to size_t to avoid truncation.
  3. Implement explicit validation of the channel count in AudioToolboxAudioDecoder before passing it to utility functions, enforcing limits such as media::limits::kMaxChannels.

Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e


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 a 64-bit size calculation result was stored in a 32-bit signed integer, truncating the value and causing an undersized allocation before a loop wrote the full channel count.

Impact

A compromised renderer could potentially achieve remote code execution in the sandboxed GPU process by corrupting the heap, though no functional proof of concept has been executed.

What the attacker needed

Compromised renderer; macOS; crafted audio configuration

The fix

The size calculation should use checked arithmetic and a size_t type, and the channel count should be validated against a maximum limit before allocation.

How it was found

  1. A compromised renderer binds the AudioDecoder interface in the GPU process.
  2. The renderer calls Initialize with an AAC xHE-AAC configuration.
  3. The extra_data field contains a USAC configuration specifying an extremely large channel count.
  4. The macOS audio API parses the configuration and returns the large channel count.
  5. The large count reaches ChannelLayoutToAudioChannelLayout, causing the truncation and OOB write.

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 needs memory for a list of items, it calculates the size and asks the system for that much space. Here, a very large number was cut down to a small number during that calculation, so the program reserved far too little memory. It then wrote a long list of items into that tiny space, spilling over into neighbouring memory and corrupting it.

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.