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

Insufficient validation of untrusted input in Codecs (CVE-2026-11079)

Chromium's H.264 parser and decoder fail to validate the first_mb_in_slice field for non-initial slices of a picture, and when hardware acceleration via VA-API is used, this unvalidated value is passed to the GPU driver. An attacker could potentially trigger an out-of-bounds DMA write in the GPU or Utility process by crafting a malicious video stream.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 58 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 security team.

Overview: Chromium's H.264 parser and decoder fail to validate the first_mb_in_slice field for non-initial slices of a picture. When hardware acceleration via VA-API is used, this unvalidated value is passed to the GPU driver. This can potentially lead to an out-of-bounds DMA write in the GPU or Utility process.

Affected files:

  • media/gpu/h264_decoder.cc
  • media/parsers/h264_parser.cc
  • media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc

Estimated timestamp from git blame: 2018-07-17

Description

A potential high-severity memory corruption vulnerability exists in Chromium's hardware-accelerated H.264 video decoding pipeline. The first_mb_in_slice field within H.264 slice headers is not correctly validated against the picture's dimensions for multi-slice frames. When processing subsequent slices in a picture, an arbitrarily large value can be passed directly to the VA-API driver, which may result in an out-of-bounds (OOB) memory write by the hardware decoder.

Root Cause Analysis

  1. Lack of bounds check in parsing: In media/parsers/h264_parser.cc, H264Parser::ParseSliceHeader reads the first_mb_in_slice field from the bitstream using READ_UE_OR_RETURN. However, it never validates that this value is within the bounds of the total macroblocks in the picture defined by the Sequence Parameter Set (SPS).
  2. Validation bypass in decoding: In media/gpu/h264_decoder.cc, H264Decoder::PreprocessCurrentSlice contains a validation check (slice_hdr->first_mb_in_slice != 0). However, this check is nested inside an if (IsNewPrimaryCodedPicture(...)) block. For the second and subsequent slices of a multi-slice picture, this condition evaluates to false, causing the decoder to skip the check entirely.
  3. Propagation to Hardware: The unvalidated value is passed to the VA-API delegate in media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc. The SubmitSlice function copies the value directly into the VASliceParameterBufferH264 struct (SHDRToSP(first_mb_in_slice)).
  4. OOB Write: This struct is submitted to the underlying VA-API driver (e.g., Intel iHD or Mesa). Hardware drivers typically use first_mb_in_slice to compute the memory offset within the destination GPU surface for the decoded macroblock data. An abnormally large value can cause the GPU DMA to write out-of-bounds, corrupting the address space of the GPU process (Linux Desktop) or the sandboxed Utility process (ChromeOS OOP-VD).

Suggested Attacker Steps

Note: These are suggested/potential steps, as our tooling agent doesn't yet have the ability to run code to verify a working exploit.

  1. Craft a malicious H.264 video stream.
  2. Define a Sequence Parameter Set (SPS) with a small resolution (e.g., 320x240, yielding 300 macroblocks).
  3. Within an IDR frame, provide a valid first slice with first_mb_in_slice = 0.
  4. Provide a second slice for the same frame with a malformed, massive first_mb_in_slice value (e.g., 65535).
  5. Embed this video stream into a web page using an HTML5 <video> tag or the WebCodecs API.
  6. When a victim views the page on a VA-API enabled system, the unvalidated field will potentially trigger an out-of-bounds write during hardware decoding.

Suggested Fix

Add a bounds check to ensure first_mb_in_slice is strictly less than the total number of macroblocks in the picture. This can be done in H264Decoder::ProcessCurrentSlice (or PreprocessCurrentSlice outside the IsNewPrimaryCodedPicture block) since the SPS and picture dimensions are known at that stage.

For example, calculate the picture size in macroblocks (based on sps->pic_width_in_mbs_minus1 and sps->pic_height_in_map_units_minus1) and add a check:

C++
if (slice_hdr->first_mb_in_slice >= PicSizeInMbs) {
    return H264Accelerator::Status::kFail;
}

Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad


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 decoder only validates first_mb_in_slice for the first slice of a picture and skips the check for subsequent slices, allowing an out-of-range value to reach the hardware driver.

Impact

An abnormally large value can cause the GPU DMA to write out-of-bounds, corrupting the address space of the GPU process (Linux Desktop) or the sandboxed Utility process (ChromeOS OOP-VD).

What the attacker needed

VA-API enabled system; Victim views a crafted video

The fix

Add a bounds check to ensure first_mb_in_slice is strictly less than the total number of macroblocks in the picture, for example in H264Decoder::ProcessCurrentSlice or PreprocessCurrentSlice outside the IsNewPrimaryCodedPicture block.

How it was found

  1. Craft a malicious H.264 video stream.
  2. Define a Sequence Parameter Set (SPS) with a small resolution (e.g., 320x240, yielding 300 macroblocks).
  3. Within an IDR frame, provide a valid first slice with first_mb_in_slice = 0.
  4. Provide a second slice for the same frame with a malformed, massive first_mb_in_slice value (e.g., 65535).
  5. Embed this video stream into a web page using an HTML5 <video> tag or the WebCodecs API.
  6. When a victim views the page on a VA-API enabled system, the unvalidated field will potentially trigger an out-of-bounds write during hardware decoding.

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 file is made of slices, and each slice says where in the picture it belongs. The software that reads these videos does not check that the position is inside the picture, so a crafted video can tell the graphics hardware to write data outside the allowed memory area. This could crash the browser or, in theory, let an attacker run 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.