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

Integer overflow in libyuv (CVE-2026-11678)

An integer overflow in libyuv downscaling routines can produce negative row strides, causing a backward out-of-bounds heap read. If triggered via video frame conversion in Chromium, a compromised renderer could potentially disclose memory from the GPU process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 13 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: A potential integer overflow in multiple libyuv downscaling routines can result in negative row strides. When pointer arithmetic is applied on 64-bit systems, this can lead to a sign-extended backward out-of-bounds heap read. If triggered via video frame conversion in Chromium, this could potentially allow a compromised renderer to disclose memory from the GPU process.

Affected files:

  • third_party/libyuv/source/scale.cc
  • third_party/libyuv/source/scale_argb.cc
  • third_party/libyuv/source/scale_uv.cc

Estimated timestamp from git blame: 2013-05-30

Root Cause Analysis

In third_party/libyuv/source/scale.cc, scale_argb.cc, and scale_uv.cc, multiple optimized downscaling functions (such as ScalePlaneDown2, ScalePlaneDown4, ScaleARGBDown2, ScaleARGBDown4Box, ScaleUVDown2, and ScaleUVDown4Box) calculate the row stride using 32-bit signed integer arithmetic.

For example, in ScalePlaneDown2 (third_party/libyuv/source/scale.cc:54):

C
int row_stride = src_stride * 2;

Additionally, the entry point ScalePlane (third_party/libyuv/source/scale.cc:1943) accepts stride arguments as a 32-bit signed int src_stride. When Chromium passes a 64-bit size_t stride from a media::VideoFrame to libyuv, the value is implicitly narrowed and converted to a signed 32-bit integer.

If the stride is extremely large (for example, 2147483649 or 0x80000001 in hex), the signed representation is interpreted as negative (-2147483647). During pointer updates, adding this negative value to the 64-bit source pointer results in sign-extension to 64 bits:

C
src_ptr += src_stride;  // or src_ptr += row_stride;

This causes the pointer to jump backward (e.g., ~2 GB prior to the source buffer) into unrelated heap memory, resulting in a backward out-of-bounds read when processing subsequent rows.

Potential Attack Scenario

An attacker could potentially trigger this vulnerability by performing the following steps:

  1. A compromised renderer allocates a shared memory region of sufficient size to pass layout validation checks.
  2. The renderer transmits a serialized media.mojom.VideoFrame over Mojo to the GPU process, specifying an extremely large stride value (e.g., 2147483649).
  3. The GPU process deserializes the frame and verifies the layout via VideoFrameLayout::FitsInContiguousBufferOfSize. Because the shared memory region is large enough to hold the computed plane size, validation succeeds.
  4. The GPU process invokes VideoFrameConverter::ConvertAndScale (commonly used by hardware video encoder adapters or video processors), which routes the frame to libyuv::ScalePlane.
  5. The large stride is truncated to a negative signed integer inside libyuv, causing the downscaling loops to read memory out of bounds and write the leaked data into the destination frame.
  6. The encoded frame containing the leaked heap bytes is returned to the renderer, facilitating a cross-origin information disclosure.

Note: These steps are suggested/potential based on static code analysis, as our tooling environment does not currently have the capability to run code or execute a proof of concept.

Suggested Fix

Modify the affected downscaling routines in third_party/libyuv to compute row strides using ptrdiff_t or intptr_t instead of int, mirroring the safe implementation pattern already used in sibling functions such as ScaleARGBDownEven:

C
ptrdiff_t row_stride = (ptrdiff_t)((dy >> 16) * (intptr_t)src_stride);

Alternatively, validate that incoming stride values in ScalePlane and related wrappers do not exceed safe thresholds (such as INT_MAX / 4) before performing any scaling arithmetic.

Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8


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.

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 row stride is computed and stored in a 32-bit signed integer, so a large 64-bit stride is narrowed to a negative value and sign-extended during pointer arithmetic.

Impact

A compromised renderer could potentially disclose memory from the GPU process, but the report notes this is based on static analysis without a proof of concept.

What the attacker needed

Compromised renderer; shared memory large enough for validation; video frame conversion path used

The fix

The affected routines should compute row strides using ptrdiff_t or intptr_t, or validate that incoming stride values do not exceed safe thresholds.

How it was found

  1. A compromised renderer allocates a shared memory region large enough to pass layout validation.
  2. The renderer sends a serialized video frame over Mojo with an extremely large stride value.
  3. The GPU process deserializes the frame and validates the layout, which succeeds because the shared memory is large enough.
  4. The GPU process calls the video frame converter, which routes the frame to libyuv scaling.
  5. The large stride is truncated to a negative signed integer inside libyuv, causing out-of-bounds reads.
  6. The encoded frame containing leaked heap bytes is returned to the renderer.

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 stride is the number of bytes between the start of one row of an image and the next. If that number is stored in a small signed integer, a very large value can wrap around and become negative, so the program reads memory before the image instead of after it. In this case a malicious renderer could make the GPU process read and return memory it should not see.

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.