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.ccmedia/gpu/svc_layers.ccthird_party/libaom/source/libaom/av1/ratectrl_rtc.ccthird_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
- In
AV1VaapiVideoEncoderDelegate::Initialize(media/gpu/vaapi/av1_vaapi_video_encoder_delegate.cc), the initial temporal layer count is cached innum_temporal_layers_. - When the renderer requests a bitrate change via
RequestEncodingParametersChangeWithLayers,AV1VaapiVideoEncoderDelegate::UpdateRatesis called. UpdateRatesconfigureslibaomusing the stale cached value:rc_config.ts_number_layers = num_temporal_layers_;. As a result,libaomdoes not resize its internallayer_contextarray.- However, immediately after this,
UpdateRatescallssvc_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. - During subsequent frame encoding in
PrepareEncodeJob,svc_layers_->GetPictureParamAndMetadata()returns atemporal_idxbased on the new 3-layer structure. For example, on the second frame, it returnstemporal_idx = 2. - This
temporal_idxis passed torate_ctrl_->ComputeQP(frame_params). Insidelibaom'sAV1RateControlRTC::ComputeQP(third_party/libaom/source/libaom/av1/ratectrl_rtc.cc), the layer index is calculated using the macroLAYER_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 to2. 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.- Finally,
av1_save_layer_contextperforms massive full-struct assignments to this pointer:lc->rc = cpi->rc;andlc->p_rc = cpi->ppi->p_rc;. BecausePRIMARY_RATE_CONTROLcontains large arrays likeint q_history[1000]andREGIONS 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.)
- From a compromised renderer, establish a
media.mojom.VideoEncodeAcceleratorconnection to the GPU process. - Call
Initializeto set up AV1 hardware encoding with an initial configuration of 2 temporal layers. - Call
RequestEncodingParametersChangeWithLayerswith aVideoBitrateAllocationcontaining active bitrates for 3 temporal layers. - Send multiple
Encoderequests. For a 3-layer temporal pattern, the second frame will be assignedtemporal_idx = 2. - 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 inav1_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:
- Reject the change and return
false, as dynamic layer count changes may not be supported by the current hardware encoder lifecycle. - If supported, securely update
num_temporal_layers_to match the new allocation before configuringrc_config.ts_number_layers, ensuring thatlibaomproperly 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.
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
- From a compromised renderer, open a video encode accelerator connection to the GPU process.
- Initialise AV1 hardware encoding with two temporal layers.
- Request an encoding parameter change with active bitrates for three temporal layers.
- Send several encode requests so a frame is assigned the out-of-bounds temporal index.
- 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.