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

Heap buffer overflow in Video (CVE-2026-10949)

A desynchronisation between Chrome's AV1 VAAPI encoder delegate and libaom's rate controller means the encoder caches the initial temporal layer count while the SVC tracker adapts to a higher count requested by the renderer. A compromised renderer could then pass an out-of-bounds temporal index to libaom, causing a roughly 13.6 KB heap out-of-bounds write in the GPU process that could lead to arbitrary code execution.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 44 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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A desynchronization between Chrome's AV1VaapiVideoEncoderDelegate and the libaom rate controller can lead to a massive heap out-of-bounds write in the GPU process. When a compromised renderer dynamically increases the temporal layer count, Chrome's internal SVC tracker updates, but libaom's memory buffers do not. Subsequent frame encodes pass out-of-bounds temporal indices to libaom, triggering an ~13.6 KB structure copy beyond the allocated bounds.

Affected files:

  • media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc
  • media/gpu/svc_layers.cc
  • third_party/libaom/source/libaom/av1/ratectrl_rtc.cc
  • third_party/libaom/source/libaom/av1/encoder/svc_layercontext.c

Estimated timestamp from git blame: 2024-12-04

Summary

A potential heap buffer overflow exists in the GPU process during AV1 video encoding via VAAPI. The vulnerability is caused by a desynchronization between AV1VaapiVideoEncoderDelegate's cached temporal layer count and the dynamically updated SVCLayers configuration. A compromised renderer can leverage this to trigger a ~13.6 KB out-of-bounds heap write, which could lead to arbitrary code execution within the GPU process.

Technical Details

  1. In AV1VaapiVideoEncoderDelegate::Initialize (media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc), the initial temporal layer count is cached in num_temporal_layers_.
  2. When the renderer requests a bitrate change via RequestEncodingParametersChangeWithLayers, AV1VaapiVideoEncoderDelegate::UpdateRates is called.
  3. UpdateRates configures libaom using the stale cached value: rc_config.ts_number_layers = num_temporal_layers_;. As a result, libaom does not resize its internal layer_context array.
  4. However, immediately after this, UpdateRates calls svc_layers_->RecreateSVCLayersIfNeeded(current_params_.bitrate_allocation). This component does adapt to the new, higher temporal layer count (e.g., from 2 to 3) requested by the attacker.
  5. During subsequent frame encoding in PrepareEncodeJob, svc_layers_->GetPictureParamAndMetadata() returns a temporal_idx based on the new 3-layer structure. For example, on the second frame, it returns temporal_idx = 2.
  6. This temporal_idx is passed to rate_ctrl_->ComputeQP(frame_params). Inside libaom's AV1RateControlRTC::ComputeQP (third_party/libaom/source/libaom/av1/ratectrl_rtc.cc), the layer index is calculated using the macro LAYER_IDS_TO_IDX(spatial_id, temporal_layer_id, number_temporal_layers). Using the out-of-bounds temporal ID but the stale temporal layer count (LAYER_IDS_TO_IDX(0, 2, 2)), it evaluates to 2.
  7. av1_save_layer_context (third_party/libaom/source/libaom/av1/encoder/svc_layercontext.c) retrieves a pointer to &cpi_->svc.layer_context[2]. Since the array was only allocated for 2 elements (indices 0 and 1), this is an out-of-bounds pointer.
  8. Finally, av1_save_layer_context performs massive full-struct assignments to this pointer: lc->rc = cpi->rc; and lc->p_rc = cpi->ppi->p_rc;. Because PRIMARY_RATE_CONTROL contains large arrays like int q_history[1000] and REGIONS regions[150], this results in an out-of-bounds heap write of approximately 13.6 KB.

Suggested Reproduction Steps

(Note: These are potential steps based on static code analysis, as our tooling agent does not yet have the ability to run code and provide a working proof-of-concept.)

  1. From a compromised renderer, establish a media.mojom.VideoEncodeAccelerator connection to the GPU process.
  2. Call Initialize to set up AV1 hardware encoding with an initial configuration of 2 temporal layers.
  3. Call RequestEncodingParametersChangeWithLayers with a VideoBitrateAllocation containing active bitrates for 3 temporal layers.
  4. Send multiple Encode requests. For a 3-layer temporal pattern, the second frame will be assigned temporal_idx = 2.
  5. The GPU process will pass this out-of-bounds index to libaom, triggering the massive OOB heap write and likely causing an ASan crash or memory corruption in av1_save_layer_context.

Suggested Fix

In AV1VaapiVideoEncoderDelegate::UpdateRates, validate the new bitrate_allocation. If the requested number of temporal layers differs from num_temporal_layers_, UpdateRates should either:

  1. Reject the change and return false, as dynamic layer count changes may not be supported by the current hardware encoder lifecycle.
  2. If supported, securely update num_temporal_layers_ to match the new allocation before configuring rc_config.ts_number_layers, ensuring that libaom properly reallocates its internal context arrays.

Evaluated with Chrome root at commit: 7353d249d9cacf9c7218e1d7b8a39cf39c72d646


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. 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 encoder delegate caches the initial temporal layer count and configures libaom with that stale value before recreating the SVC layers, so libaom's layer context array is never resized to match the new layer count.

Impact

A compromised renderer could cause a heap out-of-bounds write in the GPU process that may lead to arbitrary code execution; the report notes the reproduction steps are based on static analysis and no working proof-of-concept was run.

What the attacker needed

Compromised renderer; AV1 VAAPI hardware encoding available

The fix

UpdateRates should either reject a change in temporal layer count or update the cached count before configuring libaom so its context arrays are reallocated.

How it was found

  1. From a compromised renderer, open a video encode accelerator connection to the GPU process.
  2. Initialise AV1 hardware encoding with two temporal layers.
  3. Request an encoding parameter change with active bitrates for three temporal layers.
  4. Send several encode requests so a frame is assigned the out-of-bounds temporal index.
  5. The GPU process passes the index to libaom, causing the out-of-bounds heap 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.

Chrome splits its work into processes, and the GPU process handles video encoding. A renderer that has already been compromised can ask the encoder to change how many 'temporal layers' (quality tiers used in video compression) it uses. Chrome's own bookkeeping updates to the new number, but the third-party compression library it relies on keeps its old, smaller buffers, so a later frame writes past the end of memory. Writing past allocated memory can crash the process or, in the worst case, let an attacker run their own code.

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.