diff options
author | William A. Kennington III <william@wkennington.com> | 2015-08-03 14:27:14 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-08-03 14:27:14 -0700 |
commit | a2da9cfcafee701794290bfa710cd68b0a62cdb5 (patch) | |
tree | 59ed75f1efe274af17ae33059d25a0e36d84384a /pkgs/misc/ghostscript | |
parent | 32caa604e3c4fc2704a9d9416e4a244975e4393e (diff) | |
parent | f2d3b5ead934a3334f67405cddc705273e736ef1 (diff) | |
download | nixpkgs-a2da9cfcafee701794290bfa710cd68b0a62cdb5.tar nixpkgs-a2da9cfcafee701794290bfa710cd68b0a62cdb5.tar.gz nixpkgs-a2da9cfcafee701794290bfa710cd68b0a62cdb5.tar.bz2 nixpkgs-a2da9cfcafee701794290bfa710cd68b0a62cdb5.tar.lz nixpkgs-a2da9cfcafee701794290bfa710cd68b0a62cdb5.tar.xz nixpkgs-a2da9cfcafee701794290bfa710cd68b0a62cdb5.tar.zst nixpkgs-a2da9cfcafee701794290bfa710cd68b0a62cdb5.zip |
Merge branch 'master.upstream' into staging.upstream
Diffstat (limited to 'pkgs/misc/ghostscript')
-rw-r--r-- | pkgs/misc/ghostscript/CVE-2015-3228.patch | 20 | ||||
-rw-r--r-- | pkgs/misc/ghostscript/default.nix | 6 |
2 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/misc/ghostscript/CVE-2015-3228.patch b/pkgs/misc/ghostscript/CVE-2015-3228.patch new file mode 100644 index 00000000000..7be18b0a730 --- /dev/null +++ b/pkgs/misc/ghostscript/CVE-2015-3228.patch @@ -0,0 +1,20 @@ +Description: Sanity check for memory allocation. + In gs_heap_alloc_bytes(), add a sanity check to ensure we don't overflow the + variable holding the actual number of bytes we allocate. +Origin: upstream, http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=0c0b085 +Author: Chris Liddell <chris.liddell@artifex.com> +Forwarded: yes +Bug-Debian: http://bugs.debian.org/793489 +Last-Update: 2015-07-26 + +--- a/base/gsmalloc.c ++++ b/base/gsmalloc.c +@@ -178,7 +178,7 @@ + } else { + uint added = size + sizeof(gs_malloc_block_t); + +- if (mmem->limit - added < mmem->used) ++ if (added <= size || mmem->limit - added < mmem->used) + set_msg("exceeded limit"); + else if ((ptr = (byte *) Memento_label(malloc(added), cname)) == 0) + set_msg("failed"); diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index fe86577bb7b..3cbd156f17d 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -57,6 +57,12 @@ stdenv.mkDerivation rec { # [] # maybe sometimes jpeg2000 support ; + patches = [ + ./urw-font-files.patch + # fetched from debian's ghostscript 9.15_dfsg-1 (called 020150707~0c0b085.patch there) + ./CVE-2015-3228.patch + ]; + makeFlags = [ "cups_serverroot=$(out)" "cups_serverbin=$(out)/lib/cups" ]; preConfigure = '' |