public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ghostscript] f43: CVE-2026-112922 ghostscript: Out-of-bounds read in ghostscript shade_next_color (fedora#2563297)
@ 2026-11-25 12:24 Zdenek Dohnal
  0 siblings, 0 replies; only message in thread
From: Zdenek Dohnal @ 2026-11-25 12:24 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/ghostscript
Branch : f43
Commit : 8312d2c71982e1249c401bcc3dbf30fcb51f3d5a
Author : Zdenek Dohnal <zdohnal@redhat.com>
Date   : 2026-11-25T13:24:29+01:00
Stats  : +39/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/ghostscript/c/8312d2c71982e1249c401bcc3dbf30fcb51f3d5a?branch=f43

Log:
CVE-2026-112922 ghostscript: Out-of-bounds read in ghostscript shade_next_color (fedora#2563297)

---
diff --git a/0001-graphcis-library-add-bounds-check.patch b/0001-graphcis-library-add-bounds-check.patch
new file mode 100644
index 0000000..6fe8916
--- /dev/null
+++ b/0001-graphcis-library-add-bounds-check.patch
@@ -0,0 +1,37 @@
+From 4f878064736b09811694dace00102bd89639874e Mon Sep 17 00:00:00 2001
+From: Ken Sharp <Ken.Sharp@artifex.com>
+Date: Tue, 28 Jul 2026 09:33:38 +0100
+Subject: [PATCH] graphcis library - add bounds check
+
+Bug #709572 "Out-of-bounds read in ghostscript shade_next_color via integer overflow of indexed color index in mesh shading"
+
+Alter the bounds checking to take place after the cast from float to
+int. This catches any negation caused by very large values, which could
+effectively bypass the check of the number of entries in the Indexed
+colour space.
+
+The reporter has asked that 'Aisle Research' be credited with this
+report.
+---
+ base/gxshade.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/base/gxshade.c b/base/gxshade.c
+index 1b712f90d..68f857a83 100644
+--- a/base/gxshade.c
++++ b/base/gxshade.c
+@@ -267,10 +267,8 @@ shade_next_color(shade_coord_stream_t * cs, float *pc)
+ 
+         if (code < 0)
+             return code;
+-        if (cf < 0)
+-            return_error(gs_error_rangecheck);
+         ci = (int)cf;
+-        if (ci >= gs_cspace_indexed_num_entries(pcs))
++        if (ci < 0 || ci >= gs_cspace_indexed_num_entries(pcs))
+             return_error(gs_error_rangecheck);
+         code = gs_cspace_indexed_lookup(pcs, ci, &cc);
+         if (code < 0)
+-- 
+2.56.1
+

diff --git a/ghostscript.spec b/ghostscript.spec
index 0f568d8..5f1819b 100644
--- a/ghostscript.spec
+++ b/ghostscript.spec
@@ -132,6 +132,7 @@ Patch008: 0001-PostScript-interpreter-procedural-data-sink-filter-d.patch
 Patch009: 0001-pdfwrite-bound-check-control-stack-in-type-1-2-font-.patch
 Patch010: 0001-PS-interpreter-validate-operands-to-.putgstringcopy.patch
 Patch011: 0001-Bug-709573-Disable-the-old-TTF-bytecode-interpreter.patch
+Patch012: 0001-graphcis-library-add-bounds-check.patch
 
 
 # Downstream patches -- these should be always included when doing rebase:
@@ -500,6 +501,7 @@ done
 
 %changelog
 * Wed Nov 25 2026 Zdenek Dohnal <zdohnal@redhat.com> - 10.05.1-8
+- CVE-2026-112922 ghostscript: Out-of-bounds read in ghostscript shade_next_color (fedora#2563297)
 - CVE-2026-110133 ghostscript: Heap buffer overflow in Ghostscript TrueType outliner (fedora#2563298)
 - CVE-2026-125396 ghostscript: Ghostscript: Arbitrary code execution via SAFER sandbox bypass  (fedora#2581641)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-25 12:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 12:24 [rpms/ghostscript] f43: CVE-2026-112922 ghostscript: Out-of-bounds read in ghostscript shade_next_color (fedora#2563297) Zdenek Dohnal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox