pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/openssl Apply patches which fixes recent secu...
details: https://anonhg.NetBSD.org/pkgsrc/rev/34b1381a4ce7
branches: trunk
changeset: 519077:34b1381a4ce7
user: taca <taca%pkgsrc.org@localhost>
date: Sat Sep 30 04:20:24 2006 +0000
description:
Apply patches which fixes recent security problem of OpenSSL.
http://secunia.com/advisories/22130/
Bump PKGREVISION.
diffstat:
security/openssl/Makefile | 4 +-
security/openssl/distinfo | 14 +++++++-
security/openssl/patches/patch-ah | 15 +++++++++
security/openssl/patches/patch-ai | 64 +++++++++++++++++++++++++++++++++++++++
security/openssl/patches/patch-an | 38 +++++++++++++++++++++++
security/openssl/patches/patch-ao | 15 +++++++++
security/openssl/patches/patch-ap | 25 +++++++++++++++
security/openssl/patches/patch-aq | 33 ++++++++++++++++++++
security/openssl/patches/patch-ar | 28 +++++++++++++++++
security/openssl/patches/patch-as | 17 ++++++++++
security/openssl/patches/patch-at | 25 +++++++++++++++
security/openssl/patches/patch-au | 32 +++++++++++++++++++
security/openssl/patches/patch-av | 14 ++++++++
security/openssl/patches/patch-aw | 16 +++++++++
14 files changed, 337 insertions(+), 3 deletions(-)
diffs (truncated from 416 to 300 lines):
diff -r ace5350cb6df -r 34b1381a4ce7 security/openssl/Makefile
--- a/security/openssl/Makefile Fri Sep 29 23:40:04 2006 +0000
+++ b/security/openssl/Makefile Sat Sep 30 04:20:24 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.116 2006/09/07 09:44:31 adrianp Exp $
+# $NetBSD: Makefile,v 1.117 2006/09/30 04:20:24 taca Exp $
OPENSSL_SNAPSHOT?= # empty
OPENSSL_STABLE?= # empty
@@ -24,7 +24,7 @@
. endif
.endif
-PKGREVISION= 2
+PKGREVISION= 3
SVR4_PKGNAME= ossl
CATEGORIES= security
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
diff -r ace5350cb6df -r 34b1381a4ce7 security/openssl/distinfo
--- a/security/openssl/distinfo Fri Sep 29 23:40:04 2006 +0000
+++ b/security/openssl/distinfo Sat Sep 30 04:20:24 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.52 2006/09/07 09:44:31 adrianp Exp $
+$NetBSD: distinfo,v 1.53 2006/09/30 04:20:24 taca Exp $
SHA1 (openssl-0.9.7i.tar.gz) = 4c23925744d43272fa19615454da44e01465eb06
RMD160 (openssl-0.9.7i.tar.gz) = 0dce52c5793a0c37f17b620f7d26bbf9e4fcf755
@@ -8,6 +8,18 @@
SHA1 (patch-ad) = 2581d06c21ed6d1c9a554289591031a6eb66a686
SHA1 (patch-ae) = cb3ce622ef9efc4098d57b10059e5424272520c8
SHA1 (patch-af) = e8a9d803d362658e0db3f044b35794b2084b7667
+SHA1 (patch-ah) = 5245d7ca407af952cfa028e46cf7a54dc0f50f6f
+SHA1 (patch-ai) = f960775a57551a70806517b439606099000ea97e
SHA1 (patch-ak) = 7f9960a97cbe83c381c2a4565ca3a6e4e661bf54
SHA1 (patch-al) = 64fd0be6adf30821b4c4bba3c9088c6dcbff3ba7
SHA1 (patch-am) = 209aad896f976e5acc9bf66f5e3fdf6193d2ff3d
+SHA1 (patch-an) = c38cf54341ae5b770f984859c1a3bf6df41e0532
+SHA1 (patch-ao) = 834860d35eaa1211db664346a362822114bd16ef
+SHA1 (patch-ap) = 9473b8e69b71864baab3d38ee3de90e7027b1b0b
+SHA1 (patch-aq) = 68704a8048f7eea3744ae5e04dda09c676762923
+SHA1 (patch-ar) = 575be597244eb04576651d7b0276604d51fa7464
+SHA1 (patch-as) = d7984ceadfa51356e6d7a9cc398c1adf7e755930
+SHA1 (patch-at) = d232c98b680c8b279181b08efc84c569128d9ebb
+SHA1 (patch-au) = 6924cb666df8ed1eadd28a8ba75462560e72ac43
+SHA1 (patch-av) = dc8d31971b9535965339681b7a0c32d0b72d50bd
+SHA1 (patch-aw) = 9139c779ac221595423c38dd97a0ec91f103083e
diff -r ace5350cb6df -r 34b1381a4ce7 security/openssl/patches/patch-ah
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssl/patches/patch-ah Sat Sep 30 04:20:24 2006 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-ah,v 1.6 2006/09/30 04:20:24 taca Exp $
+
+# http://secunia.com/advisories/22130/
+
+--- ssl/s3_srvr.c.orig 2005-04-10 08:52:53.000000000 +0900
++++ ssl/s3_srvr.c
+@@ -1727,7 +1727,7 @@ static int ssl3_get_client_key_exchange(
+
+ if (kssl_ctx->client_princ)
+ {
+- int len = strlen(kssl_ctx->client_princ);
++ size_t len = strlen(kssl_ctx->client_princ);
+ if ( len < SSL_MAX_KRB5_PRINCIPAL_LENGTH )
+ {
+ s->session->krb5_client_princ_len = len;
diff -r ace5350cb6df -r 34b1381a4ce7 security/openssl/patches/patch-ai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssl/patches/patch-ai Sat Sep 30 04:20:24 2006 +0000
@@ -0,0 +1,64 @@
+$NetBSD: patch-ai,v 1.6 2006/09/30 04:20:24 taca Exp $
+
+# http://secunia.com/advisories/22130/
+
+--- crypto/rsa/rsa_eay.c.orig 2005-05-29 05:15:47.000000000 +0900
++++ crypto/rsa/rsa_eay.c
+@@ -157,6 +157,28 @@ static int RSA_eay_public_encrypt(int fl
+ unsigned char *buf=NULL;
+ BN_CTX *ctx=NULL;
+
++ if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS)
++ {
++ RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT, RSA_R_MODULUS_TOO_LARGE);
++ return -1;
++ }
++
++ if (BN_ucmp(rsa->n, rsa->e) <= 0)
++ {
++ RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT, RSA_R_BAD_E_VALUE);
++ return -1;
++ }
++
++ /* for large moduli, enforce exponent limit */
++ if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS)
++ {
++ if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS)
++ {
++ RSAerr(RSA_F_RSA_EAY_PUBLIC_DECRYPT, RSA_R_BAD_E_VALUE);
++ return -1;
++ }
++ }
++
+ BN_init(&f);
+ BN_init(&ret);
+ if ((ctx=BN_CTX_new()) == NULL) goto err;
+@@ -576,6 +598,28 @@ static int RSA_eay_public_decrypt(int fl
+ unsigned char *buf=NULL;
+ BN_CTX *ctx=NULL;
+
++ if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS)
++ {
++ RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT, RSA_R_MODULUS_TOO_LARGE);
++ return -1;
++ }
++
++ if (BN_ucmp(rsa->n, rsa->e) <= 0)
++ {
++ RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT, RSA_R_BAD_E_VALUE);
++ return -1;
++ }
++
++ /* for large moduli, enforce exponent limit */
++ if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS)
++ {
++ if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS)
++ {
++ RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT, RSA_R_BAD_E_VALUE);
++ return -1;
++ }
++ }
++
+ BN_init(&f);
+ BN_init(&ret);
+ ctx=BN_CTX_new();
diff -r ace5350cb6df -r 34b1381a4ce7 security/openssl/patches/patch-an
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssl/patches/patch-an Sat Sep 30 04:20:24 2006 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-an,v 1.1 2006/09/30 04:20:24 taca Exp $
+
+# http://secunia.com/advisories/22130/
+
+--- crypto/asn1/tasn_dec.c.orig 2005-05-01 03:16:40.000000000 +0900
++++ crypto/asn1/tasn_dec.c
+@@ -628,6 +628,9 @@ static int asn1_d2i_ex_primitive(ASN1_VA
+ if(!ret) {
+ ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ERR_R_NESTED_ASN1_ERROR);
+ return 0;
++
++ ret = 0;
++
+ } else if(ret == -1) return -1;
+ /* SEQUENCE, SET and "OTHER" are left in encoded form */
+ if((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
+@@ -662,7 +665,11 @@ static int asn1_d2i_ex_primitive(ASN1_VA
+ * internally irrespective of the type. So instead just check
+ * for UNIVERSAL class and ignore the tag.
+ */
+- if(!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL)) goto err;
++ if(!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL))
++ {
++ free_cont = 1;
++ goto err;
++ }
+ len = buf.length;
+ /* Append a final null to string */
+ if(!BUF_MEM_grow_clean(&buf, len + 1)) {
+@@ -903,7 +910,7 @@ static int asn1_collect(BUF_MEM *buf, un
+ return 0;
+ #endif
+ } else {
+- if(!collect_data(buf, &p, plen)) return 0;
++ if(plen && !collect_data(buf, &p, plen)) return 0;
+ }
+ len -= p - q;
+ }
diff -r ace5350cb6df -r 34b1381a4ce7 security/openssl/patches/patch-ao
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssl/patches/patch-ao Sat Sep 30 04:20:24 2006 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-ao,v 1.1 2006/09/30 04:20:24 taca Exp $
+
+# http://secunia.com/advisories/22130/
+
+--- ssl/ssl_lib.c.orig 2005-06-11 05:00:39.000000000 +0900
++++ ssl/ssl_lib.c
+@@ -1187,7 +1187,7 @@ char *SSL_get_shared_ciphers(const SSL *
+ c=sk_SSL_CIPHER_value(sk,i);
+ for (cp=c->name; *cp; )
+ {
+- if (len-- == 0)
++ if (len-- <= 0)
+ {
+ *p='\0';
+ return(buf);
diff -r ace5350cb6df -r 34b1381a4ce7 security/openssl/patches/patch-ap
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssl/patches/patch-ap Sat Sep 30 04:20:24 2006 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-ap,v 1.1 2006/09/30 04:20:24 taca Exp $
+
+# http://secunia.com/advisories/22130/
+
+--- crypto/dh/dh.h.orig 2005-05-16 10:26:03.000000000 +0900
++++ crypto/dh/dh.h
+@@ -70,6 +70,10 @@
+ #include <openssl/crypto.h>
+ #include <openssl/ossl_typ.h>
+
++#ifndef OPENSSL_DH_MAX_MODULUS_BITS
++# define OPENSSL_DH_MAX_MODULUS_BITS 10000
++#endif
++
+ #define DH_FLAG_CACHE_MONT_P 0x01
+ #define DH_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DH
+ * implementation now uses constant time
+@@ -203,6 +207,7 @@ void ERR_load_DH_strings(void);
+ #define DH_F_DH_GENERATE_KEY 103
+ #define DH_F_DH_GENERATE_PARAMETERS 104
+ #define DH_F_DH_NEW_METHOD 105
++#define DH_R_MODULUS_TOO_LARGE 103
+
+ /* Reason codes. */
+ #define DH_R_BAD_GENERATOR 101
diff -r ace5350cb6df -r 34b1381a4ce7 security/openssl/patches/patch-aq
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssl/patches/patch-aq Sat Sep 30 04:20:24 2006 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-aq,v 1.1 2006/09/30 04:20:24 taca Exp $
+
+# http://secunia.com/advisories/22130/
+
+--- crypto/dh/dh_key.c.orig 2005-05-28 00:39:11.000000000 +0900
++++ crypto/dh/dh_key.c
+@@ -180,6 +180,12 @@ static int compute_key(unsigned char *ke
+ BIGNUM *tmp;
+ int ret= -1;
+
++ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS)
++ {
++ DHerr(DH_F_DH_COMPUTE_KEY,DH_R_MODULUS_TOO_LARGE);
++ goto err;
++ }
++
+ ctx = BN_CTX_new();
+ if (ctx == NULL) goto err;
+ BN_CTX_start(ctx);
+@@ -213,8 +219,11 @@ static int compute_key(unsigned char *ke
+
+ ret=BN_bn2bin(tmp,key);
+ err:
+- BN_CTX_end(ctx);
+- BN_CTX_free(ctx);
++ if (ctx != NULL)
++ {
++ BN_CTX_end(ctx);
++ BN_CTX_free(ctx);
++ }
+ return(ret);
+ }
+
diff -r ace5350cb6df -r 34b1381a4ce7 security/openssl/patches/patch-ar
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssl/patches/patch-ar Sat Sep 30 04:20:24 2006 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-ar,v 1.1 2006/09/30 04:20:24 taca Exp $
+
+# http://secunia.com/advisories/22130/
+
+--- crypto/dsa/dsa.h.orig 2005-05-16 10:26:04.000000000 +0900
++++ crypto/dsa/dsa.h
+@@ -79,6 +79,10 @@
+ # include <openssl/dh.h>
+ #endif
+
++#ifndef OPENSSL_DSA_MAX_MODULUS_BITS
++# define OPENSSL_DSA_MAX_MODULUS_BITS 10000
++#endif
++
+ #define DSA_FLAG_CACHE_MONT_P 0x01
+ #define DSA_FLAG_NO_EXP_CONSTTIME 0x02 /* new with 0.9.7h; the built-in DSA
+ * implementation now uses constant time
+@@ -252,8 +256,10 @@ void ERR_load_DSA_strings(void);
+ #define DSA_F_SIG_CB 114
+
+ /* Reason codes. */
++#define DSA_R_BAD_Q_VALUE 102
+ #define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100
+ #define DSA_R_MISSING_PARAMETERS 101
++#define DSA_R_MODULUS_TOO_LARGE 103
+
+ #ifdef __cplusplus
+ }
diff -r ace5350cb6df -r 34b1381a4ce7 security/openssl/patches/patch-as
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openssl/patches/patch-as Sat Sep 30 04:20:24 2006 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-as,v 1.1 2006/09/30 04:20:24 taca Exp $
+
+# http://secunia.com/advisories/22130/
+
Home |
Main Index |
Thread Index |
Old Index