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

Uninitialized Use in Skia (CVE-2026-13971)

A buffer size calculation in Skia's glyph rasterisation used a one-byte-per-pixel format while the destination was a four-byte-per-pixel ARGB32 mask, so the zero-initialisation step left the tail of the glyph buffer untouched. A compromised renderer could then draw such a glyph and read back pixels to disclose stale GPU process heap memory.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 46 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 vulnerability in Skia's glyph rasterization could allow a compromised renderer to disclose uninitialized heap memory from the GPU process. This occurs due to an incorrect buffer size calculation during the zero-initialization of glyph images in the ARGB32 format.

Affected files:

  • third_party/skia/src/core/SkScalerContext.cpp
  • third_party/skia/src/core/SkImageInfo.cpp
  • third_party/skia/src/core/SkGlyph.cpp
  • third_party/skia/src/text/gpu/SkChromeRemoteGlyphCache.cpp
  • third_party/skia/src/gpu/ganesh/text/GrAtlasManager.cpp

Estimated timestamp from git blame: 2021-02-08

Summary

A potential uninitialized heap memory disclosure vulnerability has been identified in the Skia library, affecting the Chromium GPU process. The issue is located in SkScalerContext::GenerateImageFromPath in third_party/skia/src/core/SkScalerContext.cpp. When rasterizing a glyph with the kARGB32_Format mask format (which requires 4 bytes per pixel), the function incorrectly calculates the number of bytes to zero-initialize. This results in the trailing portion of the glyph's image buffer remaining uninitialized, potentially containing sensitive stale data from the GPU process heap.

Root Cause Analysis

In SkScalerContext::GenerateImageFromPath, when rasterizing a path into a glyph's destination buffer, the code creates an intermediate SkImageInfo and SkAutoPixmapStorage to manage the drawing:

C++
const SkImageInfo info = SkImageInfo::MakeA8(dstW, dstH);
SkAutoPixmapStorage dst;
// ...
dst.reset(info, dstMask.image(), dstMask.fRowBytes);
sk_bzero(dst.writable_addr(), dst.computeByteSize());

The vulnerability stems from using SkImageInfo::MakeA8 (which represents 1 byte per pixel) while the destination mask (dstMask) may be in kARGB32_Format (4 bytes per pixel). Even though the correct fRowBytes (which is 4 * width for ARGB32) is passed to dst.reset(), the dst.computeByteSize() call uses the A8 format for its calculation.

In third_party/skia/src/core/SkImageInfo.cpp, computeByteSize is implemented as: size_t bytes = (height - 1) * rowBytes + (width * bytesPerPixel)

For an A8 format, bytesPerPixel is 1. Thus, if the destination is ARGB32 with rowBytes = 4 * width, computeByteSize returns (height - 1) * 4 * width + width. However, the total buffer allocated for the ARGB32 glyph is height * 4 * width. This mismatch causes sk_bzero to leave the last 3 * width bytes of the buffer uninitialized.

In production release builds, the SkASSERT calls intended to prevent kARGB32_Format from reaching this path are removed, allowing a compromised renderer to trigger the vulnerable code.

Potential Trigger Path

  1. Strike Injection: A compromised renderer sends a crafted SkDescriptor via font-related IPC to the GPU process. By setting fFrameWidth to 0.0f (or any non-negative value), it forces the GPU-side SkScalerContext to set fGenerateImageFromPath = true.
  2. Glyph Definition: The renderer defines a glyph within this strike using fMaskFormat = SkMask::kARGB32_Format and provides an SkPath for the glyph.
  3. Vulnerable Rasterization: The renderer triggers a draw operation for this glyph. The GPU process allocates an uninitialized buffer for the image and calls GenerateImageFromPath. Due to the logic described above, the buffer is only partially zeroed.
  4. Memory Disclosure: The rasterized glyph, containing uninitialized GPU process heap memory, is uploaded to the shared glyph atlas. The renderer then draws this glyph to a canvas and reads back the pixels (e.g., via getImageData), disclosing the stale memory.

Suggested Fix

Ensure that SkScalerContext::GenerateImageFromPath uses the correct buffer size for zero-initialization, regardless of the mask format. A simple fix is to use the destination mask's own size calculation:

C++
// Suggested fix in third_party/skia/src/core/SkScalerContext.cpp
sk_bzero(dstMask.image(), dstMask.computeImageSize());

Alternatively, the SkImageInfo used for the pixmap should be initialized with the correct SkColorType corresponding to dstMask.fFormat.

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 code built an A8 (one byte per pixel) image description for a destination mask that was actually ARGB32 (four bytes per pixel), so the computed byte size fell short of the real buffer and the zeroing left the tail uninitialised.

Impact

A renderer that is already compromised could disclose uninitialised GPU process heap memory, though the report only claims this as a potential issue and notes the guarding assertions are absent in release builds.

What the attacker needed

Renderer already compromised; release build without assertions

The fix

The zeroing should use the destination mask's own size calculation, or the pixmap's image info should carry the colour type matching the mask format.

How it was found

  1. A compromised renderer sends a crafted font descriptor over IPC that forces the GPU-side scaler context to generate glyph images from paths.
  2. The renderer defines a glyph in that strike using the ARGB32 mask format and supplies a path for it.
  3. The renderer triggers a draw of that glyph, so the GPU process allocates a buffer and rasterises it with only partial zeroing.
  4. The glyph, now holding uninitialised heap data, is uploaded to the shared glyph atlas.
  5. The renderer draws the glyph and reads the pixels back, disclosing the stale 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.

When a program reserves memory for an image, it usually wipes it clean first so no leftovers from other work are visible. Here the wiping step used the wrong size, so the last part of the image stayed dirty. A program that had already broken out of its sandbox could then ask for that image and read whatever old data was sitting there.

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.