public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Zdenek Dohnal <zdohnal@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/ghostscript] f43: CVE-2026-112922 ghostscript: Out-of-bounds read in ghostscript shade_next_color (fedora#2563297)
Date: Wed, 25 Nov 2026 12:24:43 GMT	[thread overview]
Message-ID: <179560948363.1.8163698424846407323.rpms-ghostscript-8312d2c71982@fedoraproject.org> (raw)

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)
 

                 reply	other threads:[~2026-11-25 12:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179560948363.1.8163698424846407323.rpms-ghostscript-8312d2c71982@fedoraproject.org \
    --to=zdohnal@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox