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

Insufficient data validation in Media (CVE-2026-5907)

The H.264 parser reads slice_qp_delta without checking it against the range the spec requires, unlike the neighbouring offset fields which are validated. On VA-API platforms the unchecked value is narrowed to an 8-bit integer and passed to the GPU driver, which could use an out-of-range quantisation parameter as an array index and read out of bounds in the kernel.

Luke Francis Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 52 days

Report description

Missing range validation on slice_qp_delta


Bug location

Where do you want to report your vulnerability?

Chrome VRP – Report security issues affecting the Chrome browser. See program rules

Which URL (or repository) have you found the vulnerability in?

https://chromium.googlesource.com/chromium/src/+/main/media/parsers/h264_parser.cc


The problem

Please describe the technical details of the vulnerability

At h264_parser.cc:1485, slice_qp_delta is read via READ_SE_OR_RETURN with no range check. The H.264 spec (ITU-T H.264 §7.4.3) requires SliceQPY = 26 + pic_init_qp_minus26 + slice_qp_delta to be in [0, 51 + 6*bit_depth_luma_minus8]. The sibling fields slice_alpha_c0_offset_div2 and slice_beta_offset_div2 ARE validated 14 lines later at lines 1499 and 1502:

// Line 1485: not validated:
READ_SE_OR_RETURN(&shdr->slice_qp_delta);
// Missing: range check on SliceQPY

// Lines 1499/1502: validated:
READ_SE_OR_RETURN(&shdr->slice_alpha_c0_offset_div2);
IN_RANGE_OR_RETURN(shdr->slice_alpha_c0_offset_div2, -6, 6);
READ_SE_OR_RETURN(&shdr->slice_beta_offset_div2);
IN_RANGE_OR_RETURN(shdr->slice_beta_offset_div2, -6, 6);

READ_SE_OR_RETURN accepts exp-Golomb coded values up to approximately ±2³⁰. The unvalidated int value flows from the parser through H264Decoder to the VA-API delegate at h264_vaapi_video_decoder_delegate.cc:504, where SHDRToSP(slice_qp_delta) assigns it to VASliceParameterBufferH264.slice_qp_delta (int8_t), causing int→int8_t narrowing. For example:

  • slice_qp_delta=500 → int8_t truncation → -12
  • slice_qp_delta=100 → survives truncation as 100, producing SliceQPY=126 — an OOB index into the 52-entry QP table
  • slice_qp_delta=128 → int8_t truncation → -128 (sign flip)

This is the same bug class as Issue 482862710 (second_chroma_qp_index_offset, P1/S1), and was not addressed by the follow-up CLs:

  • CL 7572949: fixed second_chroma_qp_index_offset
  • CL 7574217: fixed pic_parameter_set_id, idr_pic_id, changing_slice_group_idc
  • CL 7577373: fixed H.265 parser fields

None of these CLs addressed slice_qp_delta.

Platform scope: VA-API only (Linux x86, ChromeOS x86). D3D11 passes raw bitstream to the DXVA decoder and does not extract slice_qp_delta into separate struct fields. Confirmed via grep of media/gpu/windows/ showing zero matches for slice_qp_delta. V4L2 similarly does not extract it into V4L2 control structs, also confirmed via grep of media/gpu/v4l2/ showing zero matches. The parser-level spec violation affects all platforms, but only VA-API has the int→int8_t narrowing as a concrete exploitation vector.

Fix: Add range validation matching the spec constraint on SliceQPY. A conservative static bound:

IN_RANGE_OR_RETURN(shdr->slice_qp_delta, -51, 51);

Or the precise spec-derived bound:

int slice_qp_y = 26 + pps->pic_init_qp_minus26 + shdr->slice_qp_delta;
TRUE_OR_RETURN(slice_qp_y >= 0 && slice_qp_y <= 51 + 6 * sps->bit_depth_luma_minus8);

Reproduction: I have a standalone C++ PoC (28-byte Annex-B bitstream with slice_qp_delta=500) and a Chromium-style unit test with some test cases that demonstrate:

  1. Parser accepts extreme values (500, -500, 1000, -1000) — kOk
  2. int→int8_t truncation: 500 → -12
  3. Values just outside spec range (26, -27) accepted
  4. int8_t sign flip: 128 → -128

Impact analysis

Same trust boundary analysis as Issue 482862710. The unvalidated slice_qp_delta reaches kernel GPU drivers via the VA-API path when a user visits a page containing a malicious <video> element. The GPU sandbox does not mitigate this as the GPU process is designed to make VA-API calls, so malformed parameters reach the kernel through the sandbox's allowed syscall surface.

The out-of-range SliceQPY value is used by drivers for QP-dependent operations (quantization parameter lookup, deblocking filter strength). With slice_qp_delta=100 (survives int8_t truncation intact), SliceQPY = 26 + 0 + 100 = 126, overshooting the 52-entry QP table by 74 entries. If the driver uses this for array indexing without clamping, this is a kernel OOB read.

CVE-2022-21813 and CVE-2022-21814 (NVIDIA) were this exact bug class. The parser must enforce spec compliance regardless of individual driver behavior.


The cause

What version of Chrome have you found the security issue in?

Current main branch

Is the security issue related to a crash?

No, it is not related to a crash.

Choose the type of vulnerability

Memory Corruption (in a non-sandboxed process)

How would you like to be publicly acknowledged for your report?

Luke Francis

The original report as published on the Chromium issue tracker, by Luke Francis. 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

The parser reads slice_qp_delta with no range validation, so an out-of-spec value flows onward and is narrowed from int to int8_t when building the VA-API slice parameter buffer.

Impact

If a driver indexes its quantisation table without clamping, the out-of-range value could cause a kernel out-of-bounds read; the report notes the GPU sandbox does not block this path, and the issue is limited to VA-API platforms.

What the attacker needed

Victim opens a page with a malicious video; VA-API platform (Linux or ChromeOS x86); driver indexes QP table without clamping

The fix

The parser should reject slice_qp_delta values that put SliceQPY outside the spec range, either with a conservative static bound or the precise spec-derived check.

How it was found

  1. Craft an Annex-B H.264 bitstream whose slice header carries an extreme slice_qp_delta value.
  2. Load the bitstream in a page containing a video element so the media pipeline parses it.
  3. Observe that the parser returns success for values far outside the spec range.
  4. Observe the int-to-int8_t truncation, for example a large positive value becoming a small negative one.
  5. Observe that a value such as 100 survives truncation and yields a SliceQPY of 126, beyond the 52-entry table.

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.

Video files are stored in a compressed format, and the browser has to read small header values that tell the decoder how to reconstruct each frame. One of those values, a quantisation setting, is supposed to stay within a fixed range, but the parser accepts almost any number. That unchecked number is then squeezed into a much smaller data type and handed to the graphics driver, which may use it to look up a table entry that does not exist.

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 by Luke Francis

View all

5 more disclosed reports, best first.

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.