diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-05-16 12:55:16 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-06-05 13:24:40 +0100 |
commit | 9d2c9dd1e1a452939a733b638d180bb308ce72a9 (patch) | |
tree | 0628fed1badd61ac231783f1dddb8029a9e46d4b /ssl | |
parent | 8942b92c7cb5fa144bd79b7607b459d0b777164c (diff) |
Additional CVE-2014-0224 protection.
Return a fatal error if an attempt is made to use a zero length
master secret.
(cherry picked from commit 006cd7083f76ed5cb0d9a914857e9231ef1bc317)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_pkt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index d0f3c764a3..ccd82df314 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -1632,7 +1632,7 @@ int ssl3_do_change_cipher_spec(SSL *s) if (s->s3->tmp.key_block == NULL) { - if (s->session == NULL) + if (s->session == NULL || s->session->master_key_length == 0) { /* might happen if dtls1_read_bytes() calls this */ SSLerr(SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC,SSL_R_CCS_RECEIVED_EARLY); |