From 4202e7f5a976fd99e6f1ee9132f89ea752dbc386 Mon Sep 17 00:00:00 2001 From: zhangtao2020 Date: Wed, 18 Mar 2020 16:42:00 +0800 Subject: [PATCH] fix run dvipdf securely --- ...tscript-9.23-100-run-dvipdf-securely.patch | 22 +++++++++++++++++++ ghostscript.spec | 10 +++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 ghostscript-9.23-100-run-dvipdf-securely.patch diff --git a/ghostscript-9.23-100-run-dvipdf-securely.patch b/ghostscript-9.23-100-run-dvipdf-securely.patch new file mode 100644 index 0000000..80b0b7d --- /dev/null +++ b/ghostscript-9.23-100-run-dvipdf-securely.patch @@ -0,0 +1,22 @@ +From 91c9c6d17d445781ee572c281b8b9d75d96f9df8 Mon Sep 17 00:00:00 2001 +From: "David Kaspar [Dee'Kej]" +Date: Fri, 7 Oct 2016 13:57:01 +0200 +Subject: [PATCH] Make sure 'dvipdf' is being run securely + +--- + lib/dvipdf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/dvipdf b/lib/dvipdf +index 802aeab..c92dfb0 100755 +--- a/lib/dvipdf ++++ b/lib/dvipdf +@@ -43,4 +43,4 @@ fi + + # We have to include the options twice because -I only takes effect if it + # appears before other options. +-exec dvips -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -P- -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite - ++exec dvips -R -Ppdf $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -P- -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite - +-- +2.14.3 + diff --git a/ghostscript.spec b/ghostscript.spec index 28fdcc3..41be06b 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -9,7 +9,7 @@ Name: ghostscript Version: 9.27 -Release: 6 +Release: 7 Summary: An interpreter for PostScript and PDF files License: AGPLv3+ URL: https://ghostscript.com/ @@ -20,7 +20,7 @@ Patch0: CVE-2019-10216.patch Patch1: CVE-2019-14811-CVE-2019-14812-CVE-2019-14813.patch Patch2: CVE-2019-14817.patch Patch3: CVE-2019-14869.patch - +Patch4: ghostscript-9.23-100-run-dvipdf-securely.patch BuildRequires: automake gcc BuildRequires: adobe-mappings-cmap-devel adobe-mappings-pdf-devel BuildRequires: google-droid-sans-fonts urw-base35-fonts-devel @@ -180,6 +180,12 @@ make check %{_bindir}/dvipdf %changelog +* Wed Mar 18 2020 openEuler Buildteam - 9.27-7 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add run dvipdf securely + * Tue Jan 7 2020 chengquan - 9.27-6 - Type:CVE - ID:NA -- Gitee