Skip to content
DoS Advisory Advanced CVE-2026-8579

Insufficient validation of untrusted input in Skia (CVE-2026-8579)

Skia's ReadPageSizes function deserialises page dimensions without upper-bound validation, allowing a compromised renderer to supply huge page sizes. This causes massive memory allocations and integer overflows in the PrintCompositor process, leading to a denial of service.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 48 days

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: SkMultiPictureDocument::ReadPageSizes deserializes page dimensions without checking for excessively large values. A compromised renderer can send a malicious MSKP file with huge page sizes, causing massive memory allocations and integer overflows in Skia, leading to a Denial of Service in the PrintCompositor process.

Affected files:

  • third_party/skia/src/utils/SkMultiPictureDocument.cpp
  • third_party/skia/src/pdf/SkPDFDocument.cpp
  • third_party/skia/src/core/SkDocument.cpp
  • components/services/print_compositor/print_compositor_impl.cc

Estimated timestamp from git blame: 2025-03-24

Summary

The SkMultiPictureDocument::ReadPageSizes function in Skia lacks upper-bound validation for page dimensions read from its input stream. This enables a compromised renderer to specify extremely large page sizes that are subsequently used by the PrintCompositor process. This issue leads to a Denial of Service via memory exhaustion and triggers integer overflows in downstream Skia components like mask filters.

Technical Details

When processing a SkMultiPictureDocument (MSKP) in the PrintCompositor utility process, the following data flow occurs:

  1. Deserialization: In third_party/skia/src/utils/SkMultiPictureDocument.cpp, the ReadPageSizes function reads SkSize values (floats) directly from the stream without any validation against upper bounds, infinity, or NaN.
  2. Page Initiation: These unvalidated sizes are passed through PrintCompositorImpl to SkDocument::beginPage in third_party/skia/src/core/SkDocument.cpp.
  3. PDF Generation: In third_party/skia/src/pdf/SkPDFDocument.cpp, the onBeginPage method multiplies the dimensions by fRasterScale. The resulting value is rounded to an integer via toRound(), which saturates to INT32_MAX. This results in an SkPDFDevice being initialized with massive bounds.
  4. Integer Overflows in Filters: If the attacker also includes a drawing command with an SkTableMaskFilter, the large device bounds propagate to SkPDFDevice::internalDrawPathWithFilter. The bounds are used to compute the size of masks. For example, in SkTableMaskFilterImpl::filterMask, the calculation dst->rowBytes() = SkAlign4(dst->fBounds.width()) can overflow int32_t, and dst->computeImageSize() returns 0 due to safeMul32 returning 0 for sizes > INT32_MAX. This leads to a 0-byte allocation followed by a massive linear out-of-bounds write of >2GB, causing an immediate segmentation fault.

Impact

An attacker with control over a renderer process can send a malicious MSKP via the DidPrintContentParams.metafile_data_region IPC. This reachability allows the attacker to reliably crash the sandboxed PrintCompositor utility process by triggering massive out-of-bounds writes (which are guaranteed to hit unmapped guard pages) or OOMs, resulting in a Denial of Service.

Reproduction Steps (Suggested)

  1. In a compromised renderer, generate an MSKP file.
  2. Add a page with SkSize set to dimensions that scale to approximately INT32_MAX (e.g., width = 1073741821, height = 2).
  3. Add a path to the page that fills the dimensions, and apply an SkTableMaskFilter to the paint.
  4. Send the MSKP via IPC to the PrintCompositor.
  5. Observe the PrintCompositor process crash due to an OOM or a segmentation fault when Skia attempts to allocate or write to the massive mask buffer.

Suggested Fix

In third_party/skia/src/utils/SkMultiPictureDocument.cpp, ReadPageSizes should validate the deserialized SkSize values. If the width or height is negative, non-finite, or exceeds a reasonable maximum document size, the function should return false to reject the malformed document.

Evaluated with Chrome root at commit: 0eb4855bda702feaaa8b899336664f97e3df88b8


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. Please feel free to reach out to me if you have concerns or feedback.

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 ReadPageSizes function lacks validation for upper bounds, infinity, or NaN on deserialised page dimensions.

Impact

An attacker with control over a renderer process can reliably crash the sandboxed PrintCompositor utility process by triggering massive out-of-bounds writes or OOMs, resulting in a denial of service.

What the attacker needed

Compromised renderer process

The fix

ReadPageSizes should validate deserialised SkSize values and reject documents with negative, non-finite, or excessively large dimensions.

How it was found

  1. In a compromised renderer, generate an MSKP file.
  2. Add a page with SkSize set to dimensions that scale to approximately INT32_MAX.
  3. Add a path to the page that fills the dimensions, and apply an SkTableMaskFilter to the paint.
  4. Send the MSKP via IPC to the PrintCompositor.
  5. Observe the PrintCompositor process crash due to an OOM or a segmentation fault.

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 renderer process (the part of the browser that draws web pages) can send a specially crafted file to a printing component. That file contains page sizes that are far too large, and the printing component does not check them. This makes the printing component try to allocate enormous amounts of memory or write outside its buffers, which crashes it.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.