[Pkg-openssl-changes] r636 - in openssl/branches/wheezy/debian: . patches

Kurt Roeckx kroeckx at moszumanska.debian.org
Mon Dec 23 16:45:45 UTC 2013


Author: kroeckx
Date: 2013-12-23 16:45:45 +0000 (Mon, 23 Dec 2013)
New Revision: 636

Added:
   openssl/branches/wheezy/debian/patches/CVE-2013-6450.patch
Modified:
   openssl/branches/wheezy/debian/changelog
   openssl/branches/wheezy/debian/patches/series
Log:
Fix CVE-2013-6450


Modified: openssl/branches/wheezy/debian/changelog
===================================================================
--- openssl/branches/wheezy/debian/changelog	2013-12-23 16:41:41 UTC (rev 635)
+++ openssl/branches/wheezy/debian/changelog	2013-12-23 16:45:45 UTC (rev 636)
@@ -1,8 +1,9 @@
 openssl (1.0.1e-2+deb7u1) stable-security; urgency=medium
 
   * Fix CVE-2013-6449 (Closes: #732754)
+  * Fix CVE-2013-6450
 
- -- Kurt Roeckx <kurt at roeckx.be>  Mon, 23 Dec 2013 15:47:52 +0100
+ -- Kurt Roeckx <kurt at roeckx.be>  Mon, 23 Dec 2013 17:43:52 +0100
 
 openssl (1.0.1e-2) unstable; urgency=high
 

Added: openssl/branches/wheezy/debian/patches/CVE-2013-6450.patch
===================================================================
--- openssl/branches/wheezy/debian/patches/CVE-2013-6450.patch	                        (rev 0)
+++ openssl/branches/wheezy/debian/patches/CVE-2013-6450.patch	2013-12-23 16:45:45 UTC (rev 636)
@@ -0,0 +1,95 @@
+From: "Dr. Stephen Henson" <steve at openssl.org>
+Date: Fri, 20 Dec 2013 15:26:50 +0000
+Subject: [PATCH] Fix DTLS retransmission from previous session.
+Origin: upstream, commit:34628967f1e65dc8f34e000f0f5518e21afbfc7b
+
+For DTLS we might need to retransmit messages from the previous session
+so keep a copy of write context in DTLS retransmission buffers instead
+of replacing it after sending CCS. CVE-2013-6450.
+---
+ CHANGES        |  5 +++++
+ ssl/d1_both.c  |  6 ++++++
+ ssl/ssl_locl.h |  2 ++
+ ssl/t1_enc.c   | 17 +++++++++++------
+ 4 files changed, 24 insertions(+), 6 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index cfaebba..173be24 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -4,6 +4,11 @@
+ 
+  Changes between 1.0.1e and 1.0.1f [xx XXX xxxx]
+ 
++  *) Keep original DTLS digest and encryption contexts in retransmission
++     structures so we can use the previous session parameters if they need
++     to be resent. (CVE-2013-6450)
++     [Steve Henson]
++
+   *) Add option SSL_OP_SAFARI_ECDHE_ECDSA_BUG (part of SSL_OP_ALL) which
+      avoids preferring ECDHE-ECDSA ciphers when the client appears to be
+      Safari on OS X.  Safari on OS X 10.8..10.8.3 advertises support for
+diff --git a/ssl/d1_both.c b/ssl/d1_both.c
+index 65ec001..7a5596a 100644
+--- a/ssl/d1_both.c
++++ b/ssl/d1_both.c
+@@ -214,6 +214,12 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
+ static void
+ dtls1_hm_fragment_free(hm_fragment *frag)
+ 	{
++
++	if (frag->msg_header.is_ccs)
++		{
++		EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
++		EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash);
++		}
+ 	if (frag->fragment) OPENSSL_free(frag->fragment);
+ 	if (frag->reassembly) OPENSSL_free(frag->reassembly);
+ 	OPENSSL_free(frag);
+diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h
+index 96ce9a7..e485907 100644
+--- a/ssl/ssl_locl.h
++++ b/ssl/ssl_locl.h
+@@ -621,6 +621,8 @@ extern SSL3_ENC_METHOD TLSv1_enc_data;
+ extern SSL3_ENC_METHOD SSLv3_enc_data;
+ extern SSL3_ENC_METHOD DTLSv1_enc_data;
+ 
++#define SSL_IS_DTLS(s) (s->method->version == DTLS1_VERSION)
++
+ #define IMPLEMENT_tls_meth_func(version, func_name, s_accept, s_connect, \
+ 				s_get_meth) \
+ const SSL_METHOD *func_name(void)  \
+diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
+index 72015f5..56db834 100644
+--- a/ssl/t1_enc.c
++++ b/ssl/t1_enc.c
+@@ -414,15 +414,20 @@ int tls1_change_cipher_state(SSL *s, int which)
+ 			s->mac_flags |= SSL_MAC_FLAG_WRITE_MAC_STREAM;
+ 			else
+ 			s->mac_flags &= ~SSL_MAC_FLAG_WRITE_MAC_STREAM;
+-		if (s->enc_write_ctx != NULL)
++		if (s->enc_write_ctx != NULL && !SSL_IS_DTLS(s))
+ 			reuse_dd = 1;
+-		else if ((s->enc_write_ctx=OPENSSL_malloc(sizeof(EVP_CIPHER_CTX))) == NULL)
++		else if ((s->enc_write_ctx=EVP_CIPHER_CTX_new()) == NULL)
+ 			goto err;
+-		else
+-			/* make sure it's intialized in case we exit later with an error */
+-			EVP_CIPHER_CTX_init(s->enc_write_ctx);
+ 		dd= s->enc_write_ctx;
+-		mac_ctx = ssl_replace_hash(&s->write_hash,NULL);
++		if (SSL_IS_DTLS(s))
++			{
++			mac_ctx = EVP_MD_CTX_create();
++			if (!mac_ctx)
++				goto err;
++			s->write_hash = mac_ctx;
++			}
++		else
++			mac_ctx = ssl_replace_hash(&s->write_hash,NULL);
+ #ifndef OPENSSL_NO_COMP
+ 		if (s->compress != NULL)
+ 			{
+-- 
+1.8.5.1
+

Modified: openssl/branches/wheezy/debian/patches/series
===================================================================
--- openssl/branches/wheezy/debian/patches/series	2013-12-23 16:41:41 UTC (rev 635)
+++ openssl/branches/wheezy/debian/patches/series	2013-12-23 16:45:45 UTC (rev 636)
@@ -37,3 +37,4 @@
 dtls_version.patch
 get_certificate.patch
 CVE-2013-6449.patch
+CVE-2013-6450.patch




More information about the Pkg-openssl-changes mailing list