diff options
author | Emilia Käsper <emilia@openssl.org> | 2014-07-24 22:15:29 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2014-08-06 20:41:24 +0100 |
commit | 1d7d0ed9c21403d79d602b6c7d76fdecf5e737da (patch) | |
tree | 70978fb43b4ce397dc685f036632f0a1f2be22ad /ssl | |
parent | 40a2200d89b2a559700cee95f1898312f993792a (diff) |
Fix DTLS anonymous EC(DH) denial of service
CVE-2014-3510
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s3_clnt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 4e3cc2ef7a..d9b777701b 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -2362,6 +2362,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 |