Additional CVE-2014-0224 protection.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 16 May 2014 11:55:16 +0000 (12:55 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 5 Jun 2014 08:04:27 +0000 (09:04 +0100)
Return a fatal error if an attempt is made to use a zero length
master secret.

ssl/s3_pkt.c

index 98c36e6b360a4da7ebd680271b75ede9bcd6eadd..59011e39c67ec51a9624da127aebb66d48df5726 100644 (file)
@@ -1459,7 +1459,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);