diff options
author | drochner <drochner@pkgsrc.org> | 2013-08-07 16:48:49 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2013-08-07 16:48:49 +0000 |
commit | f786371bf8945f30723e4a4bb7035db2811f6a1e (patch) | |
tree | 2dc7be43a5e9be833aa5dcd9b22715573a4f065c /net/filezilla/patches | |
parent | 101bbd56edb84704610e7f3e90bf57bea6825290 (diff) | |
download | pkgsrc-f786371bf8945f30723e4a4bb7035db2811f6a1e.tar.gz |
update to 3.7.2
This is a major update, many fixes and improvements.
Main reason for the update was to sync the embedded sftp client
with putty after fixes for vulnerabilities.
Diffstat (limited to 'net/filezilla/patches')
-rw-r--r-- | net/filezilla/patches/patch-CVE-2013-4206 | 87 | ||||
-rw-r--r-- | net/filezilla/patches/patch-CVE-2013-4208 | 29 | ||||
-rw-r--r-- | net/filezilla/patches/patch-CVE-2013-4852-1 | 24 | ||||
-rw-r--r-- | net/filezilla/patches/patch-CVE-2013-4852-2 | 13 | ||||
-rw-r--r-- | net/filezilla/patches/patch-CVE-2013-4852-3 | 13 | ||||
-rw-r--r-- | net/filezilla/patches/patch-aa | 14 |
6 files changed, 116 insertions, 64 deletions
diff --git a/net/filezilla/patches/patch-CVE-2013-4206 b/net/filezilla/patches/patch-CVE-2013-4206 new file mode 100644 index 00000000000..5ea64c704b3 --- /dev/null +++ b/net/filezilla/patches/patch-CVE-2013-4206 @@ -0,0 +1,87 @@ +$NetBSD: patch-CVE-2013-4206,v 1.1 2013/08/07 16:48:49 drochner Exp $ + +fixes also CVE-2013-4207 +http://svn.tartarus.org/sgt?view=revision&sortby=date&revision=9977 +http://svn.tartarus.org/sgt?view=revision&sortby=date&revision=9996 + +--- src/putty/sshbn.c.orig 2011-08-21 17:53:50.000000000 +0000 ++++ src/putty/sshbn.c +@@ -1018,6 +1018,13 @@ Bignum modmul(Bignum p, Bignum q, Bignum + + pqlen = (p[0] > q[0] ? p[0] : q[0]); + ++ /* ++ * Make sure that we're allowing enough space. The shifting below ++ * will underflow the vectors we allocate if pqlen is too small. ++ */ ++ if (2*pqlen <= mlen) ++ pqlen = mlen/2 + 1; ++ + /* Allocate n of size pqlen, copy p to n */ + n = snewn(pqlen, BignumInt); + i = pqlen - p[0]; +@@ -1306,7 +1313,18 @@ int ssh1_write_bignum(void *data, Bignum + int bignum_cmp(Bignum a, Bignum b) + { + int amax = a[0], bmax = b[0]; +- int i = (amax > bmax ? amax : bmax); ++ int i; ++ ++ /* Annoyingly we have two representations of zero */ ++ if (amax == 1 && a[amax] == 0) ++ amax = 0; ++ if (bmax == 1 && b[bmax] == 0) ++ bmax = 0; ++ ++ assert(amax == 0 || a[amax] != 0); ++ assert(bmax == 0 || b[bmax] != 0); ++ ++ i = (amax > bmax ? amax : bmax); + while (i) { + BignumInt aval = (i > amax ? 0 : a[i]); + BignumInt bval = (i > bmax ? 0 : b[i]); +@@ -1864,6 +1882,44 @@ int main(int argc, char **argv) + freebn(b); + freebn(c); + freebn(p); ++ } else if (!strcmp(buf, "modmul")) { ++ Bignum a, b, m, c, p; ++ ++ if (ptrnum != 4) { ++ printf("%d: modmul with %d parameters, expected 4\n", ++ line, ptrnum); ++ exit(1); ++ } ++ a = bignum_from_bytes(ptrs[0], ptrs[1]-ptrs[0]); ++ b = bignum_from_bytes(ptrs[1], ptrs[2]-ptrs[1]); ++ m = bignum_from_bytes(ptrs[2], ptrs[3]-ptrs[2]); ++ c = bignum_from_bytes(ptrs[3], ptrs[4]-ptrs[3]); ++ p = modmul(a, b, m); ++ ++ if (bignum_cmp(c, p) == 0) { ++ passes++; ++ } else { ++ char *as = bignum_decimal(a); ++ char *bs = bignum_decimal(b); ++ char *ms = bignum_decimal(m); ++ char *cs = bignum_decimal(c); ++ char *ps = bignum_decimal(p); ++ ++ printf("%d: fail: %s * %s mod %s gave %s expected %s\n", ++ line, as, bs, ms, ps, cs); ++ fails++; ++ ++ sfree(as); ++ sfree(bs); ++ sfree(ms); ++ sfree(cs); ++ sfree(ps); ++ } ++ freebn(a); ++ freebn(b); ++ freebn(m); ++ freebn(c); ++ freebn(p); + } else if (!strcmp(buf, "pow")) { + Bignum base, expt, modulus, expected, answer; + diff --git a/net/filezilla/patches/patch-CVE-2013-4208 b/net/filezilla/patches/patch-CVE-2013-4208 new file mode 100644 index 00000000000..5464fa7c5d2 --- /dev/null +++ b/net/filezilla/patches/patch-CVE-2013-4208 @@ -0,0 +1,29 @@ +$NetBSD: patch-CVE-2013-4208,v 1.1 2013/08/07 16:48:49 drochner Exp $ + +http://svn.tartarus.org/sgt?view=revision&sortby=date&revision=9988 + +--- src/putty/sshdss.c.orig 2013-08-06 09:08:32.000000000 +0000 ++++ src/putty/sshdss.c +@@ -251,8 +251,13 @@ static int dss_verifysig(void *key, char + } + r = get160(&sig, &siglen); + s = get160(&sig, &siglen); +- if (!r || !s) ++ if (!r || !s) { ++ if (r) ++ freebn(r); ++ if (s) ++ freebn(s); + return 0; ++ } + + /* + * Step 1. w <- s^-1 mod q. +@@ -601,6 +606,7 @@ static unsigned char *dss_sign(void *key + s = modmul(kinv, hxr, dss->q); /* s = k^-1 * (hash + x*r) mod q */ + freebn(hxr); + freebn(kinv); ++ freebn(k); + freebn(hash); + + /* diff --git a/net/filezilla/patches/patch-CVE-2013-4852-1 b/net/filezilla/patches/patch-CVE-2013-4852-1 deleted file mode 100644 index cbc780a8dec..00000000000 --- a/net/filezilla/patches/patch-CVE-2013-4852-1 +++ /dev/null @@ -1,24 +0,0 @@ -$NetBSD: patch-CVE-2013-4852-1,v 1.1 2013/08/06 12:55:10 drochner Exp $ - -see http://svn.tartarus.org/sgt?view=revision&sortby=date&revision=9896 - ---- src/putty/sshdss.c.orig 2007-11-23 11:34:00.000000000 +0000 -+++ src/putty/sshdss.c -@@ -43,6 +43,8 @@ static void getstring(char **data, int * - if (*datalen < 4) - return; - *length = GET_32BIT(*data); -+ if (*length < 0) -+ return; - *datalen -= 4; - *data += 4; - if (*datalen < *length) -@@ -98,7 +100,7 @@ static void *dss_newkey(char *data, int - } - #endif - -- if (!p || memcmp(p, "ssh-dss", 7)) { -+ if (!p || slen != 7 || memcmp(p, "ssh-dss", 7)) { - sfree(dss); - return NULL; - } diff --git a/net/filezilla/patches/patch-CVE-2013-4852-2 b/net/filezilla/patches/patch-CVE-2013-4852-2 deleted file mode 100644 index f448d55026b..00000000000 --- a/net/filezilla/patches/patch-CVE-2013-4852-2 +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-CVE-2013-4852-2,v 1.1 2013/08/06 12:55:10 drochner Exp $ - ---- src/putty/sshrsa.c.orig 2009-01-03 15:44:15.000000000 +0000 -+++ src/putty/sshrsa.c -@@ -450,6 +450,8 @@ static void getstring(char **data, int * - if (*datalen < 4) - return; - *length = GET_32BIT(*data); -+ if (*length < 0) -+ return; - *datalen -= 4; - *data += 4; - if (*datalen < *length) diff --git a/net/filezilla/patches/patch-CVE-2013-4852-3 b/net/filezilla/patches/patch-CVE-2013-4852-3 deleted file mode 100644 index c4ee3ef850a..00000000000 --- a/net/filezilla/patches/patch-CVE-2013-4852-3 +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-CVE-2013-4852-3,v 1.1 2013/08/06 12:55:10 drochner Exp $ - ---- src/putty/import.c.orig 2008-02-22 03:00:11.000000000 +0000 -+++ src/putty/import.c -@@ -290,7 +290,7 @@ static int ssh2_read_mpint(void *data, i - if (len < 4) - goto error; - bytes = GET_32BIT(d); -- if (len < 4+bytes) -+ if (bytes < 0 || len-4 < bytes) - goto error; - - ret->start = d + 4; diff --git a/net/filezilla/patches/patch-aa b/net/filezilla/patches/patch-aa deleted file mode 100644 index 3fc1256e2fd..00000000000 --- a/net/filezilla/patches/patch-aa +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-aa,v 1.1 2012/07/06 15:37:23 drochner Exp $ - -fix build with gnutls-3 - ---- src/engine/tlssocket.cpp.orig 2011-05-02 03:30:19.000000000 +0000 -+++ src/engine/tlssocket.cpp -@@ -113,7 +113,6 @@ bool CTlsSocket::Init() - gnutls_transport_set_push_function(m_session, PushFunction); - gnutls_transport_set_pull_function(m_session, PullFunction); - gnutls_transport_set_ptr(m_session, (gnutls_transport_ptr_t)this); -- gnutls_transport_set_lowat(m_session, 0); - - m_shutdown_requested = false; - |