Repository navigation
[4.155] Backport the remaining 25 Skia CVE fixes - #5844
Merged
mattleibow merged 2 commits intoNov 24, 2026
Merged
mattleibow merged 2 commits into
mattleibow merged 2 commits into
Conversation
Pins externals/skia to mono/skia's dev/backport-4.155-security-batch-3 (bc33dd4a8d), which cherry-picks every Skia fix Google shipped for the 31 Skia CVEs announced in Chrome stable since 156 (2026-10-27) that 4.155.x didn't have yet, plus Google's other M156 fixes to the same code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
📦 Try the packages from this PRWarning Do not run these scripts without first reviewing the code in this PR. Step 1 — Download the packages bash / macOS / Linux: curl -fsSL https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.sh | bash -s -- 5844PowerShell / Windows: iex "& { $(irm https://raw.githubusercontent.com/mono/SkiaSharp/main/scripts/get-skiasharp-pr.ps1) } 5844"Step 2 — Add the local NuGet source dotnet nuget add source ~/.skiasharp/hives/pr-5844/packages --name skiasharp-pr-5844More options
Or download manually from Azure Pipelines — look for the Remove the source when you're done: dotnet nuget remove source skiasharp-pr-5844 |
4 of 9 tasks
Contributor
|
Hey there @ramezgerges! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
mattleibow
added a commit
to mono/skia
that referenced
this pull request
Nov 24, 2026
[m155] Backport Skia security fixes and stable hardening (#471) Context: #461 Context: #462 Context: mono/SkiaSharp#5844 Changes: e6cfc7a...bc33dd4 Backport Google's remaining 25 identified Skia CVE fixes to the m155 servicing line, together with related stable hardening and regression tests. This keeps fixes available to applications that cannot move beyond 4.155, including Uno Platform 6 applications. The commits preserve their upstream cherry-pick ancestry. Context adjustments retain m155 tests and combine deferred-upload failure handling with the earlier flush-token fix. ~~ Raster pipeline overflow and failed shader construction ~~ Guard slot counts and temporary stack depths against overflow and reject negative allocation sizes (CVE-2026-118348, CVE-2026-118319). Neutralize pending branches on failed pipeline construction and propagate child shader failure rather than executing an incomplete pipeline (CVE-2026-121084). ~~ Resource ownership and deferred uploads ~~ Hold a cache reference while changing a resource's unique key so a zero-refcount resource is not left in the purgeable queue (CVE-2026-118351). Propagate deferred texture upload failures, skip affected draws, and evict failed atlas plots rather than sampling unwritten texture memory (CVE-2026-121072). Advance atlas flush tokens even on flushes without draws (CVE-2026-126844). ~~ Vulkan device-loss handling ~~ Treat VK_ERROR_UNKNOWN as device loss (CVE-2026-118354), initialize the current render-pass pointer (CVE-2026-126915), and apply the upstream 1 ms device-loss delay on affected GPUs (CVE-2026-126846). Also check vkWaitForFences results. ~~ Texture subset and coverage boundaries ~~ Nearest filtering can round magnified samples outside touching subset edges. Keep clamping unless the transform meets the safe 1:1 integer-translation conditions (CVE-2026-121227). Clamp coverage-mask sampling (CVE-2026-126884), and account for AA coordinate extrapolation when deciding whether image-filter subsets need strict bounds. ~~ Direct-mask Slug validation ~~ Direct masks without atlas bilinear support have no glyph padding. Reject incompatible fractional replay (CVE-2026-126894), and validate deserialized positions, matrices, bounds, and flags before they reach atlas sampling (CVE-2026-126922). Direct positions are constrained to finite integers within +/-2^21; the boolean wire format remains unchanged. ~~ Glyph allocation and scaler bounds ~~ Check SDF dimensions and scratch-buffer arithmetic, use fallible allocation, and avoid rasterizing oversized glyphs that will not fit the atlas (CVE-2026-126876). Guard the second, unfiltered glyph load before it aliases the original buffer (CVE-2026-131013). Harden mask-filtered image copies and LCD16 cropping when stateful scalers return different bounds or formats on subsequent loads. ~~ Graphite clip and stroke bounds ~~ Include hairlines and subpixel strokes in clip inflation (CVE-2026-121160), and correct wedge miter inflation (CVE-2026-126841). Treat inverse fills covering the scissor as flood fills (CVE-2026-126898). Use a save-record key when clip-path bounds cannot fit the packed int16 representation (CVE-2026-126857). ~~ Ganesh stroke geometry ~~ Compute op bounds in device space to match tessellation (CVE-2026-126914). Handle negative determinants when constructing hairline square caps, checking the resulting inverse determinant for finiteness (CVE-2026-126848). ~~ GPU transfer and texture formats ~~ Disable unsupported BGRA-as-RGBx writes on GLES (CVE-2026-119271). For Graphite A-to-RGBx readback, use RGBA with forced opaque alpha so the transfer writes the expected destination bytes (CVE-2026-126853). ~~ Shader and cache key correctness ~~ Compare the full byte length of Graphite PaintParamsKey data rather than its element count (CVE-2026-121032). Align image-filter cache equality with its byte-based hash, including the type mask. Use float2 displacement offsets so filter calculations agree with fp32 bounds. ~~ Atlas index interpolation ~~ Apply the half-step and integer conversion to Ganesh atlas indices because flat interpolation is a hint, not a guarantee (CVE-2026-126920). ~~ Driver framebuffer lifetime ~~ Replace the Imagination framebuffer workaround with a persistent complete guard FBO and bind it around framebuffer changes. This prevents a deleted FBO from remaining the driver's previous binding. ~~ Allocation overflow and painter order ~~ Guard GrBufferAllocPool alignment, size additions, and byte multiplications; make CPU buffer allocation fallible and bound preallocation. Reset Graphite depth and bounds tracking when a draw discards earlier draws because it overwrites all pixels, preventing depth wrap from changing painter order. ~~ Image-filter mipmaps ~~ Share the mipmap downgrade logic between SpecialImage drawing paths so image filtering does not incorporate unwritten scratch-texture contents. Include the upstream regression tests and their unused-function compile fix. The backports retain upstream regression tests and their build registration. Local validation reported syntax-only checks of changed C++ sources; Metal and Direct3D sources were not checked locally. Co-authored-by: Alexis Cruz-Ayala <[email protected]> Co-authored-by: Greg Daniel <[email protected]> Co-authored-by: Julia Lavrova <[email protected]> Co-authored-by: Jorge Betancourt <[email protected]> Co-authored-by: Michael Ludwig <[email protected]> Co-authored-by: Nathan Sanchez <[email protected]> Co-authored-by: Robert Phillips <[email protected]> Co-authored-by: Thomas Smith <[email protected]>
mono/skia release/4.155.x advanced from bc33dd4a8d9028d2303cef3ccd4a636ad2262a00 to 6b4b729abd0d8cc4805d373cc6a469f8eac66655.
mattleibow
enabled auto-merge (squash)
November 24, 2026 12:53
mattleibow
disabled auto-merge
November 24, 2026 12:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Third 4.155 servicing backport, after #5793 and #5797. It brings the remaining 25 Skia CVE fixes to
release/4.155.x, so 4.155 covers all 31 Skia CVEs announced in Chrome desktop stable releases since Chrome 156 (2026-10-27). That matchesrelease/4.157.x.4.155 is the last line Uno Platform 6 apps can use, so these fixes can't be delivered by asking users to move to a newer SkiaSharp the way 4.156 users can.
Skia security fixes (backported to m155 in mono/skia#471; the Google commit for each is listed there):
mono/skia#471 also carries Google's 13 other
chrome/m156fixes that 4.155 lacked: hardening follow-ups to the same glyph and subset-clamp code, the newest M156 fixes (GrBufferAllocPooloverflow guard, Graphite depth reset, image-filter mipmap fix), an Imagination FBO workaround and two test-only fixes. Four of its 38 cherry-picks needed hand resolution; the notes are in that PR.This PR pins
externals/skiato mono/skia#471's headbc33dd4a8dand updatescgmanifest.jsonto match. After mono/skia#471 merges, the pin should move to its merge commit, as was done for #5793 and #5797.Related issues
Related to #5793 and #5797
Required skia PR
Requires mono/skia#471
Areas affected
binding/)externals/skia/src/c,include/c)Changes
None. Public API, C API, bindings and package versions are unchanged.
Behavior
VK_ERROR_UNKNOWNis treated as device lost, and affected GPUs sleep 1 ms aftervkQueueSubmit/vkQueueWaitIdleon device loss (CVE-2026-118354, CVE-2026-126846).Testing
Bug:/Fixed:footer; all 31 are now on this branch.Checklist
Changesabove lists all public API and behavioral changes (or "None.")///documentation and regenerated bindings when applicablemono/skiaPR linked above and bindings regenerated (no C API change, so there is nothing to regenerate)🤖 Generated with Claude Code