diff options
author | Peter Korsgaard <peter@korsgaard.com> | 2017-04-28 09:49:30 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2017-04-28 14:15:32 +0200 |
commit | 874becfd019bc8f4e126684d08c4164e984b11c3 (patch) | |
tree | fdc537e46077a033dd5058e1a8ba8ba77e10b978 /package/ghostscript/0003-Bug-697799-have-.eqproc-check-its-parameters.patch | |
parent | 051e9851f499fb2982591531e210c91563232c63 (diff) | |
download | buildroot-874becfd019bc8f4e126684d08c4164e984b11c3.tar.gz buildroot-874becfd019bc8f4e126684d08c4164e984b11c3.zip |
ghostscript: add upstream security fixes for CVE-2017-8291
CVE-2017-8291 - Artifex Ghostscript through 2017-04-26 allows -dSAFER bypass
and remote command execution via a "/OutputFile (%pipe%" substring in a
crafted .eps document that is an input to the gs program, as exploited in
the wild in April 2017.
For more details, see https://bugzilla.suse.com/show_bug.cgi?id=1036453
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/ghostscript/0003-Bug-697799-have-.eqproc-check-its-parameters.patch')
-rw-r--r-- | package/ghostscript/0003-Bug-697799-have-.eqproc-check-its-parameters.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/package/ghostscript/0003-Bug-697799-have-.eqproc-check-its-parameters.patch b/package/ghostscript/0003-Bug-697799-have-.eqproc-check-its-parameters.patch new file mode 100644 index 0000000000..becdc66054 --- /dev/null +++ b/package/ghostscript/0003-Bug-697799-have-.eqproc-check-its-parameters.patch @@ -0,0 +1,33 @@ +From 4f83478c88c2e05d6e8d79ca4557eb039354d2f3 Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Thu, 27 Apr 2017 13:03:33 +0100 +Subject: [PATCH] Bug 697799: have .eqproc check its parameters + +The Ghostscript custom operator .eqproc was not check the number or type of +the parameters it was given. + +Signed-off-by: Peter Korsgaard <peter@korsgaard.com> +--- + psi/zmisc3.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/psi/zmisc3.c b/psi/zmisc3.c +index 54b304246..37293ff4b 100644 +--- a/psi/zmisc3.c ++++ b/psi/zmisc3.c +@@ -56,6 +56,12 @@ zeqproc(i_ctx_t *i_ctx_p) + ref2_t stack[MAX_DEPTH + 1]; + ref2_t *top = stack; + ++ if (ref_stack_count(&o_stack) < 2) ++ return_error(gs_error_stackunderflow); ++ if (!r_is_array(op - 1) || !r_is_array(op)) { ++ return_error(gs_error_typecheck); ++ } ++ + make_array(&stack[0].proc1, 0, 1, op - 1); + make_array(&stack[0].proc2, 0, 1, op); + for (;;) { +-- +2.11.0 + |