public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ghostscript] f43: CVE-2026-125396 ghostscript: Ghostscript: Arbitrary code execution via SAFER sandbox bypass (fedora#2581641)
@ 2026-11-25 12:24 Zdenek Dohnal
0 siblings, 0 replies; only message in thread
From: Zdenek Dohnal @ 2026-11-25 12:24 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ghostscript
Branch : f43
Commit : ebcceaea268a0c173ab551fe6ae45efc9ffce00e
Author : Zdenek Dohnal <zdohnal@redhat.com>
Date : 2026-11-25T13:21:50+01:00
Stats : +74/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/ghostscript/c/ebcceaea268a0c173ab551fe6ae45efc9ffce00e?branch=f43
Log:
CVE-2026-125396 ghostscript: Ghostscript: Arbitrary code execution via SAFER sandbox bypass (fedora#2581641)
---
diff --git a/0001-PS-interpreter-validate-operands-to-.putgstringcopy.patch b/0001-PS-interpreter-validate-operands-to-.putgstringcopy.patch
new file mode 100644
index 0000000..25b7fa8
--- /dev/null
+++ b/0001-PS-interpreter-validate-operands-to-.putgstringcopy.patch
@@ -0,0 +1,68 @@
+From 1484854e0c8ddfda1baa4ad4cd965b8a9790aa81 Mon Sep 17 00:00:00 2001
+From: Ken Sharp <Ken.Sharp@artifex.com>
+Date: Wed, 2 Sep 2026 12:04:15 +0100
+Subject: [PATCH] PS interpreter - validate operands to .putgstringcopy
+
+Bug #709684 "Type 1 font-loader `.forceput` save/restore UAF yields native read/write and controlled dispatch/RCE under `-dSAFER`"
+
+Effectively another case of recovering .forceput, in this case by
+causing an error and then having the error handler use it.
+
+We are in the process of eliminating, or at least absolutely minimising,
+the use of .forceput. Ideally we want to remove it completely precisely
+to avoid this sort of thing. Unfortunately that's still a work in
+progress; it isn't easy to undo 30 years worth of assumptions in the
+code.
+
+For now this prevents the problem by ensuring that the operands are the
+correct types, which prevents the error executing 'copy' and so avoids
+the custom error handler managing to execute .forceput.
+
+This issue was reported by Paulos Yibelo <habte.yibelo@gmail.com>
+---
+ Resource/Init/gs_fonts.ps | 25 ++++++++++++++++---------
+ 1 file changed, 16 insertions(+), 9 deletions(-)
+
+diff --git a/Resource/Init/gs_fonts.ps b/Resource/Init/gs_fonts.ps
+index 5b46ef1f5..5420431c7 100644
+--- a/Resource/Init/gs_fonts.ps
++++ b/Resource/Init/gs_fonts.ps
+@@ -1,4 +1,4 @@
+-% Copyright (C) 2001-2023 Artifex Software, Inc.
++% Copyright (C) 2001-2026 Artifex Software, Inc.
+ % All Rights Reserved.
+ %
+ % This software is provided AS-IS with no warranty, either express or
+@@ -1024,14 +1024,21 @@ $error /SubstituteFont { } put
+
+ % any user of .putgstringcopy must use bind and executeonly
+ /.putgstringcopy % <dict> <name> <string> .putgstringcopy -
+-{ 2 index gcheck currentglobal
+- 2 copy eq {
+- pop pop .forceput
+- } executeonly {
+- 5 1 roll setglobal
+- dup length string copy
+- .forceput setglobal
+- } executeonly ifelse
++{
++ % Check operand types
++ dup type /stringtype eq 2 index type /nametype eq and 3 index type /dicttype eq and {
++ 2 index gcheck currentglobal
++ 2 copy eq {
++ pop pop .forceput
++ } executeonly {
++ 5 1 roll setglobal
++ dup length string copy
++ .forceput setglobal
++ } executeonly ifelse
++ }
++ {
++ /.putgstringcopy cvx /typecheck signalerror
++ } ifelse
+ } .forcebind odef % must be bound and hidden for .forceput
+
+ /.loadfontloop { % <fontname> <filename> <libflag> .loadfontloop
+--
+2.56.1
+
diff --git a/ghostscript.spec b/ghostscript.spec
index 9a7129a..5b1ffcb 100644
--- a/ghostscript.spec
+++ b/ghostscript.spec
@@ -47,7 +47,7 @@
Name: ghostscript
Summary: Interpreter for PostScript language & PDF
Version: 10.05.1
-Release: 7%{?dist}
+Release: 8%{?dist}
License: AGPL-3.0-or-later
@@ -130,6 +130,7 @@ Patch006: 0001-PostScript-interpreter-don-t-permit-local-inside-glo.patch
Patch007: 0001-graphics-library-Shadings-with-arrays-of-Functions-v.patch
Patch008: 0001-PostScript-interpreter-procedural-data-sink-filter-d.patch
Patch009: 0001-pdfwrite-bound-check-control-stack-in-type-1-2-font-.patch
+Patch010: 0001-PS-interpreter-validate-operands-to-.putgstringcopy.patch
# Downstream patches -- these should be always included when doing rebase:
@@ -497,7 +498,10 @@ done
# =============================================================================
%changelog
-* Fri Oct 16 2026 Zdenek Dohnal <zdohnal@redhat.com> - 10.05.0-7
+* Wed Nov 25 2026 Zdenek Dohnal <zdohnal@redhat.com> - 10.05.1-8
+- CVE-2026-125396 ghostscript: Ghostscript: Arbitrary code execution via SAFER sandbox bypass (fedora#2581641)
+
+* Fri Oct 16 2026 Zdenek Dohnal <zdohnal@redhat.com> - 10.05.1-7
- CVE-2026-39919 ghostscript: Heap buffer overflow in JPEG 2000 JPXDecode output adapter
- CVE-2026-101258 ghostscript: ghostscript: -dSAFER sandbox bypass via Type 5 shading OOB write and procedure-stream use-after-free
bypass via Type 5 shading OOB write and procedure-stream use-after-free
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-25 12:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 12:24 [rpms/ghostscript] f43: CVE-2026-125396 ghostscript: Ghostscript: Arbitrary code execution via SAFER sandbox bypass (fedora#2581641) Zdenek Dohnal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox