diff --git a/CVE-2023-38559.patch b/CVE-2023-38559.patch new file mode 100644 index 0000000000000000000000000000000000000000..fde0e2cfcab78d48d606b7471c952558ee3185c6 --- /dev/null +++ b/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.windows.3 + diff --git a/ghostscript.spec b/ghostscript.spec index dbf9de51805dd6465bda50ed68ffa1523e090f75..e6b1bad85c592b2f74d595c01c1e88d0517b3ece 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -9,7 +9,7 @@ Name: ghostscript Version: 9.52 -Release: 7 +Release: 8 Summary: An interpreter for PostScript and PDF files License: AGPLv3+ URL: https://ghostscript.com/ @@ -49,6 +49,7 @@ Patch30: backport-CVE-2021-45949.patch Patch31: backport-Fix-pdfwrite-d-mode-with-file-permissions.patch Patch32: backport-Coverity-361429-move-break-to-correct-place.patch Patch33: backport-CVE-2021-3781-BUg-704342-Include-device-specifier-strings-in-acces.patch +Patch34: CVE-2023-38559.patch BuildRequires: automake gcc BuildRequires: adobe-mappings-cmap-devel adobe-mappings-pdf-devel @@ -209,6 +210,12 @@ install -m 0755 -d %{buildroot}%{_datadir}/%{name}/conf.d/ %{_bindir}/dvipdf %changelog +* Tue Aug 15 2023 liningjie - 9.52-8 +- Type:CVE +- ID:CVE-2023-38559 +- SUG:NA +- DESC:fix CVE-2023-38559 + * Tue Mar 1 2022 yangzhuangzhuang - 9.52-7 - Type:CVE - ID:CVE-2021-3781