Integer overflow in Skia (CVE-2026-10009)
An integer overflow in Skia's PathOps engine, reached through complex path geometry during PDF printing, can leave internal link arrays uninitialised and cause out-of-bounds reads and writes in the PrintCompositor utility process. An attacker who already controls a renderer could potentially bypass Site Isolation or achieve code execution, though the report is based on code analysis only.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 11 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: An integer overflow in Skia's PathOps engine can be triggered by providing highly complex path geometry during PDF printing. This flaw leads to out-of-bounds memory access in the PrintCompositor utility process, potentially allowing for Site Isolation bypass or Remote Code Execution.
Affected files:
third_party/skia/src/utils/SkClipStackUtils.cppthird_party/skia/src/pdf/SkPDFDevice.cppthird_party/skia/src/pdf/SkPDFGraphicStackState.cppcomponents/services/print_compositor/print_compositor_impl.ccprinting/common/metafile_utils.cc
Estimated timestamp from git blame: 2019-12-20
Potential Root Cause
A vulnerability has been identified in the Skia PathOps engine, specifically within the SkPathWriter::assemble() function in third_party/skia/src/pathops/SkPathWriter.cpp. This function is responsible for joining "partial contours" (open path segments) that remain after complex boolean operations (like Simplify or Op).
The function calculates the number of potential endpoint pairs using 32-bit signed integer arithmetic:
const int entries = endCount * (endCount - 1) / 2;
If endCount (the number of endpoints) is approximately 46,342 or greater, the product endCount * (endCount - 1) overflows the maximum value for a 32-bit signed integer (INT_MAX). This results in entries becoming negative or incorrectly small.
Technical Details
When this overflow occurs, the following memory corruption primitives are triggered:
- Skipped Initializations: The loop that populates the distance and link arrays (
for (rIndex = 0; rIndex < entries; ++rIndex)) is skipped ifentriesis negative. This leaves thesLinkandeLinkarrays populated with their default value ofSK_MaxS32(2,147,483,647). - Massive Out-of-Bounds Read: In the subsequent assembly loop, the code uses these default values as indices:
eIndex = eLink[sIndex]. IfsIndexisSK_MaxS32, this performs an enormous out-of-bounds read from the heap. - Heap Memory Corruption: The resulting
eIndex(likely containing arbitrary heap data) is then used to index into thefPartialsarray (a collection ofSkPathBuilderobjects). The subsequent call tofPartials[rIndex].snapshot()results in the engine treating arbitrary heap memory as a validSkPathBuilderobject, leading to memory corruption. - Out-of-Bounds Write: Additionally, the cumulative row offset
rRowused to indexdistLookupcan also overflow, causing negative indices to be stored and later used to trigger out-of-bounds writes in thelinkOneorlinkTwoarrays.
Attack Vector and Reachability
An attacker who has already compromised a renderer process could potentially trigger this sink by:
- Generating a malicious
SkMultiPictureDocument(MSKP) containing thousands of self-intersectingSkPathobjects designed to create high complexity in PathOps. - Submitting this document to the browser via the printing flow, which forwards the content to the
PrintCompositorutility process for PDF conversion. - As the
PrintCompositorprocess replays the drawing commands, the complex geometry triggers the PathOps engine and the overflow inSkPathWriter::assemble().
Note that these are potential steps identified through code analysis; our current environment does not support executing proof-of-concept code.
Impact
The PrintCompositor service is a critical component for Site Isolation, as it aggregates content from multiple cross-origin renderer processes for printing. Compromising this process would allow an attacker to bypass Site Isolation and read cross-origin printed data.
Suggested Potential Fix
The calculations for entries and rRow in SkPathWriter::assemble should be updated to use 64-bit integers (int64_t) or Chromium's base::CheckedNumeric to prevent overflows. Furthermore, a reasonable limit should be placed on the number of partial contours processed to mitigate both memory corruption and potential Denial of Service attacks via resource exhaustion.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
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
The pair count is computed with 32-bit signed arithmetic, so a large endpoint count overflows and the initialisation loop is skipped, leaving link arrays at their default sentinel value.
Impact
Compromising the PrintCompositor process could allow an attacker to bypass Site Isolation and read cross-origin printed data, and potentially achieve remote code execution; the report notes no proof-of-concept was executed.
What the attacker needed
Attacker already controls a renderer process; crafted multi-picture document; printing flow reaches PrintCompositor
The fix
The calculations for the pair count and row offset should use 64-bit integers or checked arithmetic, and a limit should be placed on the number of partial contours processed.
How it was found
- Create a malicious multi-picture document containing thousands of self-intersecting paths built to stress PathOps.
- Submit the document through the browser's printing flow so it is forwarded to the PrintCompositor utility process.
- Let the process replay the drawing commands, which triggers the PathOps engine and the overflow in the assemble function.
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.
Some drawing code counts how many pairs of points it must compare, and stores that count in a fixed-size number. With a very complicated shape the count wraps around to a negative value, so a loop that should fill in lookup tables never runs. Later code trusts those empty tables and reads or writes memory it should not, which can crash the printing service or let an attacker run their own 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.