Blame SOURCES/ghostscript-cve-2019-3838.patch

bb3194
From: Chris Liddell <chris.liddell@artifex.com>
bb3194
Date: Wed, 20 Feb 2019 09:54:28 +0000 (+0000)
bb3194
Subject: Bug 700576: Make a transient proc executeonly (in DefineResource).
bb3194
bb3194
Bug 700576: Make a transient proc executeonly (in DefineResource).
bb3194
bb3194
This prevents access to .forceput
bb3194
bb3194
Solution originally suggested by cbuissar@redhat.com.
bb3194
bb3194
https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=ed9fcd95bb01f0768bf273b2526732e381202319
bb3194
bb3194
From: Chris Liddell <chris.liddell@artifex.com>
bb3194
Date: Fri, 22 Feb 2019 12:28:23 +0000 (+0000)
bb3194
Subject: Bug 700576(redux): an extra transient proc needs executeonly'ed.
bb3194
bb3194
Bug 700576(redux): an extra transient proc needs executeonly'ed.
bb3194
bb3194
https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=a82601e8f95a2f2147f3b3b9e44ec2b8f3a6be8b
bb3194
---
bb3194
bb3194
diff -up ghostscript-9.07/Resource/Init/gs_res.ps.cve-2019-3838 ghostscript-9.07/Resource/Init/gs_res.ps
bb3194
--- ghostscript-9.07/Resource/Init/gs_res.ps.cve-2019-3838	2019-02-28 12:08:09.181546939 +0100
bb3194
+++ ghostscript-9.07/Resource/Init/gs_res.ps	2019-02-28 12:09:32.410456904 +0100
bb3194
@@ -425,7 +425,7 @@ status {
bb3194
                         % so we have to use .forcedef here.
bb3194
                   /.Instances 1 index .forcedef	% Category dict is read-only
bb3194
                 } executeonly if
bb3194
-              }
bb3194
+              } executeonly
bb3194
               { .LocalInstances dup //.emptydict eq
bb3194
                  { pop 3 dict localinstancedict Category 2 index put
bb3194
                  }
bb3194
@@ -437,7 +437,7 @@ status {
bb3194
                         % Now make the resource value read-only.
bb3194
              0 2 copy get { readonly } .internalstopped pop
bb3194
              dup 4 1 roll put exch pop exch pop
bb3194
-           }
bb3194
+           } executeonly
bb3194
            { /defineresource cvx /typecheck signaloperror
bb3194
            }
bb3194
         ifelse