Version in base suite: 9.27~dfsg-2+deb10u2 Base version: ghostscript_9.27~dfsg-2+deb10u2 Target version: ghostscript_9.27~dfsg-2+deb10u3 Base file: /srv/ftp-master.debian.org/ftp/pool/main/g/ghostscript/ghostscript_9.27~dfsg-2+deb10u2.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/g/ghostscript/ghostscript_9.27~dfsg-2+deb10u3.dsc changelog | 6 +++ patches/020191105~4859047.patch | 67 ++++++++++++++++++++++++++++++++++++++++ patches/series | 1 3 files changed, 74 insertions(+) diff -Nru ghostscript-9.27~dfsg/debian/changelog ghostscript-9.27~dfsg/debian/changelog --- ghostscript-9.27~dfsg/debian/changelog 2019-09-02 12:36:48.000000000 +0000 +++ ghostscript-9.27~dfsg/debian/changelog 2019-11-09 21:58:27.000000000 +0000 @@ -1,3 +1,9 @@ +ghostscript (9.27~dfsg-2+deb10u3) buster-security; urgency=high + + * remove .forceput from /.charkeys (CVE-2019-14869) + + -- Salvatore Bonaccorso Sat, 09 Nov 2019 22:58:27 +0100 + ghostscript (9.27~dfsg-2+deb10u2) buster-security; urgency=high * Non-maintainer upload by the Security Team. diff -Nru ghostscript-9.27~dfsg/debian/patches/020191105~4859047.patch ghostscript-9.27~dfsg/debian/patches/020191105~4859047.patch --- ghostscript-9.27~dfsg/debian/patches/020191105~4859047.patch 1970-01-01 00:00:00.000000000 +0000 +++ ghostscript-9.27~dfsg/debian/patches/020191105~4859047.patch 2019-11-09 21:58:27.000000000 +0000 @@ -0,0 +1,67 @@ +From: Chris Liddell +Date: Tue, 5 Nov 2019 09:45:27 +0000 +Subject: Bug 701841: remove .forceput from /.charkeys +Origin: https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=485904772c5f0aa1140032746e5a0abfc40f4cef +Bug: https://bugs.ghostscript.com/show_bug.cgi?id=701841 +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2019-14869 + +When loading Type 1 or Truetype fonts from disk, we attempt to extend the glyph +name table to include all identifiable glyph names from the Adobe Glyph List. + +In the case of Type 1 fonts, the font itself (almost always) marks the +CharStrings dictionary as read-only, hence we have to use .forceput for that +case. + +But for Truetype fonts, the CharStrings dictionary is created internally and is +not read-only until *after* we have fully populated it (including the extended +glyph names from the AGL), hence there is no need for .forceput, and no need to +carry the security risk of using it. + +Replace with regular put. +--- + Resource/Init/gs_ttf.ps | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Resource/Init/gs_ttf.ps b/Resource/Init/gs_ttf.ps +index 74043d16b0cf..6be8fe9955cd 100644 +--- a/Resource/Init/gs_ttf.ps ++++ b/Resource/Init/gs_ttf.ps +@@ -1304,7 +1304,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef + TTFDEBUG { (\n1 setting alias: ) print dup ==only + ( to be the same as ) print 2 index //== exec } if + +- 7 index 2 index 3 -1 roll exch .forceput ++ 7 index 2 index 3 -1 roll exch put + } forall + pop pop pop + } +@@ -1322,7 +1322,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef + exch pop + TTFDEBUG { (\n2 setting alias: ) print 1 index ==only + ( to use glyph index: ) print dup //== exec } if +- 5 index 3 1 roll .forceput ++ 5 index 3 1 roll put + //false + } + { +@@ -1339,7 +1339,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef + { % CharStrings(dict) isunicode(boolean) cmap(dict) RAGL(dict) gname(name) codep(integer) gindex(integer) + TTFDEBUG { (\3 nsetting alias: ) print 1 index ==only + ( to be index: ) print dup //== exec } if +- exch pop 5 index 3 1 roll .forceput ++ exch pop 5 index 3 1 roll put + } + { + pop pop +@@ -1369,7 +1369,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef + } ifelse + ] + TTFDEBUG { (Encoding: ) print dup === flush } if +-} .bind executeonly odef % hides .forceput ++} .bind odef + + % ---------------- CIDFontType 2 font loading ---------------- % + +-- +2.24.0 + diff -Nru ghostscript-9.27~dfsg/debian/patches/series ghostscript-9.27~dfsg/debian/patches/series --- ghostscript-9.27~dfsg/debian/patches/series 2019-09-02 12:36:48.000000000 +0000 +++ ghostscript-9.27~dfsg/debian/patches/series 2019-11-09 21:58:27.000000000 +0000 @@ -2,6 +2,7 @@ 020190802~5b85ddd.patch 020190820~885444f.patch 020190821~cd1b1ca.patch +020191105~4859047.patch 2001_docdir_fix_for_debian.patch 2002_gs_man_fix_debian.patch 2003_support_multiarch.patch