pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/archivers/gzip-base Fixes (via RedHat) for: CVE-2006-4...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6a3b071afb0a
branches: trunk
changeset: 518914:6a3b071afb0a
user: adrianp <adrianp%pkgsrc.org@localhost>
date: Sat Sep 23 13:52:17 2006 +0000
description:
Fixes (via RedHat) for: CVE-2006-4334, CVE-2006-4335, CVE-2006-4336,
CVE-2006-4337 and CVE-2006-4338
Bump to nb2
diffstat:
archivers/gzip-base/Makefile | 4 +-
archivers/gzip-base/distinfo | 6 +-
archivers/gzip-base/patches/patch-ac | 13 +++
archivers/gzip-base/patches/patch-ad | 13 +++
archivers/gzip-base/patches/patch-ae | 132 +++++++++++++++++++++++++++++++++++
archivers/gzip-base/patches/patch-af | 30 +++++++
6 files changed, 195 insertions(+), 3 deletions(-)
diffs (235 lines):
diff -r b9ba07c95c1c -r 6a3b071afb0a archivers/gzip-base/Makefile
--- a/archivers/gzip-base/Makefile Sat Sep 23 13:36:06 2006 +0000
+++ b/archivers/gzip-base/Makefile Sat Sep 23 13:52:17 2006 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.22 2006/03/04 21:28:52 jlam Exp $
+# $NetBSD: Makefile,v 1.23 2006/09/23 13:52:17 adrianp Exp $
#
DISTNAME= gzip-1.2.4a
PKGNAME= ${DISTNAME:S/gzip-/gzip-base-/:S/a$/b/}
-PKGREVISION= 1
+PKGREVISION= 2
SVR4_PKGNAME= gzipb
CATEGORIES= archivers
MASTER_SITES= ${MASTER_SITE_GNU:=gzip/}
diff -r b9ba07c95c1c -r 6a3b071afb0a archivers/gzip-base/distinfo
--- a/archivers/gzip-base/distinfo Sat Sep 23 13:36:06 2006 +0000
+++ b/archivers/gzip-base/distinfo Sat Sep 23 13:52:17 2006 +0000
@@ -1,7 +1,11 @@
-$NetBSD: distinfo,v 1.7 2005/12/28 04:36:31 reed Exp $
+$NetBSD: distinfo,v 1.8 2006/09/23 13:52:17 adrianp Exp $
SHA1 (gzip-1.2.4a.shar) = 1e1e513f48be32ecfe24c06b609329963d5a5288
RMD160 (gzip-1.2.4a.shar) = 529397e68b2ed7f39b3a4d3201fd73d10a9c1ebc
Size (gzip-1.2.4a.shar) = 832431 bytes
SHA1 (patch-aa) = 8aff9b00f5798a6d4a77ed13a4d9191330fface2
SHA1 (patch-ab) = e8c7e210c1e7e443230ba20266c0232f29002a4b
+SHA1 (patch-ac) = 77b3cb5c2824f88295eb8c8c7c46c4ca23b776c4
+SHA1 (patch-ad) = 46ae4e79ee8e9a743682a4fb3fecb139b3cef411
+SHA1 (patch-ae) = fefe0f2a3391c48fc9331ac3354a3fdd39c2ed9f
+SHA1 (patch-af) = 42309926f601998b97051aadc31ad44413716029
diff -r b9ba07c95c1c -r 6a3b071afb0a archivers/gzip-base/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/gzip-base/patches/patch-ac Sat Sep 23 13:52:17 2006 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1 2006/09/23 13:52:17 adrianp Exp $
+
+--- gzip.h.orig 1993-08-13 08:35:00.000000000 +0100
++++ gzip.h
+@@ -199,6 +199,8 @@ extern int test; /* check .z f
+ extern int to_stdout; /* output to stdout (-c) */
+ extern int save_orig_name; /* set if original name must be saved */
+
++#define MIN(a,b) ((a) <= (b) ? (a) : (b))
++
+ #define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(0))
+ #define try_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(1))
+
diff -r b9ba07c95c1c -r 6a3b071afb0a archivers/gzip-base/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/gzip-base/patches/patch-ad Sat Sep 23 13:52:17 2006 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1 2006/09/23 13:52:17 adrianp Exp $
+
+--- inflate.c.orig 1993-08-13 10:50:00.000000000 +0100
++++ inflate.c
+@@ -316,7 +316,7 @@ int *m; /* maximum looku
+ {
+ *t = (struct huft *)NULL;
+ *m = 0;
+- return 0;
++ return 2;
+ }
+
+
diff -r b9ba07c95c1c -r 6a3b071afb0a archivers/gzip-base/patches/patch-ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/gzip-base/patches/patch-ae Sat Sep 23 13:52:17 2006 +0000
@@ -0,0 +1,132 @@
+$NetBSD: patch-ae,v 1.1 2006/09/23 13:52:17 adrianp Exp $
+
+--- unlzh.c.orig 1993-08-13 08:35:00.000000000 +0100
++++ unlzh.c
+@@ -148,13 +148,17 @@ local void make_table(nchar, bitlen, tab
+ unsigned i, k, len, ch, jutbits, avail, nextcode, mask;
+
+ for (i = 1; i <= 16; i++) count[i] = 0;
+- for (i = 0; i < (unsigned)nchar; i++) count[bitlen[i]]++;
++ for (i = 0; i < (unsigned)nchar; i++) {
++ if (bitlen[i] > 16)
++ error("Bad table (case a)\n");
++ else count[bitlen[i]]++;
++ }
+
+ start[1] = 0;
+ for (i = 1; i <= 16; i++)
+ start[i + 1] = start[i] + (count[i] << (16 - i));
+- if ((start[17] & 0xffff) != 0)
+- error("Bad table\n");
++ if ((start[17] & 0xffff) != 0 || tablebits > 16) /* 16 for weight below */
++ error("Bad table (case b)\n");
+
+ jutbits = 16 - tablebits;
+ for (i = 1; i <= (unsigned)tablebits; i++) {
+@@ -168,15 +172,15 @@ local void make_table(nchar, bitlen, tab
+
+ i = start[tablebits + 1] >> jutbits;
+ if (i != 0) {
+- k = 1 << tablebits;
+- while (i != k) table[i++] = 0;
++ k = MIN(1 << tablebits, DIST_BUFSIZE);
++ while (i < k) table[i++] = 0;
+ }
+
+ avail = nchar;
+ mask = (unsigned) 1 << (15 - tablebits);
+ for (ch = 0; ch < (unsigned)nchar; ch++) {
+ if ((len = bitlen[ch]) == 0) continue;
+- nextcode = start[len] + weight[len];
++ nextcode = MIN(start[len] + weight[len], DIST_BUFSIZE);
+ if (len <= (unsigned)tablebits) {
+ for (i = start[len]; i < nextcode; i++) table[i] = ch;
+ } else {
+@@ -217,7 +221,7 @@ local void read_pt_len(nn, nbit, i_speci
+ for (i = 0; i < 256; i++) pt_table[i] = c;
+ } else {
+ i = 0;
+- while (i < n) {
++ while (i < MIN(n,NPT)) {
+ c = bitbuf >> (BITBUFSIZ - 3);
+ if (c == 7) {
+ mask = (unsigned) 1 << (BITBUFSIZ - 1 - 3);
+@@ -227,7 +231,7 @@ local void read_pt_len(nn, nbit, i_speci
+ pt_len[i++] = c;
+ if (i == i_special) {
+ c = getbits(2);
+- while (--c >= 0) pt_len[i++] = 0;
++ while (--c >= 0 && i < NPT) pt_len[i++] = 0;
+ }
+ }
+ while (i < nn) pt_len[i++] = 0;
+@@ -247,7 +251,7 @@ local void read_c_len()
+ for (i = 0; i < 4096; i++) c_table[i] = c;
+ } else {
+ i = 0;
+- while (i < n) {
++ while (i < MIN(n,NC)) {
+ c = pt_table[bitbuf >> (BITBUFSIZ - 8)];
+ if (c >= NT) {
+ mask = (unsigned) 1 << (BITBUFSIZ - 1 - 8);
+@@ -255,14 +259,14 @@ local void read_c_len()
+ if (bitbuf & mask) c = right[c];
+ else c = left [c];
+ mask >>= 1;
+- } while (c >= NT);
++ } while (c >= NT && (mask || c != left[c]));
+ }
+ fillbuf((int) pt_len[c]);
+ if (c <= 2) {
+ if (c == 0) c = 1;
+ else if (c == 1) c = getbits(4) + 3;
+ else c = getbits(CBIT) + 20;
+- while (--c >= 0) c_len[i++] = 0;
++ while (--c >= 0 && i < NC) c_len[i++] = 0;
+ } else c_len[i++] = c - 2;
+ }
+ while (i < NC) c_len[i++] = 0;
+@@ -291,7 +295,7 @@ local unsigned decode_c()
+ if (bitbuf & mask) j = right[j];
+ else j = left [j];
+ mask >>= 1;
+- } while (j >= NC);
++ } while (j >= NC && (mask || j != left[j]));
+ }
+ fillbuf((int) c_len[j]);
+ return j;
+@@ -308,7 +312,7 @@ local unsigned decode_p()
+ if (bitbuf & mask) j = right[j];
+ else j = left [j];
+ mask >>= 1;
+- } while (j >= NP);
++ } while (j >= NP && (mask || j != left[j]));
+ }
+ fillbuf((int) pt_len[j]);
+ if (j != 0) j = ((unsigned) 1 << (j - 1)) + getbits((int) (j - 1));
+@@ -355,7 +359,7 @@ local unsigned decode(count, buffer)
+ while (--j >= 0) {
+ buffer[r] = buffer[i];
+ i = (i + 1) & (DICSIZ - 1);
+- if (++r == count) return r;
++ if (++r >= count) return r;
+ }
+ for ( ; ; ) {
+ c = decode_c();
+@@ -365,14 +369,14 @@ local unsigned decode(count, buffer)
+ }
+ if (c <= UCHAR_MAX) {
+ buffer[r] = c;
+- if (++r == count) return r;
++ if (++r >= count) return r;
+ } else {
+ j = c - (UCHAR_MAX + 1 - THRESHOLD);
+ i = (r - decode_p() - 1) & (DICSIZ - 1);
+ while (--j >= 0) {
+ buffer[r] = buffer[i];
+ i = (i + 1) & (DICSIZ - 1);
+- if (++r == count) return r;
++ if (++r >= count) return r;
+ }
+ }
+ }
diff -r b9ba07c95c1c -r 6a3b071afb0a archivers/gzip-base/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/gzip-base/patches/patch-af Sat Sep 23 13:52:17 2006 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-af,v 1.1 2006/09/23 13:52:17 adrianp Exp $
+
+--- unpack.c.orig 1993-08-13 08:35:00.000000000 +0100
++++ unpack.c
+@@ -12,7 +12,6 @@ static char rcsid[] = "$Id: unpack.c,v 1
+ #include "gzip.h"
+ #include "crypt.h"
+
+-#define MIN(a,b) ((a) <= (b) ? (a) : (b))
+ /* The arguments must not have side effects. */
+
+ #define MAX_BITLEN 25
+@@ -132,7 +131,7 @@ local void read_tree()
+ /* Remember where the literals of this length start in literal[] : */
+ lit_base[len] = base;
+ /* And read the literals: */
+- for (n = leaves[len]; n > 0; n--) {
++ for (n = leaves[len]; n > 0 && base < LITERALS; n--) {
+ literal[base++] = (uch)get_byte();
+ }
+ }
+@@ -168,7 +167,7 @@ local void build_tree()
+ prefixp = &prefix_len[1<<peek_bits];
+ for (len = 1; len <= peek_bits; len++) {
+ int prefixes = leaves[len] << (peek_bits-len); /* may be 0 */
+- while (prefixes--) *--prefixp = (uch)len;
++ while (prefixes-- && prefixp > prefix_len) *--prefixp = (uch)len;
+ }
+ /* The length of all other codes is unknown: */
+ while (prefixp > prefix_len) *--prefixp = 0;
Home |
Main Index |
Thread Index |
Old Index