Skip to content
Info disclosure Advisory Advanced CVE-2026-11039

Uninitialized Use in Skia (CVE-2026-11039)

A vulnerability in Skia's AAHairlineOp allows uninitialized vertex buffer data to be rendered when processing quadratic paths with extremely large coordinates, potentially leaking cross-origin GPU memory. An attacker could read this data back using Canvas2D's getImageData().

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months

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

Overview: A vulnerability in Skia's AAHairlineOp allows for the disclosure of uninitialized vertex buffer data. When rendering quadratic paths with extremely large coordinates, vertex generation fails but the mesh is drawn with the original primitive count, rendering stale cross-origin GPU memory.

Affected files:

  • third_party/skia/src/gpu/ganesh/ops/AAHairLinePathRenderer.cpp
  • third_party/skia/src/gpu/ganesh/GrBufferAllocPool.cpp
  • third_party/skia/src/gpu/ganesh/GrCpuBuffer.h

Estimated timestamp from git blame: 2021-11-18

Summary

A potential cross-origin information leak exists in Skia's Ganesh backend within AAHairlineOp::onPrepareDraws. When preparing to render antialiased hairline paths, the operation allocates vertex space from a shared pool (GrBufferAllocPool) based on a calculated count of quadratic and conic segments.

If a segment contains extremely large finite coordinates, intermediate subdivision math produces NaN values, causing the vertex generation function (add_quads) to silently fail. Crucially, it fails to write any vertex data and fails to advance the vertex pointer. However, the subsequent GPU draw call (setIndexedPatterned) blindly uses the initially calculated segment count. This causes the GPU to render using uninitialized memory from the shared vertex pool, which may contain sensitive cross-origin geometry from other tabs. An attacker can read this data back using Canvas2D's getImageData().

Technical Details

  1. Subdivision Math Overflow: When gather_lines_and_quads processes a quadratic curve with huge finite device coordinates (e.g., ~2e38), SkPointPriv::DistanceToLineBetweenSqd overflows to Inf. The function num_quad_subdivs handles this by reading the float exponent (which is 128 for Inf) and clamps it to kMaxSub (4 subdivisions).
  2. Vertex Allocation: onPrepareDraws allocates uninitialized vertex memory for these 16 sub-quads using target->makeVertexSpace from the GrBufferAllocPool. Because the GPU context is shared across origins in Chrome, this pool reuses memory that may contain data from other origins.
  3. NaN Generation and Silent Failure: During vertex generation, add_quads calls SkChopQuadAt. Interpolating between opposite-signed huge coordinates causes Inf - Inf evaluations, resulting in NaN values. The resulting points are passed to bloat_quad, which attempts to normalize the vectors. Normalization of NaN vectors fails, causing bloat_quad to return false.
  4. The Bug: When bloat_quad returns false, add_quads skips writing the vertices. Crucially, it does not advance the bezVerts pointer and does not backfill the memory with degenerate coordinates (unlike add_line in the same file, which safely writes SK_ScalarMax on failure).
  5. Stale Data Draw: The onPrepareDraws function remains unaware of the failure and issues a draw call (fMeshes[1]->setIndexedPatterned) using the original unadjusted quadCount. The GPU reads the uninitialized slots in the vertex buffer, rendering stale cross-origin data.

Potential Trigger Steps

Note: These are suggested steps based on code analysis; our tooling cannot execute code to provide a working PoC.

  1. Create an HTML page with a <canvas> element and get a 2D context.
  2. Apply a massive scale transform: ctx.setTransform(1e19, 0, 0, 1e19, 0, 0);
  3. Set a tiny positive lineWidth to force Skia to use AAHairlineOp: ctx.lineWidth = 1e-20;
  4. Draw a quadratic curve using large finite coordinates that will transform to values near FLT_MAX: ctx.moveTo(-2e19, 0); ctx.quadraticCurveTo(2e19, 1e-10, -2e19, 2e-10); ctx.stroke();
  5. Use ctx.getImageData(...) to read back the rendered pixels, which will contain representations of the stale cross-origin vertex memory.

Suggested Fix

Update add_quads and add_conics in third_party/skia/src/gpu/ganesh/ops/AAHairLinePathRenderer.cpp to defensively handle bloat_quad failures. Similar to the logic in add_line, if bloat_quad returns false, the code should fill the allocated BezierVertex slots with degenerate, off-screen coordinates (e.g., SK_ScalarMax) and explicitly advance the *vert pointer to ensure the memory is initialized and the pointer stays synchronized with the allocated quadCount.

Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33


Results from 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 vertex generation function add_quads fails to write vertices when bloat_quad returns false, but the draw call still uses the original vertex count, causing uninitialized memory to be rendered.

Impact

An attacker could potentially read cross-origin GPU memory, leading to information disclosure.

What the attacker needed

Victim visits malicious page; browser uses vulnerable Skia

The fix

The code should be updated to defensively handle bloat_quad failures by filling allocated vertex slots with degenerate coordinates and advancing the vertex pointer.

How it was found

  1. Create an HTML page with a canvas element and get a 2D context.
  2. Apply a massive scale transform.
  3. Set a tiny positive lineWidth to force Skia to use AAHairlineOp.
  4. Draw a quadratic curve using large finite coordinates that will transform to values near FLT_MAX.
  5. Use getImageData to read back the rendered pixels.

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.

When a web browser draws a very thin line on a canvas, it uses a special graphics routine. If the line's coordinates are huge, the routine fails to write the line's points but still tells the graphics card to draw them, so the card uses leftover memory from other tabs. A malicious website could then read that leftover memory as an image, potentially seeing data from other sites.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.