Out of bounds read and write in Codecs (CVE-2026-15114)
The AV1 decoder in Chromium only signals a configuration change when dimensions, profile, colour space or bit depth change, so other sequence-level parameters can be swapped mid-stream without recreating the hardware decode context. This could exhaust the surface pool and stall playback, or, depending on the GPU driver, cause out-of-bounds reads and writes in the GPU process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 33 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: The AV1 decoder in Chromium does not trigger a configuration change (kConfigChange) when certain sequence-level parameters change mid-stream without a dimension or profile change. This allows updated stream-level properties to be submitted to an existing hardware decode context. This state inconsistency can lead to frame pool exhaustion on the Chromium side, or potential driver-side out-of-bounds reads/writes if the platform's GPU driver fails to dynamically reallocate internal scratch buffers.
Affected files:
media/gpu/av1_decoder.ccmedia/gpu/vaapi/av1_vaapi_video_decoder_delegate.ccmedia/gpu/windows/d3d11_av1_accelerator.ccmedia/gpu/v4l2/v4l2_video_decoder_delegate_av1.cc
Estimated timestamp from git blame: 2020-11-14
Description
Inside AV1Decoder::DecodeInternal() (in media/gpu/av1_decoder.cc), a new ObuSequenceHeader is saved unconditionally when libgav1 reports a sequence header change (parser_->sequence_header_changed() is true). However, a configuration change (kConfigChange) is only returned to the calling client if a subset of parameters change (such as dimensions, profile, color space, or bit depth):
// media/gpu/av1_decoder.cc
if (parser_->sequence_header_changed()) {
...
current_sequence_header_ = parser_->sequence_header();
...
ClearReferenceFrames();
// Issues kConfigChange only if either the dimensions, profile or bit
// depth is changed.
if (frame_size_ != new_frame_size ||
visible_rect_ != new_visible_rect || profile_ != new_profile ||
bit_depth_ != new_bit_depth || is_color_space_change) {
...
return kConfigChange;
}
}
If an attacker crafts an AV1 bitstream where a subsequent sequence header keeps the maximum frame size, profile, and bit depth identical but flips other structural properties—such as use_128x128_superblock, film_grain_params_present, enable_cdef, or enable_restoration—the parser's ParametersChanged() evaluates to true, but kConfigChange is not returned.
Potential Consequences
1. Chromium-Side Buffer Pool Exhaustion (Denial of Service)
When film_grain_params_present is toggled mid-stream from false to true, the decoder requires twice as many surfaces because it must allocate separate display and reconstruction surfaces for film grain synthesis. However, since no kConfigChange is triggered, the buffer pool size is never renegotiated with the client decoder, and the decoder continues to use the existing smaller pool. This leads to surface allocation failures (CreateSurface returning nullptr), resulting in kRanOutOfSurfaces state and a complete playback stall/crash.
2. Driver-Side Memory Corruption (Out-of-Bounds Read/Write)
Under-the-hood GPU drivers (such as Intel iHD, Mesa, or vendor D3D11/V4L2 drivers) allocate internal scratch, line, and auxiliary buffers (such as CDEF scratch or loop-restoration line buffers) once during hardware decoding context creation based on the initial sequence parameters. When parameters like the superblock size flip mid-context (e.g., from 64x64 to 128x128) without context recreation, the driver may attempt to execute operations using the outdated, smaller buffer sizes. Depending on the platform's graphics driver implementation and validation rigor, this state mismatch could lead to driver-side heap out-of-bounds reads/writes in the GPU process.
Potential Reproduction Steps (Suggested)
(Note: These are suggested steps. Our analysis is based on static review of the codebase, and we have not run these steps programmatically.)
- Serve a video containing an AV1 stream with two consecutive sequence headers:
- Sequence Header A:
max_frame_width=256,max_frame_height=256,use_128x128_superblock=false,film_grain_params_present=false,enable_cdef=false. - Sequence Header B:
max_frame_width=256,max_frame_height=256,use_128x128_superblock=true,film_grain_params_present=true,enable_cdef=true.
- Sequence Header A:
- Observe that upon transitioning from Header A to Header B,
AV1Decoder::DecodeInternal()does not returnkConfigChangebecause the dimensions and profile are identical. - The updated parameters (superblock size, film grain, and CDEF flags) are transmitted directly to the active hardware decoder context via the accelerator delegates (e.g.,
SubmitDecode). - Monitor the GPU process for a playback stall (due to surface pool exhaustion) or potential memory corruption inside the platform-specific GPU driver.
Suggested Fix
Update the gating check for returning kConfigChange in media/gpu/av1_decoder.cc to also include any sequence header fields that alter allocation bounds, or trigger a full context recreation whenever any parameter in ParametersChanged() is modified:
// Suggested modification
if (frame_size_ != new_frame_size ||
visible_rect_ != new_visible_rect || profile_ != new_profile ||
bit_depth_ != new_bit_depth || is_color_space_change ||
current_sequence_header_->use_128x128_superblock != old_sequence_header.use_128x128_superblock ||
current_sequence_header_->film_grain_params_present != old_sequence_header.film_grain_params_present) {
...
return kConfigChange;
}
Evaluated with Chrome root at commit: e9507a33bb4148ee071aaaf8a7e9ad68770359bf
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.
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 check that decides whether to return kConfigChange only compares frame size, profile, bit depth and colour space, ignoring other sequence header fields that affect buffer allocation.
Impact
Playback could stall or crash from surface pool exhaustion, and depending on the platform's graphics driver the state mismatch could lead to heap out-of-bounds reads or writes in the GPU process.
What the attacker needed
Victim plays a crafted AV1 video; hardware-accelerated AV1 decoding in use; driver lacks dynamic buffer reallocation
The fix
The gating check for kConfigChange should also cover sequence header fields that alter allocation bounds, or a full context recreation should be triggered whenever any parameter changes.
How it was found
- Serve an AV1 stream whose first sequence header uses 64x64 superblocks, no film grain and no CDEF, with a fixed maximum frame size.
- Follow it with a second sequence header keeping the same frame size and profile but enabling 128x128 superblocks, film grain and CDEF.
- Observe that the decoder does not return kConfigChange when moving to the second header.
- The new parameters are passed to the active hardware decoder context through the accelerator delegates.
- Watch the GPU process for a playback stall from surface pool exhaustion or for memory corruption in the driver.
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 video decoder sets up a hardware decoding session based on the first description of the video stream, including how much memory to reserve. If a later description changes other settings without the decoder being told to start over, the old memory sizes are reused. The report suggests this mismatch could crash playback or, with some graphics drivers, let memory be read or written outside its intended bounds.
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.