Skip to content

Commit 1632ef7

Browse files
committed
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.
1 parent f1f4fbd commit 1632ef7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ssl/d1_both.c

+9
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,16 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
627627
frag->msg_header.frag_off = 0;
628628
}
629629
else
630+
{
630631
frag = (hm_fragment*) item->data;
632+
if (frag->msg_header.msg_len != msg_hdr->msg_len)
633+
{
634+
item = NULL;
635+
frag = NULL;
636+
goto err;
637+
}
638+
}
639+
631640

632641
/* If message is already reassembled, this must be a
633642
* retransmit and can be dropped.

0 commit comments

Comments
 (0)