diff --git a/ghostscript-10.01.2-CVE-2023-38559.patch b/ghostscript-10.01.2-CVE-2023-38559.patch new file mode 100644 index 0000000..19e6ecc --- /dev/null +++ b/ghostscript-10.01.2-CVE-2023-38559.patch @@ -0,0 +1,27 @@ +From d81b82c70bc1fb9991bb95f1201abb5dea55f57f Mon Sep 17 00:00:00 2001 +From: Chris Liddell +Date: Mon, 17 Jul 2023 14:06:37 +0100 +Subject: [PATCH] Bug 706897: Copy pcx buffer overrun fix from + devices/gdevpcx.c + +Bounds check the buffer, before dereferencing the pointer. +--- + base/gdevdevn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/base/gdevdevn.c b/base/gdevdevn.c +index 7b14d9c71..6351fb77a 100644 +--- a/base/gdevdevn.c ++++ b/base/gdevdevn.c +@@ -1983,7 +1983,7 @@ devn_pcx_write_rle(const byte * from, const byte * end, int step, gp_file * file + byte data = *from; + + from += step; +- if (data != *from || from == end) { ++ if (from >= end || data != *from) { + if (data >= 0xc0) + gp_fputc(0xc1, file); + } else { +-- +2.41.0 + diff --git a/ghostscript.spec b/ghostscript.spec index 5c74304..15b926d 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -45,7 +45,7 @@ Name: ghostscript Summary: Interpreter for PostScript language & PDF Version: 10.01.2 -Release: 2%{?dist} +Release: 3%{?dist} License: AGPL-3.0-or-later @@ -108,6 +108,7 @@ BuildRequires: make Patch001: ghostscript-10.01.0-pdfwrite-Substituted-TTF-CIDFont-CID-hand.patch Patch002: ghostscript-10.01.0-convert-defaultpage-to-lowercase.patch +Patch003: ghostscript-10.01.2-CVE-2023-38559.patch # Downstream patches -- these should be always included when doing rebase: @@ -422,6 +423,9 @@ done # ============================================================================= %changelog +* Mon Aug 07 2023 Richard Lescak - 10.01.2-3 +- fix for CVE-2023-38559 (#2225380) + * Wed Jul 19 2023 Fedora Release Engineering - 10.01.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild