summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-05-13 18:48:31 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-06-03 16:30:23 +0100
commit82ba68c42d6a9cf245afa489471005b2a0377c10 (patch)
tree7fef2a3e022996c77ae6b10d7d009f50ab7432d8 /ssl
parent4b258e73ae0da0f1a7ff3eb9840b6978711c2400 (diff)
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.
Diffstat (limited to 'ssl')
-rw-r--r--ssl/d1_both.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index 01d724211c..3426a0a5f3 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -621,7 +621,16 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
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.