unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 9ae02103e7dd88c4f9037bede697b84393fb73d4 1179 bytes (raw)
name: gnu/packages/patches/zziplib-CVE-2017-5974.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
Fix CVE-2017-5974:

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5974

Patch copied from Debian.

Index: zziplib-0.13.62/zzip/memdisk.c
===================================================================
--- zziplib-0.13.62.orig/zzip/memdisk.c
+++ zziplib-0.13.62/zzip/memdisk.c
@@ -216,12 +216,12 @@ zzip_mem_entry_new(ZZIP_DISK * disk, ZZI
         /* override sizes/offsets with zip64 values for largefile support */
         zzip_extra_zip64 *block = (zzip_extra_zip64 *)
             zzip_mem_entry_extra_block(item, ZZIP_EXTRA_zip64);
-        if (block)
+        if (block && ZZIP_GET16(block->z_datasize) >= (8 + 8 + 8 + 4))
         {
-            item->zz_usize = __zzip_get64(block->z_usize);
-            item->zz_csize = __zzip_get64(block->z_csize);
-            item->zz_offset = __zzip_get64(block->z_offset);
-            item->zz_diskstart = __zzip_get32(block->z_diskstart);
+            item->zz_usize = ZZIP_GET64(block->z_usize);
+            item->zz_csize = ZZIP_GET64(block->z_csize);
+            item->zz_offset = ZZIP_GET64(block->z_offset);
+            item->zz_diskstart = ZZIP_GET32(block->z_diskstart);
         }
     }
     /* NOTE:

debug log:

solving 9ae02103e ...
found 9ae02103e in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).