Blame SOURCES/openssl-1.0.1e-cve-2014-0195.patch

ff4ef5
commit 208d54db20d58c9a5e45e856a0650caadd7d9612
ff4ef5
Author: Dr. Stephen Henson <steve@openssl.org>
ff4ef5
Date:   Tue May 13 18:48:31 2014 +0100
ff4ef5
ff4ef5
    Fix for CVE-2014-0195
ff4ef5
    
ff4ef5
    A buffer overrun attack can be triggered by sending invalid DTLS fragments
ff4ef5
    to an OpenSSL DTLS client or server. This is potentially exploitable to
ff4ef5
    run arbitrary code on a vulnerable client or server.
ff4ef5
    
ff4ef5
    Fixed by adding consistency check for DTLS fragments.
ff4ef5
    
ff4ef5
    Thanks to Jüri Aedla for reporting this issue.
ff4ef5
ff4ef5
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
ff4ef5
index 2e8cf68..07f67f8 100644
ff4ef5
--- a/ssl/d1_both.c
ff4ef5
+++ b/ssl/d1_both.c
ff4ef5
@@ -627,7 +627,16 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
ff4ef5
 		frag->msg_header.frag_off = 0;
ff4ef5
 		}
ff4ef5
 	else
ff4ef5
+		{
ff4ef5
 		frag = (hm_fragment*) item->data;
ff4ef5
+		if (frag->msg_header.msg_len != msg_hdr->msg_len)
ff4ef5
+			{
ff4ef5
+			item = NULL;
ff4ef5
+			frag = NULL;
ff4ef5
+			goto err;
ff4ef5
+			}
ff4ef5
+		}
ff4ef5
+
ff4ef5
 
ff4ef5
 	/* If message is already reassembled, this must be a
ff4ef5
 	 * retransmit and can be dropped.
ff4ef5