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

Use after free in Video (CVE-2026-6302)

A use-after-free occurs in the AV1 encoder when a scalability mode change combined with a resolution change triggers rapid encoder resets while row-mt worker threads are still running. An attacker could cause a worker thread to read freed encoder state, leading to memory corruption in the browser process.

Syn4pse Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 23 days

Summary

When the AV1 encoder undergoes SVC reconfiguration with concurrent resolution changes, row-mt worker threads continue access per-block state from a prior encode configuration that has already been freed, leading to the UAF.

Details

The WebRTC SVC spec exposes scalabilityMode as a mutable property on RTCRtpEncodingParameters. Blink forwards this string directly into the native layer in RTCRtpSender::ToRtpParameters:

C++
if (encoding->hasScalabilityMode()) {
  webrtc_encoding.scalability_mode = encoding->scalabilityMode().Utf8();
}

WebRTC maps the mode string into AV1 SVC configuration via SetAv1SvcConfig, which also clamps spatial layers against the current frame dimensions:

C++
if (ScalabilityMode reduced = LimitNumSpatialLayers(
        *scalability_mode,
        GetLimitedNumSpatialLayers(video_codec.width, video_codec.height));
    *scalability_mode != reduced) {
  scalability_mode = reduced;
}

Any scalabilityMode change forces a full encoder reset via VideoStreamEncoder::RequiresEncoderReset:

C++
if (new_send_codec.GetScalabilityMode() !=
    prev_send_codec.GetScalabilityMode()) {
  return true;
}

This means that mode changes combined with resolution changes (which alter the clamped spatial layer count) can produce a rapid sequence of encoder resets.

The encoder reset tears down and rebuilds internal AV1 state, but does not ensure that in-flight row-mt worker threads have drained before freeing backing buffers. The non-RD encode path follows this call chain on worker threads:

enc_row_mt_worker_hook → av1_encode_sb_row → av1_nonrd_use_partition → pick_sb_modes_nonrd → av1_nonrd_pick_inter_mode_sb → av1_block_yrd

Within av1_block_yrd, the worker reads per-block coefficient and reference buffers. The local buffers are declared by the DECLARE_BLOCK_YRD_BUFFERS() macro in nonrd_opt.c. When an encoder reset frees or recycles the backing encoder state while a worker thread is still executing this path, the worker access freed memory, leading to the UAF.

Reproduction

Run chromium (e.g., https://storage.googleapis.com/chromium-browser-asan/linux-release/asan-linux-release-1603396.zip) with:

chrome --no-sandbox poc.html

You would observe the UAF shown in asan.txt.

The original report as published on the Chromium issue tracker, by Syn4pse. 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 encoder reset frees or recycles AV1 encoder state without waiting for in-flight row-mt worker threads to finish, so those threads access freed per-block buffers.

What the attacker needed

Victim loads a crafted page; AV1 encoding with SVC enabled

How it was found

  1. Run Chromium with the no-sandbox flag and the provided proof-of-concept HTML file.
  2. Observe the use-after-free reported in the ASan output.

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.

The browser's video encoder splits work across several background threads. When the video settings change quickly, the encoder throws away its old working memory and builds new memory, but the background threads may still be reading the old memory. Reading memory that has already been freed is called a use-after-free, and it can crash the browser or let an attacker take control.

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 by Syn4pse

View all

13 more disclosed reports, best first.

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.