diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-05-13 18:48:31 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-06-05 09:04:27 +0100 |
commit | 1632ef744872edc2aa2a53d487d3e79c965a4ad3 (patch) | |
tree | f270b635ac06b1f4689d8634d064b200b0025560 /ssl/d1_both.c | |
parent | f1f4fbde2ad48bd6cd61c2d054c4efcd9dcc73e6 (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/d1_both.c')
-rw-r--r-- | ssl/d1_both.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 1bb2e4d1a1..7de9ae4b5f 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -627,7 +627,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. |