Debian Codegraph @

debian/patches/CVE-2026-19161

raw
1 From 30d6603d43a591eadedfff08c467fe76c7110779 Mon Sep 17 00:00:00 2001
2 From: Robert Phillips <[email protected]>
3 Date: Wed, 22 Jul 2026 09:29:24 -0400
4 Subject: [PATCH] [ganesh] Skip resolve/mipmap step on flush failure
5
6 This AI generated patch seems reasonable and harmless enough.
7
8 I do think that it is only a small part of a larger problem around Ganesh's handling of flush failures.
9
10 In practice, Chrome will have to have handled the flush failure via the callback system in order to respond to the failure. That handling should discard the texture the bug is worried about. This CL adds a bit of defense in depth (and seems harmless).
11
12 Bug: https://issues.chromium.org/issues/536165038
13 Change-Id: I55adb244deb8656a2895771491456a3770c8a2fa
14 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1299577
15 Reviewed-by: Michael Ludwig <[email protected]>
16 Commit-Queue: Robert Phillips <[email protected]>
17 ---
18 src/gpu/ganesh/GrDrawingManager.cpp | 11 ++-
19 tests/GrSurfaceResolveTest.cpp | 122 ++++++++++++++++++++++++++++
20 2 files changed, 130 insertions(+), 3 deletions(-)
21
22 diff --git a/src/gpu/ganesh/GrDrawingManager.cpp b/src/gpu/ganesh/GrDrawingManager.cpp
23 index 4fa514b1df..0b986ebff2 100644
24 --- a/src/gpu/ganesh/GrDrawingManager.cpp
25 +++ b/src/gpu/ganesh/GrDrawingManager.cpp
26 @@ -126,7 +126,9 @@ bool GrDrawingManager::flush(SkSpan<GrSurfaceProxy*> proxies,
27 if (info.fSubmittedProc) {
28 info.fSubmittedProc(info.fSubmittedContext, true);
29 }
30 - return false;
31 + // Nothing to flush is a success (fSubmittedProc is already called with `true`
32 + // above).
33 + return true;
34 }
35 }
36
37 @@ -542,8 +544,11 @@ GrSemaphoresSubmitted GrDrawingManager::flushSurfaces(SkSpan<GrSurfaceProxy*> pr
38 // portion of the DAG required by 'proxies' in order to restore some of the
39 // semantics of this method.
40 bool didFlush = this->flush(proxies, access, info, newState);
41 - for (GrSurfaceProxy* proxy : proxies) {
42 - resolve_and_mipmap(gpu, proxy);
43 + if (didFlush) {
44 + // Only resolve/regen mips if the flush actually executed the render tasks.
45 + for (GrSurfaceProxy* proxy : proxies) {
46 + resolve_and_mipmap(gpu, proxy);
47 + }
48 }
49
50 SkDEBUGCODE(this->validate());
51 --
52 2.53.0
53