diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-03 00:54:35 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-01-08 14:14:29 +0000 |
commit | b2688c91613566db1f42edd4b45f6e17146531b9 (patch) | |
tree | 446cac6cc131f26166abb846df1cbe12ba5ab04a /ssl | |
parent | bf6fa208b5c081c041f267c4c0352c686fa8d8a5 (diff) |
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.
Conflicts:
ssl/d1_pkt.c
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/d1_pkt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c index 3ed2e9584d..de184e33a3 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -663,7 +663,8 @@ again: * would be dropped unnecessarily. */ if (!(s->d1->listen && rr->type == SSL3_RT_HANDSHAKE && - *p == SSL3_MT_CLIENT_HELLO) && + s->packet_length > DTLS1_RT_HEADER_LENGTH && + s->packet[DTLS1_RT_HEADER_LENGTH] == SSL3_MT_CLIENT_HELLO) && !dtls1_record_replay_check(s, bitmap)) { rr->length = 0; |