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

38aaa9
From ed9fcd95bb01f0768bf273b2526732e381202319 Mon Sep 17 00:00:00 2001
38aaa9
From: Chris Liddell <chris.liddell@artifex.com>
38aaa9
Date: Wed, 20 Feb 2019 09:54:28 +0000
38aaa9
Subject: [PATCH 1/2] Bug 700576: Make a transient proc executeonly (in
38aaa9
 DefineResource).
38aaa9
38aaa9
This prevents access to .forceput
38aaa9
38aaa9
Solution originally suggested by cbuissar@redhat.com.
38aaa9
---
38aaa9
 Resource/Init/gs_res.ps | 2 +-
38aaa9
 1 file changed, 1 insertion(+), 1 deletion(-)
38aaa9
38aaa9
diff --git a/Resource/Init/gs_res.ps b/Resource/Init/gs_res.ps
38aaa9
index d9b3459..b646329 100644
38aaa9
--- a/Resource/Init/gs_res.ps
38aaa9
+++ b/Resource/Init/gs_res.ps
38aaa9
@@ -425,7 +425,7 @@ status {
38aaa9
                         % so we have to use .forcedef here.
38aaa9
                   /.Instances 1 index .forcedef	% Category dict is read-only
38aaa9
                 } executeonly if
38aaa9
-              }
38aaa9
+              } executeonly
38aaa9
               { .LocalInstances dup //.emptydict eq
38aaa9
                  { pop 3 dict localinstancedict Category 2 index put
38aaa9
                  }
38aaa9
-- 
38aaa9
2.20.1
38aaa9
38aaa9
38aaa9
From a82601e8f95a2f2147f3b3b9e44ec2b8f3a6be8b Mon Sep 17 00:00:00 2001
38aaa9
From: Chris Liddell <chris.liddell@artifex.com>
38aaa9
Date: Fri, 22 Feb 2019 12:28:23 +0000
38aaa9
Subject: [PATCH 2/2] Bug 700576(redux): an extra transient proc needs
38aaa9
 executeonly'ed.
38aaa9
38aaa9
---
38aaa9
 Resource/Init/gs_res.ps | 2 +-
38aaa9
 1 file changed, 1 insertion(+), 1 deletion(-)
38aaa9
38aaa9
diff --git a/Resource/Init/gs_res.ps b/Resource/Init/gs_res.ps
38aaa9
index b646329..8c1f29f 100644
38aaa9
--- a/Resource/Init/gs_res.ps
38aaa9
+++ b/Resource/Init/gs_res.ps
38aaa9
@@ -437,7 +437,7 @@ status {
38aaa9
                         % Now make the resource value read-only.
38aaa9
              0 2 copy get { readonly } .internalstopped pop
38aaa9
              dup 4 1 roll put exch pop exch pop
38aaa9
-           }
38aaa9
+           } executeonly
38aaa9
            { /defineresource cvx /typecheck signaloperror
38aaa9
            }
38aaa9
         ifelse
38aaa9
-- 
38aaa9
2.20.1
38aaa9