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

A new commit has been pushed.

Repo   : rpms/ghostscript
Branch : f43
Commit : 1545a5d45a23cfb8325e2513bd81205e95fcdd06
Author : RHEL Packaging Agent <redhat-ymir-agent@redhat.com>
Date   : 2026-10-16T15:28:25+02:00
Stats  : +43/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/ghostscript/c/1545a5d45a23cfb8325e2513bd81205e95fcdd06?branch=f43

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..3a82bc0
--- /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 a4e3644..16e5e6c 100644
+--- a/base/sjpx_openjpeg.c
++++ b/base/sjpx_openjpeg.c
+@@ -490,6 +490,9 @@ static int decode_image(stream_jpxd_state * const state)
+     if (state->bpp == 12)
+         state->bpp = 16;
+ 
++    if (state->bpp != 1 && state->bpp != 2 && state->bpp != 4 && state->bpp != 8 && state->bpp != 16)
++        return ERRC;
++
+     /* calculate  total data */
+     rowbytes =  (state->width*state->bpp*state->out_numcomps+7)/8;
+     state->totalbytes = (ulong)rowbytes*state->height;
+@@ -654,16 +657,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 d93ad66..d66415a 100644
--- a/ghostscript.spec
+++ b/ghostscript.spec
@@ -47,7 +47,7 @@
 Name:             ghostscript
 Summary:          Interpreter for PostScript language & PDF
 Version:          10.05.1
-Release:          6%{?dist}
+Release:          7%{?dist}
 
 License:          AGPL-3.0-or-later
 
@@ -125,6 +125,7 @@ Patch002: 0001-pdfwrite-avoid-buffer-overrun.patch
 Patch003: 0001-pdfwrite-bounds-check-some-strings.patch
 # https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=176cf0188a22
 Patch004: 0001-PDF-OCR-8-bit-device-avoid-overflow.patch
+Patch005: 0001-OpenJPEG-Fix-overreading-bytes-in-some-conditions.patch
 
 
 # Downstream patches -- these should be always included when doing rebase:
@@ -263,7 +264,9 @@ git add --all --force .
 git commit --all --amend --no-edit > /dev/null
 
 %if %{with pdf2dsc}
-%patch -p1 1
+%autopatch
+%else
+%autopatch -m 2
 %endif
 # ---------------
 
@@ -490,6 +493,9 @@ done
 # =============================================================================
 
 %changelog
+* Fri Oct 16 2026 Zdenek Dohnal <zdohnal@redhat.com> - 10.05.0-7
+- CVE-2026-39919 ghostscript: Heap buffer overflow in JPEG 2000 JPXDecode output adapter
+
 * Wed Jan 21 2026 Zdenek Dohnal <zdohnal@redhat.com> - 10.05.1-6
 - security fix for CVE-2025-59798, CVE-2025-59799, CVE-2025-59800 (fedora#2431544, fedora#2431548, fedora#2431546)
 

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-16 14:00 [rpms/ghostscript] f43: 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