Google Chrome VideoEncoder av1_svc_check_reset_layer_rc_flag use-after-free vulnerability
A use-after-free vulnerability in Google Chrome's VideoEncoder allows a specially crafted web page to trigger a heap buffer overflow by reconfiguring the encoder without scalability mode, leading to a negative index in the layer context array. An attacker could exploit this to cause memory corruption, potentially leading to code execution or denial of service.
Originally disclosed on Cisco Talos
A use-after-free vulnerability exists in the VideoEncoder av1svccheckresetlayerrcflag functionality of Google Chrome 113.0.5672.127 (64-bit) and Chromium 115.0.5779.0 (Build) (64-bit). A specially crafted web page can lead to a use-after-free.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
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 configuration allows number_temporal_layers to be set to zero when scalability mode is omitted, and this zero value is used in a macro that computes a negative array index without validation.
Impact
An attacker could exploit this to cause a heap buffer overflow, potentially leading to code execution or denial of service, as demonstrated by a crash in Chrome on Windows.
What the attacker needed
Victim visits a malicious web page; Chrome version 113.0.5672.127 or 115.0.5779.0
The fix
The vulnerability was fixed by the vendor, as indicated by the patch release in the timeline.
How it was found
- Create a video encoder with scalabilityMode set via JavaScript.
- Reconfigure the encoder without scalabilityMode, causing number_temporal_layers to be zero.
- Encode multiple video frames with encode/configure calls to satisfy conditions for [redacted].
- Trigger the call chain vpx_codec_enc_config_set -> encoder_set_config -> av1_change_config -> check_reset_rc_flag -> [redacted].
- The negative index leads to out-of-bounds heap access, causing a crash.
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.
This report describes a bug in Chrome's video encoding code. When a web page repeatedly changes video encoder settings, a value called number_temporal_layers can become zero, which is then used to calculate an array index. That index becomes negative, causing the program to read memory outside the intended array, which can crash the browser or potentially allow an attacker to run malicious 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.