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

Out of bounds read in Skia (CVE-2026-10985)

Skia's displacement map shader unpremultiplies its input without clamping, so a renderer that can supply invalid premultiplied colours can produce enormous displacement offsets. A compromised renderer could then sample uninitialised GPU scratch memory recycled from other origins and read it back through a canvas.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 17 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 compromised renderer can exploit Skia's displacement map implementation to leak cross-origin GPU scratch memory. By crafting 'super-luminescent' colors, an attacker can trigger a massive displacement that bypasses Skia's bounds checks, leading to the sampling of uninitialized GPU memory recycled from other contexts.

Affected files:

  • third_party/skia/src/sksl/sksl_rt_shader.sksl
  • third_party/skia/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp
  • third_party/skia/src/core/SkImageFilterTypes.cpp
  • cc/paint/paint_op_reader.cc
  • third_party/skia/src/gpu/ganesh/image/SkSpecialImage_Ganesh.cpp
  • third_party/skia/src/gpu/ganesh/GrSurfaceProxy.cpp

Estimated timestamp from git blame: 2023-06-09

Summary

A potential vulnerability in Skia's displacement map implementation (used in Chrome's GPU process for Out-of-Process Rasterization) allows a compromised renderer to disclose cross-origin GPU memory. The issue stems from an amplification effect when unpremultiplying displacement map inputs, combined with a failure in Skia's bounds analysis to account for these amplified offsets.

Potential Root Cause

The vulnerability is located in the sk_displacement SkSL function used by SkDisplacementMapImageFilter.

SKSL
// third_party/skia/src/sksl/sksl_rt_shader.sksl
half4 sk_displacement(shader displMap, shader colorMap, float2 coord,
                      half2 scale, half4 xSelect, half4 ySelect) {
    half4 displColor = unpremul(displMap.eval(coord)); // <--- No clamping
    half2 displ = half2(dot(displColor, xSelect), dot(displColor, ySelect));
    displ = scale * (displ - 0.5);
    return colorMap.eval(coord + displ);
}

The unpremul function divides the RGB components by the alpha channel. In third_party/skia/src/sksl/sksl_shared.sksl, it is defined as color.rgb / max(color.a, 0.0001). If the alpha channel is near zero but the RGB components are non-zero (a 'super-luminescent' color), the result is extremely large (up to 10,000x).

Normally, Skia filters operate on valid premultiplied colors where RGB <= Alpha. However, a compromised renderer can use a cc::ArithmeticPaintFilter with the enforce_pm_color flag set to false to generate such invalid colors. During serialization, cc/paint/paint_op_reader.cc blindly trusts this renderer-provided flag.

Exploitation Mechanism

  1. Renderer Compromise: The attacker gains control of a renderer and serializes a malicious PaintFilter graph containing a cc::DisplacementMapEffectPaintFilter.
  2. Arithmetic Filter Manipulation: By setting enforce_pm_color = false in an ArithmeticPaintFilter, the attacker produces an intermediate texture containing colors like (1.0, 1.0, 1.0, 0.0).
  3. Bounds Analysis Bypass: Skia's analyzeBounds logic (in third_party/skia/src/core/SkImageFilterTypes.cpp) determines whether strict shader-based tiling (clamping to the logical image subset) is required. For approximately-sized (kApprox) scratch textures used in the Ganesh backend, this logic can be fooled into using hardware CLAMP_TO_EDGE instead of strict shader-clamping if it believes the sample coordinates will remain within the texture's bounds. The exactify() mechanism in GrSurfaceProxy exacerbates this by expanding the perceived image dimensions to the full backing-store dimensions.
  4. Massive Displacement: The sk_displacement shader calculates a displacement of nearly 10,000 * scale. This displacement moves the sampling coordinate far outside the intended logical image bounds and into the uninitialized padding of the scratch texture.
  5. Memory Disclosure: In OOP-R, the GPU process uses a shared context where scratch textures are recycled across different renderers and origins. The padding of these textures contains stale data from other tabs. Hardware CLAMP_TO_EDGE on the backing texture allows sampling this recycled data.

Suggested Reproduction Steps (Potential)

  1. From a compromised renderer, create a cc::PaintOpBuffer with a cc::DisplacementMapEffectPaintFilter.
  2. Set the displacement input to a cc::ArithmeticPaintFilter with enforce_pm_color=false and coefficients designed to produce super-luminescent output (e.g., k={0, -1, 0, 1}).
  3. Target a Ganesh-backed canvas. Use a large scale to ensure displacement reaches the texture boundaries.
  4. Dispatch a RasterCHROMIUM command.
  5. After rendering, use canvas.getContext('2d').getImageData() to read back the canvas content and inspect for leaked GPU memory patterns (e.g., fragments of other tabs' content).

Suggested Fix

Ensure that the displacement values are clamped to a safe range before being used to offset sampling coordinates. Applying saturate() to the result of unpremul() in the displacement shader would restrict the displacement to the range [-0.5, 0.5] (relative to scale) as assumed by Skia's bounds analysis.

In third_party/skia/src/sksl/sksl_rt_shader.sksl, modify sk_displacement as follows:

SKSL
    half4 displColor = saturate(unpremul(displMap.eval(coord)));

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.

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 displacement shader unpremultiplies its input without clamping, and Skia's bounds analysis does not account for the resulting amplified offsets, so hardware edge clamping samples outside the logical image.

Impact

A compromised renderer could disclose cross-origin GPU memory, though this depends on scratch textures being recycled across renderers and origins in the shared GPU context.

What the attacker needed

Attacker already controls a renderer; GPU process uses shared scratch textures

The fix

The displacement colour should be clamped with saturate after unpremultiplying so offsets stay within the range the bounds analysis assumes.

How it was found

  1. From a compromised renderer, build a paint buffer containing a displacement map effect.
  2. Feed it an arithmetic filter with premultiplied-colour enforcement disabled that outputs super-luminescent colours.
  3. Target a Ganesh-backed canvas and use a large scale so the displacement reaches the texture edge.
  4. Dispatch the raster command to the GPU process.
  5. Read the canvas back with getImageData and look for leaked GPU memory.

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 web page's drawing is normally done by a separate, sandboxed process, and the graphics library Skia does the actual painting. Skia assumes colours are 'premultiplied', meaning the colour values never exceed the transparency value; this report shows that assumption can be broken so a calculation produces a huge offset. That offset makes the renderer read pixels from memory it should never see, which may still hold content from other websites.

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.