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