public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ghostscript] f44: Fix CVE-2026-39919 (fedora#2537359)
@ 2026-10-16 13:49 RHEL Packaging Agent
  0 siblings, 0 replies; only message in thread
From: RHEL Packaging Agent @ 2026-10-16 13:49 UTC (permalink / raw)
  To: git-commits

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
 

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

only message in thread, other threads:[~2026-10-16 13:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-16 13:49 [rpms/ghostscript] f44: Fix CVE-2026-39919 (fedora#2537359) RHEL Packaging Agent

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