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

Kurt Roeckx kroeckx at moszumanska.debian.org
Sun Jun 15 10:31:08 UTC 2014


Author: kroeckx
Date: 2014-06-15 10:31:08 +0000 (Sun, 15 Jun 2014)
New Revision: 677

Added:
   openssl/branches/wheezy/debian/patches/CVE-2014-0195.patch
   openssl/branches/wheezy/debian/patches/CVE-2014-0221.patch
   openssl/branches/wheezy/debian/patches/CVE-2014-0224.patch
   openssl/branches/wheezy/debian/patches/CVE-2014-3470.patch
Modified:
   openssl/branches/wheezy/debian/changelog
   openssl/branches/wheezy/debian/patches/series
Log:
* Fix CVE-2014-0224
* Fix CVE-2014-0221
* Fix CVE-2014-0195
* Fix CVE-2014-3470


Modified: openssl/branches/wheezy/debian/changelog
===================================================================
--- openssl/branches/wheezy/debian/changelog	2014-06-14 21:49:17 UTC (rev 676)
+++ openssl/branches/wheezy/debian/changelog	2014-06-15 10:31:08 UTC (rev 677)
@@ -1,3 +1,12 @@
+openssl (1.0.1e-2+deb7u10) wheezy-security; urgency=medium
+
+  * Fix CVE-2014-0224
+  * Fix CVE-2014-0221
+  * Fix CVE-2014-0195
+  * Fix CVE-2014-3470
+
+ -- Kurt Roeckx <kurt at roeckx.be>  Wed, 04 Jun 2014 20:04:27 +0200
+
 openssl (1.0.1e-2+deb7u9) wheezy-security; urgency=medium
 
   * Fix CVE-2014-0198 (Closes: #747432)

Added: openssl/branches/wheezy/debian/patches/CVE-2014-0195.patch
===================================================================
--- openssl/branches/wheezy/debian/patches/CVE-2014-0195.patch	                        (rev 0)
+++ openssl/branches/wheezy/debian/patches/CVE-2014-0195.patch	2014-06-15 10:31:08 UTC (rev 677)
@@ -0,0 +1,33 @@
+From: Dr. Stephen Henson <steve at openssl.org>
+Date: Tue May 13 18:48:31 2014 +0100
+Subject: Fix for CVE-2014-0195
+    
+    A buffer overrun attack can be triggered by sending invalid DTLS fragments
+    to an OpenSSL DTLS client or server. This is potentially exploitable to
+    run arbitrary code on a vulnerable client or server.
+    
+    Fixed by adding consistency check for DTLS fragments.
+    
+    Thanks to Jüri Aedla for reporting this issue.
+
+Index: openssl-1.0.1e/ssl/d1_both.c
+===================================================================
+--- openssl-1.0.1e.orig/ssl/d1_both.c	2014-06-04 18:34:30.110610095 +0000
++++ openssl-1.0.1e/ssl/d1_both.c	2014-06-04 18:34:38.762427320 +0000
+@@ -626,7 +626,16 @@
+ 		frag->msg_header.frag_off = 0;
+ 		}
+ 	else
++		{
+ 		frag = (hm_fragment*) item->data;
++		if (frag->msg_header.msg_len != msg_hdr->msg_len)
++			{
++			item = NULL;
++			frag = NULL;
++			goto err;
++			}
++		}
++
+ 
+ 	/* If message is already reassembled, this must be a
+ 	 * retransmit and can be dropped.

Added: openssl/branches/wheezy/debian/patches/CVE-2014-0221.patch
===================================================================
--- openssl/branches/wheezy/debian/patches/CVE-2014-0221.patch	                        (rev 0)
+++ openssl/branches/wheezy/debian/patches/CVE-2014-0221.patch	2014-06-15 10:31:08 UTC (rev 677)
@@ -0,0 +1,31 @@
+From: Dr. Stephen Henson <steve at openssl.org>
+Date: Fri May 16 13:00:45 2014 +0100
+Subject: Fix CVE-2014-0221
+
+    Unnecessary recursion when receiving a DTLS hello request can be used to
+    crash a DTLS client. Fixed by handling DTLS hello request without recursion.
+    
+    Thanks to Imre Rad (Search-Lab Ltd.) for discovering this issue.
+
+Index: openssl-1.0.1e/ssl/d1_both.c
+===================================================================
+--- openssl-1.0.1e.orig/ssl/d1_both.c	2014-06-04 18:34:30.326605532 +0000
++++ openssl-1.0.1e/ssl/d1_both.c	2014-06-04 18:34:30.334605363 +0000
+@@ -792,6 +792,7 @@
+ 	int i,al;
+ 	struct hm_header_st msg_hdr;
+ 
++	redo:
+ 	/* see if we have the required fragment already */
+ 	if ((frag_len = dtls1_retrieve_buffered_fragment(s,max,ok)) || *ok)
+ 		{
+@@ -850,8 +851,7 @@
+ 					s->msg_callback_arg);
+ 			
+ 			s->init_num = 0;
+-			return dtls1_get_message_fragment(s, st1, stn,
+-				max, ok);
++			goto redo;
+ 			}
+ 		else /* Incorrectly formated Hello request */
+ 			{

Added: openssl/branches/wheezy/debian/patches/CVE-2014-0224.patch
===================================================================
--- openssl/branches/wheezy/debian/patches/CVE-2014-0224.patch	                        (rev 0)
+++ openssl/branches/wheezy/debian/patches/CVE-2014-0224.patch	2014-06-15 10:31:08 UTC (rev 677)
@@ -0,0 +1,103 @@
+From: Dr. Stephen Henson <steve at openssl.org>
+Date: Fri May 16 12:55:16 2014 +0100
+Subject: Fix for CVE-2014-0224
+    
+    Only accept change cipher spec when it is expected instead of at any
+    time. This prevents premature setting of session keys before the master
+    secret is determined which an attacker could use as a MITM attack.
+    
+    Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue
+    and providing the initial fix this patch is based on.
+
+Index: openssl-1.0.1e/ssl/s3_pkt.c
+===================================================================
+--- openssl-1.0.1e.orig/ssl/s3_pkt.c	2014-06-04 18:34:30.230607561 +0000
++++ openssl-1.0.1e/ssl/s3_pkt.c	2014-06-04 18:34:30.238607391 +0000
+@@ -1299,6 +1299,15 @@
+ 			goto f_err;
+ 			}
+ 
++		if (!(s->s3->flags & SSL3_FLAGS_CCS_OK))
++			{
++			al=SSL_AD_UNEXPECTED_MESSAGE;
++			SSLerr(SSL_F_SSL3_READ_BYTES,SSL_R_CCS_RECEIVED_EARLY);
++			goto f_err;
++			}
++
++		s->s3->flags &= ~SSL3_FLAGS_CCS_OK;
++
+ 		rr->length=0;
+ 
+ 		if (s->msg_callback)
+@@ -1433,7 +1442,7 @@
+ 
+ 	if (s->s3->tmp.key_block == NULL)
+ 		{
+-		if (s->session == NULL) 
++		if (s->session == NULL || s->session->master_key_length == 0)
+ 			{
+ 			/* might happen if dtls1_read_bytes() calls this */
+ 			SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC,SSL_R_CCS_RECEIVED_EARLY);
+Index: openssl-1.0.1e/ssl/s3_clnt.c
+===================================================================
+--- openssl-1.0.1e.orig/ssl/s3_clnt.c	2014-06-04 18:33:56.507319937 +0000
++++ openssl-1.0.1e/ssl/s3_clnt.c	2014-06-04 18:34:42.838341212 +0000
+@@ -559,6 +559,7 @@
+ 		case SSL3_ST_CR_FINISHED_A:
+ 		case SSL3_ST_CR_FINISHED_B:
+ 
++			s->s3->flags |= SSL3_FLAGS_CCS_OK;
+ 			ret=ssl3_get_finished(s,SSL3_ST_CR_FINISHED_A,
+ 				SSL3_ST_CR_FINISHED_B);
+ 			if (ret <= 0) goto end;
+@@ -916,6 +917,7 @@
+ 		SSLerr(SSL_F_SSL3_GET_SERVER_HELLO,SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT);
+ 		goto f_err;
+ 		}
++	    s->s3->flags |= SSL3_FLAGS_CCS_OK;
+ 	    s->hit=1;
+ 	    }
+ 	else	/* a miss or crap from the other end */
+Index: openssl-1.0.1e/ssl/s3_srvr.c
+===================================================================
+--- openssl-1.0.1e.orig/ssl/s3_srvr.c	2014-06-04 18:34:30.094610434 +0000
++++ openssl-1.0.1e/ssl/s3_srvr.c	2014-06-04 18:34:30.262606885 +0000
+@@ -673,6 +673,7 @@
+ 		case SSL3_ST_SR_CERT_VRFY_A:
+ 		case SSL3_ST_SR_CERT_VRFY_B:
+ 
++			s->s3->flags |= SSL3_FLAGS_CCS_OK;
+ 			/* we should decide if we expected this one */
+ 			ret=ssl3_get_cert_verify(s);
+ 			if (ret <= 0) goto end;
+@@ -700,6 +701,7 @@
+ 
+ 		case SSL3_ST_SR_FINISHED_A:
+ 		case SSL3_ST_SR_FINISHED_B:
++			s->s3->flags |= SSL3_FLAGS_CCS_OK;
+ 			ret=ssl3_get_finished(s,SSL3_ST_SR_FINISHED_A,
+ 				SSL3_ST_SR_FINISHED_B);
+ 			if (ret <= 0) goto end;
+@@ -770,7 +772,10 @@
+ 				s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A;
+ #else
+ 				if (s->s3->next_proto_neg_seen)
++					{
++					s->s3->flags |= SSL3_FLAGS_CCS_OK;
+ 					s->s3->tmp.next_state=SSL3_ST_SR_NEXT_PROTO_A;
++					}
+ 				else
+ 					s->s3->tmp.next_state=SSL3_ST_SR_FINISHED_A;
+ #endif
+Index: openssl-1.0.1e/ssl/ssl3.h
+===================================================================
+--- openssl-1.0.1e.orig/ssl/ssl3.h	2014-06-04 18:34:30.186608490 +0000
++++ openssl-1.0.1e/ssl/ssl3.h	2014-06-04 18:34:30.290606294 +0000
+@@ -388,6 +388,7 @@
+ #define TLS1_FLAGS_TLS_PADDING_BUG		0x0008
+ #define TLS1_FLAGS_SKIP_CERT_VERIFY		0x0010
+ #define TLS1_FLAGS_KEEP_HANDSHAKE		0x0020
++#define SSL3_FLAGS_CCS_OK			0x0080
+  
+ /* SSL3_FLAGS_SGC_RESTART_DONE is set when we
+  * restart a handshake because of MS SGC and so prevents us

Added: openssl/branches/wheezy/debian/patches/CVE-2014-3470.patch
===================================================================
--- openssl/branches/wheezy/debian/patches/CVE-2014-3470.patch	                        (rev 0)
+++ openssl/branches/wheezy/debian/patches/CVE-2014-3470.patch	2014-06-15 10:31:08 UTC (rev 677)
@@ -0,0 +1,26 @@
+commit 4ad43d511f6cf064c66eb4bfd0fb0919b5dd8a86
+Author: Dr. Stephen Henson <steve at openssl.org>
+Date:   Thu May 29 15:00:05 2014 +0100
+
+    Fix CVE-2014-3470
+    
+    Check session_cert is not NULL before dereferencing it.
+
+Index: openssl-1.0.1e/ssl/s3_clnt.c
+===================================================================
+--- openssl-1.0.1e.orig/ssl/s3_clnt.c	2014-06-04 18:34:30.298606124 +0000
++++ openssl-1.0.1e/ssl/s3_clnt.c	2014-06-04 18:34:30.318605702 +0000
+@@ -2513,6 +2513,13 @@
+ 			int ecdh_clnt_cert = 0;
+ 			int field_size = 0;
+ 
++			if (s->session->sess_cert == NULL) 
++				{
++				ssl3_send_alert(s,SSL3_AL_FATAL,SSL_AD_UNEXPECTED_MESSAGE);
++				SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,SSL_R_UNEXPECTED_MESSAGE);
++				goto err;
++				}
++
+ 			/* Did we send out the client's
+ 			 * ECDH share for use in premaster
+ 			 * computation as part of client certificate?

Modified: openssl/branches/wheezy/debian/patches/series
===================================================================
--- openssl/branches/wheezy/debian/patches/series	2014-06-14 21:49:17 UTC (rev 676)
+++ openssl/branches/wheezy/debian/patches/series	2014-06-15 10:31:08 UTC (rev 677)
@@ -48,3 +48,7 @@
 CVE-2014-0076.patch
 ECDHE-ECDSA_Safari.patch
 CVE-2014-0198.patch
+CVE-2014-0224.patch
+CVE-2014-3470.patch
+CVE-2014-0195.patch
+CVE-2014-0221.patch




More information about the Pkg-openssl-changes mailing list