public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: RHEL Packaging Agent <redhat-ymir-agent@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/ghostscript] f44: Fix CVE-2026-39919 (fedora#2537359)
Date: Fri, 16 Oct 2026 13:49:28 GMT	[thread overview]
Message-ID: <179215856838.1.13726808367408980525.rpms-ghostscript-865566840901@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/ghostscript
Branch : f44
Commit : 86556684090171dbc2f4c4a64a3cbbaa0dd76488
Author : RHEL Packaging Agent <redhat-ymir-agent@redhat.com>
Date   : 2026-10-16T15:15:29+02:00
Stats  : +40/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/ghostscript/c/86556684090171dbc2f4c4a64a3cbbaa0dd76488?branch=f44

Log:
Fix CVE-2026-39919 (fedora#2537359)

---
diff --git a/0001-OpenJPEG-Fix-overreading-bytes-in-some-conditions.patch b/0001-OpenJPEG-Fix-overreading-bytes-in-some-conditions.patch
new file mode 100644
index 0000000..5612a0f
--- /dev/null
+++ b/0001-OpenJPEG-Fix-overreading-bytes-in-some-conditions.patch
@@ -0,0 +1,35 @@
+diff --git a/base/sjpx_openjpeg.c b/base/sjpx_openjpeg.c
+index 205d2fa..0e7218d 100644
+--- a/base/sjpx_openjpeg.c
++++ b/base/sjpx_openjpeg.c
+@@ -512,6 +512,9 @@ static int decode_image(stream_jpxd_state * const state)
+     /* calculate  total data */
+     bps = state->bpp * state->out_numcomps;
+ 
++    if (state->bpp != 1 && state->bpp != 2 && state->bpp != 4 && state->bpp != 8 && state->bpp != 16)
++        return ERRC;
++
+     /* Overflow check, almost certainly superfluous, but let's be certain */
+     if (state->out_numcomps != 0 && bps / state->out_numcomps != state->bpp)
+         return_error(gs_error_rangecheck);
+@@ -688,16 +691,17 @@ static int process_one_trunk(stream_jpxd_state * const state, stream_cursor_writ
+                 int ppbyte1 = 8/state->bpp;
+                 /* sampling required */
+                 /* only grayscale can have such bit-depth, also shift_bit = 0, bpp < 8 */
+-                for (i = 0; i < state->width; i++)
++                for (i = 0; i < state->width; )
+                 {
+-                    for (b=0; b<ppbyte1; b++)
++                    for (b=0; b<ppbyte1; b++, i++)
+                     {
+                         int dx = state->image->comps[compno].dx;
+                         int dy = state->image->comps[compno].dy;
+                         int w = state->image->comps[compno].w;
+                         int in_offset_scaled = (y_offset/dy * w) + i / dx;
+                         bt = bt<<state->bpp;
+-                        bt += state->image->comps[compno].data[in_offset_scaled] + state->sign_comps[compno];
++                        if (i < state->width)
++                            bt += state->image->comps[compno].data[in_offset_scaled] + state->sign_comps[compno];
+                     }
+                     *row++ = bt;
+                 }

diff --git a/ghostscript.spec b/ghostscript.spec
index bfbc456..0ed1c37 100644
--- a/ghostscript.spec
+++ b/ghostscript.spec
@@ -47,7 +47,7 @@
 Name:             ghostscript
 Summary:          Interpreter for PostScript language & PDF
 Version:          10.06.0
-Release:          2%{?dist}
+Release:          3%{?dist}
 
 License:          AGPL-3.0-or-later
 
@@ -121,6 +121,7 @@ BuildRequires:    make
 Patch001: 0001-Reinstate-pdf2dsc.patch
 # https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=3c0be6e4fcffa6
 Patch002: 0001-Fix-32-bit-build.patch
+Patch003: 0001-OpenJPEG-Fix-overreading-bytes-in-some-conditions.patch
 
 
 # Downstream patches -- these should be always included when doing rebase:
@@ -488,6 +489,9 @@ done
 # =============================================================================
 
 %changelog
+* Fri Oct 16 2026 Zdenek Dohnal <zdohnal@redhat.com> - 10.06.0-3
+- CVE-2026-39919 ghostscript: Heap buffer overflow in JPEG 2000 JPXDecode output adapter
+
 * Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 10.06.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
 

                 reply	other threads:[~2026-10-16 13:49 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=179215856838.1.13726808367408980525.rpms-ghostscript-865566840901@fedoraproject.org \
    --to=redhat-ymir-agent@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