Skip to content

Commit

Permalink
Fix DTLS anonymous EC(DH) denial of service
Browse files Browse the repository at this point in the history
CVE-2014-3510

Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
  • Loading branch information
ekasper authored and mattcaswell committed Aug 6, 2014
1 parent 280b1f1 commit 1716003
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ssl/s3_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2385,6 +2385,13 @@ int ssl3_send_client_key_exchange(SSL *s)
RSA *rsa;
unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH];

if (s->session->sess_cert == NULL)
{
/* We should always have a server certificate with SSL_kRSA. */
SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE,ERR_R_INTERNAL_ERROR);
goto err;
}

if (s->session->sess_cert->peer_rsa_tmp != NULL)
rsa=s->session->sess_cert->peer_rsa_tmp;
else
Expand Down

0 comments on commit 1716003

Please sign in to comment.