diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-03 00:54:35 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-01-08 13:43:20 +0000 |
commit | 45fe66b8ba026186aa5d8ef1e0e6010ea74d5c0b (patch) | |
tree | 0577f9a360cc0c60bd395316e0e7153e0205cdc4 | |
parent | 8d7aab986b499f34d9e1bc58fbfd77f05c38116e (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.
Reviewed-by: Dr Steve Henson <steve@openssl.org>
-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 d717260313..73ce488684 100644 --- a/ssl/d1_pkt.c +++ b/ssl/d1_pkt.c @@ -676,7 +676,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; |