[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#642605: pu: package openssl/0.9.8o-4squeeze3



Hi Adam, everyone,

On Saturday 24 September 2011 16:27:17 Adam D. Barratt wrote:
> On Sat, 2011-09-24 at 13:31 -0500, Raphael Geissert wrote:
> > After two power failures and lots of connectivity issues, I think lenny13
> > should be on your hands now. Attached is the debdiff just for the sake of
> > completeness.
> 
> Yep, and flagged for acceptance at the next dinstall; thanks.

Thank you. Sorry for the trouble of releasing a DSA and then an SPU.

Attached is the debdiff for squeeze3. The packages should be on your queue 
already.

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
diff -Nru openssl-0.9.8o/debian/changelog openssl-0.9.8o/debian/changelog
--- openssl-0.9.8o/debian/changelog	2011-09-12 19:49:24.000000000 -0500
+++ openssl-0.9.8o/debian/changelog	2011-09-24 18:57:29.000000000 -0500
@@ -1,3 +1,10 @@
+openssl (0.9.8o-4squeeze3) squeeze; urgency=low
+
+  * Non-maintainer upload by the Security Team.
+  * Fix CVE-2011-3210: SSL memory handling for (EC)DH ciphersuites
+
+ -- Raphael Geissert <geissert@debian.org>  Sat, 24 Sep 2011 18:57:14 -0500
+
 openssl (0.9.8o-4squeeze2) squeeze-security; urgency=high
 
   * Non-maintainer upload by the Security Team.
diff -Nru openssl-0.9.8o/debian/patches/CVE-2011-3210.patch openssl-0.9.8o/debian/patches/CVE-2011-3210.patch
--- openssl-0.9.8o/debian/patches/CVE-2011-3210.patch	1969-12-31 18:00:00.000000000 -0600
+++ openssl-0.9.8o/debian/patches/CVE-2011-3210.patch	2011-09-13 14:18:51.000000000 -0500
@@ -0,0 +1,98 @@
+Description: Fix SSL memory handling for (EC)DH ciphersuites, in
+ particular for multi-threaded use of ECDH.
+Origin: http://cvs.openssl.org/chngview?cn=21334
+
+Index: openssl-0.9.8o/ssl/s3_lib.c
+===================================================================
+--- openssl-0.9.8o.orig/ssl/s3_lib.c
++++ openssl-0.9.8o/ssl/s3_lib.c
+@@ -1722,11 +1722,17 @@ void ssl3_clear(SSL *s)
+ 		}
+ #ifndef OPENSSL_NO_DH
+ 	if (s->s3->tmp.dh != NULL)
++		{
+ 		DH_free(s->s3->tmp.dh);
++		s->s3->tmp.dh = NULL;
++		}
+ #endif
+ #ifndef OPENSSL_NO_ECDH
+ 	if (s->s3->tmp.ecdh != NULL)
++		{
+ 		EC_KEY_free(s->s3->tmp.ecdh);
++		s->s3->tmp.ecdh = NULL;
++		}
+ #endif
+ 
+ 	rp = s->s3->rbuf.buf;
+Index: openssl-0.9.8o/ssl/s3_srvr.c
+===================================================================
+--- openssl-0.9.8o.orig/ssl/s3_srvr.c
++++ openssl-0.9.8o/ssl/s3_srvr.c
+@@ -710,9 +710,7 @@ int ssl3_check_client_hello(SSL *s)
+ 	if (s->s3->tmp.message_type == SSL3_MT_CLIENT_HELLO)
+ 		{
+ 		/* Throw away what we have done so far in the current handshake,
+-		 * which will now be aborted. (A full SSL_clear would be too much.)
+-		 * I hope that tmp.dh is the only thing that may need to be cleared
+-		 * when a handshake is not completed ... */
++		 * which will now be aborted. (A full SSL_clear would be too much.) */
+ #ifndef OPENSSL_NO_DH
+ 		if (s->s3->tmp.dh != NULL)
+ 			{
+@@ -720,6 +718,13 @@ int ssl3_check_client_hello(SSL *s)
+ 			s->s3->tmp.dh = NULL;
+ 			}
+ #endif
++#ifndef OPENSSL_NO_ECDH
++		if (s->s3->tmp.ecdh != NULL)
++			{
++			EC_KEY_free(s->s3->tmp.ecdh);
++			s->s3->tmp.ecdh = NULL;
++			}
++#endif
+ 		return 2;
+ 		}
+ 	return 1;
+@@ -1329,7 +1334,6 @@ int ssl3_send_server_key_exchange(SSL *s
+ 
+ 			if (s->s3->tmp.dh != NULL)
+ 				{
+-				DH_free(dh);
+ 				SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);
+ 				goto err;
+ 				}
+@@ -1390,7 +1394,6 @@ int ssl3_send_server_key_exchange(SSL *s
+ 
+ 			if (s->s3->tmp.ecdh != NULL)
+ 				{
+-				EC_KEY_free(s->s3->tmp.ecdh); 
+ 				SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_INTERNAL_ERROR);
+ 				goto err;
+ 				}
+@@ -1401,12 +1404,11 @@ int ssl3_send_server_key_exchange(SSL *s
+ 				SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB);
+ 				goto err;
+ 				}
+-			if (!EC_KEY_up_ref(ecdhp))
++			if ((ecdh = EC_KEY_dup(ecdhp)) == NULL)
+ 				{
+ 				SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,ERR_R_ECDH_LIB);
+ 				goto err;
+ 				}
+-			ecdh = ecdhp;
+ 
+ 			s->s3->tmp.ecdh=ecdh;
+ 			if ((EC_KEY_get0_public_key(ecdh) == NULL) ||
+@@ -2262,6 +2264,12 @@ int ssl3_get_client_key_exchange(SSL *s)
+                         /* Get encoded point length */
+                         i = *p; 
+ 			p += 1;
++			if (n != 1 + i)
++				{
++				SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
++				    ERR_R_EC_LIB);
++				goto err;
++				}
+                         if (EC_POINT_oct2point(group, 
+ 			    clnt_ecpoint, p, i, bn_ctx) == 0)
+ 				{
diff -Nru openssl-0.9.8o/debian/patches/series openssl-0.9.8o/debian/patches/series
--- openssl-0.9.8o/debian/patches/series	2011-09-12 18:37:42.000000000 -0500
+++ openssl-0.9.8o/debian/patches/series	2011-09-24 18:55:22.000000000 -0500
@@ -24,3 +24,4 @@
 CVE-2011-0014.patch
 block_diginotar.patch
 CVE-2011-1945.patch
+CVE-2011-3210.patch

Reply to: