ports/core (3.1): [notify] unzip: added patch for CVE-2014-9636
![](https://secure.gravatar.com/avatar/df8330968b6df8cd1c1942c5fb4b720c.jpg?s=120&d=mm&r=g)
commit cbb0e06bee31031a76f3061d380467c5d1c4f1d8 Author: Fredrik Rinnestam <fredrik@crux.nu> Date: Sat Feb 7 20:29:29 2015 +0100 [notify] unzip: added patch for CVE-2014-9636 diff --git a/unzip/.md5sum b/unzip/.md5sum index 26776c5..e5857a4 100644 --- a/unzip/.md5sum +++ b/unzip/.md5sum @@ -1 +1,3 @@ +19341ef8810558e0cb4e3fe25b3eff70 unzip-6.0-attribs-overflow.patch +40ae64ba09670480195539bcdf92c0ef unzip-6.0-overflow.patch 62b490407489521db863b523a7f86375 unzip60.tar.gz diff --git a/unzip/Pkgfile b/unzip/Pkgfile index c2b8efb..68e66a3 100644 --- a/unzip/Pkgfile +++ b/unzip/Pkgfile @@ -4,11 +4,14 @@ name=unzip version=6.0 -release=2 -source=(http://downloads.sourceforge.net/sourceforge/infozip/${name}${version//./}.tar.gz) +release=3 +source=(http://downloads.sourceforge.net/sourceforge/infozip/${name}${version//./}.tar.gz \ + unzip-6.0-overflow.patch unzip-6.0-attribs-overflow.patch) build() { cd ${name}${version//./} + patch -p1 -i $SRC/unzip-6.0-overflow.patch + patch -p1 -i $SRC/unzip-6.0-attribs-overflow.patch make -f unix/Makefile LOCAL_UNZIP="$CFLAGS" prefix=/usr linux_noasm make -f unix/Makefile prefix=$PKG/usr install ln -sf unzip $PKG/usr/bin/zipinfo diff --git a/unzip/unzip-6.0-attribs-overflow.patch b/unzip/unzip-6.0-attribs-overflow.patch new file mode 100644 index 0000000..3122325 --- /dev/null +++ b/unzip/unzip-6.0-attribs-overflow.patch @@ -0,0 +1,12 @@ +diff -up unzip60/zipinfo.c.attribs-overflow unzip60/zipinfo.c +--- unzip60/zipinfo.c.attribs-overflow 2009-11-30 09:55:39.000000000 +0100 ++++ unzip60/zipinfo.c 2009-11-30 09:56:42.844263244 +0100 +@@ -1881,7 +1881,7 @@ static int zi_short(__G) /* return PK- + #endif + int k, error, error_in_archive=PK_COOL; + unsigned hostnum, hostver, methid, methnum, xattr; +- char *p, workspace[12], attribs[16]; ++ char *p, workspace[12], attribs[17]; + char methbuf[5]; + static ZCONST char dtype[5]="NXFS"; /* normal, maximum, fast, superfast */ + static ZCONST char Far os[NUM_HOSTS+1][4] = { diff --git a/unzip/unzip-6.0-overflow.patch b/unzip/unzip-6.0-overflow.patch new file mode 100644 index 0000000..1750796 --- /dev/null +++ b/unzip/unzip-6.0-overflow.patch @@ -0,0 +1,27 @@ +diff --git a/extract.c b/extract.c +index a0a4929..9ef80b3 100644 +--- a/extract.c ++++ b/extract.c +@@ -2214,6 +2214,7 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata) + ulg eb_ucsize; + uch *eb_ucptr; + int r; ++ ush method; + + if (compr_offset < 4) /* field is not compressed: */ + return PK_OK; /* do nothing and signal OK */ +@@ -2223,6 +2224,12 @@ static int test_compr_eb(__G__ eb, eb_size, compr_offset, test_uc_ebdata) + eb_size <= (compr_offset + EB_CMPRHEADLEN))) + return IZ_EF_TRUNC; /* no compressed data! */ + ++ method = makeword(eb + (EB_HEADSIZE + compr_offset)); ++ if ((method == STORED) && (eb_size - compr_offset != eb_ucsize)) ++ return PK_ERR; /* compressed & uncompressed ++ * should match in STORED ++ * method */ ++ + if ( + #ifdef INT_16BIT + (((ulg)(extent)eb_ucsize) != eb_ucsize) || + +
participants (1)
-
crux@crux.nu