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

Improper input validation in Chromecast (CVE-2026-79121)

The audio decoder's SetConfig writes the new configuration into internal state before checking whether that configuration is valid. If the pipeline keeps feeding buffers after a failed validation, a later buffer could be processed using the invalid cached configuration, which the report suggests might lead to memory corruption on some platforms.

Google Chrome

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 3 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A potential state-tracking vulnerability exists where StarboardAudioDecoder::SetConfig commits configuration data to internal state variables before executing validation checks. If validation fails but the media pipeline continues to process buffers, this unvalidated state may be accessed, potentially leading to downstream memory safety issues.

Affected files:

  • chromecast/starboard/media/media/starboard_audio_decoder.cc
  • chromecast/media/common/audio_decoder_software_wrapper.cc
  • chromecast/media/cma/pipeline/audio_pipeline_impl.cc
  • chromecast/media/cma/pipeline/av_pipeline_impl.cc

Estimated timestamp from git blame: 2024-04-22

Description

In StarboardAudioDecoder::SetConfig (located in chromecast/starboard/media/media/starboard_audio_decoder.cc), the decoder's internal configuration state is updated before the validation check IsValidConfig is evaluated.

C++
bool StarboardAudioDecoder::SetConfig(const AudioConfig& config) {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);

  if ((config.codec == kCodecPCM || config.codec == kCodecPCM_S16BE) &&
      config.channel_number > 8) {
    LOG(ERROR) << "Config channels exceeds 8, which is not supported.";
    return false;
  }

  config_ = config;                                    // Potential state modification
  audio_sample_info_.emplace(ToAudioSampleInfo(config_)); // Potential state modification
  return IsValidConfig(config_);                       // Validation executed LAST
}

If IsValidConfig(config_) returns false (for example, if the channel count exceeds 32), SetConfig correctly returns false to notify the caller of the failure. However, the unvalidated configuration has already been persistently written to config_ and audio_sample_info_.

Potential Impact & Propagation

Under normal circumstances, a failure in SetConfig is expected to halt the pipeline. However, if the error handling path does not immediately tear down or halt the feeding loop (such as when AvPipelineImpl::enable_feeding_ remains active during asynchronous error propagation), a subsequent buffer might still be pushed to the decoder.

Because software fallback decoders (e.g., in AudioDecoderSoftwareWrapper) would fail to initialize on an invalid configuration, the wrapper may fall back to forwarding raw buffers directly to the backend decoder via backend_decoder_->PushBuffer(buffer). When StarboardAudioDecoder::PushBuffer is invoked, it retrieves the previously cached, invalid audio_sample_info_ state and passes it to the underlying platform's audio API (such as the Starboard API wrapper).

On specific platforms or implementations, receiving an audio configuration with anomalous parameters (e.g., extremely high channel counts) could lead to integer overflows during internal buffer sizing calculations, potentially resulting in memory corruption (such as a heap out-of-bounds write).

Suggested Steps to Trigger (Potential)

Note: These steps are theoretical as a working proof-of-concept has not been executed.

  1. A compromised renderer sends a serialized AudioDecoderConfig containing an exceptionally high channel count (e.g., utilizing CHANNEL_LAYOUT_DISCRETE).
  2. The media pipeline processes a mid-stream configuration update, invoking StarboardAudioDecoder::SetConfig with the anomalous configuration.
  3. SetConfig updates its internal state with the high channel count, then returns false when validation fails.
  4. Due to the failure, software decoder wrapper initialization fails, and the pipeline triggers an asynchronous decode error.
  5. If the feeding loop continues to execute before pipeline teardown completes, a subsequent buffer is pushed.
  6. The wrapper forwards the buffer to StarboardAudioDecoder::PushBuffer, which dispatches the sample along with the poisoned cached audio_sample_info_ to the low-level platform playback API.

Remediation

To resolve this issue, validation checks must be performed on the configuration parameters before any permanent changes are written to the decoder's member variables.

Modify StarboardAudioDecoder::SetConfig to validate the configuration first, and only commit to internal state if validation succeeds:

C++
bool StarboardAudioDecoder::SetConfig(const AudioConfig& config) {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);

  if (!IsValidConfig(config)) {
    return false;
  }

  if ((config.codec == kCodecPCM || config.codec == kCodecPCM_S16BE) &&
      config.channel_number > 8) {
    LOG(ERROR) << "Config channels exceeds 8, which is not supported.";
    return false;
  }

  config_ = config;
  audio_sample_info_.emplace(ToAudioSampleInfo(config_));
  return true;
}

Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8


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 order of operations in SetConfig: state is committed before validation, so a failed call leaves invalid configuration cached.

Impact

On specific platforms, the invalid cached configuration could cause integer overflows in buffer sizing and potentially a heap out-of-bounds write, but the report states this is theoretical and no proof of concept was executed.

What the attacker needed

Compromised renderer; pipeline keeps feeding after error; platform-specific overflow behaviour

The fix

SetConfig should validate the configuration first and only write to internal state when validation succeeds.

How it was found

  1. A compromised renderer sends an audio decoder configuration with an unusually high channel count.
  2. The media pipeline applies a mid-stream configuration update, calling SetConfig with that configuration.
  3. SetConfig stores the configuration and then returns false because validation fails.
  4. Software decoder initialisation fails and the pipeline raises an asynchronous decode error.
  5. If the feeding loop still runs before teardown, another buffer is pushed to the decoder.
  6. The wrapper forwards the buffer to the backend decoder, which uses the cached invalid sample info.

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 decoder is the part of a media player that turns compressed audio into sound. Here it saves a new setting first and only afterwards checks whether the setting makes sense, so a rejected setting can stay in memory. The report only theorises that a later audio buffer might then be handled with that bad setting; no working attack was demonstrated.

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.