diff options
author | Mark H Weaver <mhw@netris.org> | 2015-07-25 23:48:54 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-07-27 04:38:44 -0400 |
commit | 35a12b47199a99b4a1407172be039f2f07f5efe7 (patch) | |
tree | 71e1a0a6854acb79830e43280219ea10a74d623d /gnu/packages/patches | |
parent | 6d7a0eeded965d4c60766dde9c8a07bfc476c0ac (diff) | |
download | guix-35a12b47199a99b4a1407172be039f2f07f5efe7.tar.gz |
gnu: ghostscript: Add fix for CVE-2015-3228.
* gnu/packages/patches/ghostscript-CVE-2015-3228.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/ghostscript.scm (ghostscript)[source]: Add patch.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/ghostscript-CVE-2015-3228.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/patches/ghostscript-CVE-2015-3228.patch b/gnu/packages/patches/ghostscript-CVE-2015-3228.patch new file mode 100644 index 0000000000..c19fdb1d43 --- /dev/null +++ b/gnu/packages/patches/ghostscript-CVE-2015-3228.patch @@ -0,0 +1,32 @@ +The file names in the upstream patch below were modified to apply to GNU +ghostscript. + +From 0c0b0859ae1aba64861599f0e7f74f143f305932 Mon Sep 17 00:00:00 2001 +From: Chris Liddell <chris.liddell@artifex.com> +Date: Tue, 7 Jul 2015 16:57:41 +0100 +Subject: [PATCH] Bug 696041: 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. + +No cluster differences +--- + gs/base/gsmalloc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/base/gsmalloc.c b/base/gsmalloc.c +index 624552d..cad79c2 100644 +--- a/base/gsmalloc.c ++++ b/base/gsmalloc.c +@@ -178,7 +178,7 @@ gs_heap_alloc_bytes(gs_memory_t * mem, uint size, client_name_t cname) + } 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"); +-- +2.4.6 + |