Skip to content

Commit 248385c

Browse files
committed
Follow on from CVE-2014-3571. This fixes the code that was the original source
of the crash due to p being NULL. Steve's fix prevents this situation from occuring - however this is by no means obvious by looking at the code for dtls1_get_record. This fix just makes things look a bit more sane. Reviewed-by: Dr Stephen Henson <steve@openssl.org>
1 parent feba02f commit 248385c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: ssl/d1_pkt.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,8 @@ int dtls1_get_record(SSL *s)
679679
* would be dropped unnecessarily.
680680
*/
681681
if (!(s->d1->listen && rr->type == SSL3_RT_HANDSHAKE &&
682-
*p == SSL3_MT_CLIENT_HELLO) &&
682+
s->packet_length > DTLS1_RT_HEADER_LENGTH &&
683+
s->packet[DTLS1_RT_HEADER_LENGTH] == SSL3_MT_CLIENT_HELLO) &&
683684
!dtls1_record_replay_check(s, bitmap))
684685
{
685686
rr->length = 0;

0 commit comments

Comments
 (0)