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] f43: Fix CVE-2026-39919 (fedora#2537359)
Date: Fri, 16 Oct 2026 14:00:11 GMT	[thread overview]
Message-ID: <179215921136.1.3274122875032946000.rpms-ghostscript-1545a5d45a23@fedoraproject.org> (raw)

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)
 

                 reply	other threads:[~2026-10-16 14:00 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=179215921136.1.3274122875032946000.rpms-ghostscript-1545a5d45a23@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