diff --git a/backport-CVE-2025-48708.patch b/backport-CVE-2025-48708.patch new file mode 100644 index 0000000000000000000000000000000000000000..bea7230a3593144f2b54f3fd15d137e5c2c1c85c --- /dev/null +++ b/backport-CVE-2025-48708.patch @@ -0,0 +1,41 @@ +From b587663c623b4462f9e78686a31fd880207303ee Mon Sep 17 00:00:00 2001 +From: Ken Sharp +Date: Sat, 12 Apr 2025 10:24:43 +0100 +Subject: Argument sanitisation - handle '#' as per '=' + +Bug 708446 +--- + base/gslibctx.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/base/gslibctx.c b/base/gslibctx.c +index 2cf5c9dda..f8d55de18 100644 +--- a/base/gslibctx.c ++++ b/base/gslibctx.c +@@ -1225,9 +1225,9 @@ gs_lib_ctx_stash_sanitized_arg(gs_lib_ctx_t *ctx, const char *arg) + case '-': /* Need to check for permitted file lists */ + /* By default, we want to keep the key, but lose the value */ + p = arg+2; +- while (*p && *p != '=') ++ while (*p && *p != '=' && *p != '#') + p++; +- if (*p == '=') ++ if (*p == '=' || *p == '#') + p++; + if (*p == 0) + break; /* No value to elide */ +@@ -1269,9 +1269,9 @@ gs_lib_ctx_stash_sanitized_arg(gs_lib_ctx_t *ctx, const char *arg) + case 'S': + /* By default, we want to keep the key, but lose the value */ + p = arg+2; +- while (*p && *p != '=') ++ while (*p && *p != '=' && *p != '#') + p++; +- if (*p == '=') ++ if (*p == '=' || *p == '#') + p++; + if (*p == 0) + break; /* No value to elide */ +-- +cgit v1.2.3 + diff --git a/ghostscript.spec b/ghostscript.spec index c5d5dc2b3d20bffe8095d9809a585cab3c2cf1ea..b019f4ca34ff1be0957d962b28a9a4b98e3117d7 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -9,7 +9,7 @@ Name: ghostscript Version: 9.55.0 -Release: 20 +Release: 21 Summary: An interpreter for PostScript and PDF files License: AGPLv3+ URL: https://ghostscript.com/ @@ -55,6 +55,7 @@ Patch28: backport-CVE-2025-27834.patch Patch29: backport-CVE-2025-27835.patch Patch30: backport-CVE-2025-27836.patch Patch40: Add-CJK-Chinese-font-mappings.patch +Patch41: backport-CVE-2025-48708.patch BuildRequires: automake gcc BuildRequires: adobe-mappings-cmap-devel adobe-mappings-pdf-devel @@ -215,6 +216,12 @@ install -m 0755 -d %{buildroot}%{_datadir}/%{name}/conf.d/ %{_bindir}/dvipdf %changelog +* Fri May 23 2025 Funda Wang - 9.55.0-21 +- Type:CVE +- ID:NA +- SUG:NA +- DECS: Fix CVE-2025-48708 + * Tue Apr 01 2025 Funda Wang - 9.55.0-20 - Type:CVE - ID:NA