diff options
| author | jsing <> | 2014-11-27 16:03:03 +0000 |
|---|---|---|
| committer | jsing <> | 2014-11-27 16:03:03 +0000 |
| commit | 07409820dc766c10b948b458d7af9315231002f1 (patch) | |
| tree | b520ad37da120e6f1f35a849623806156505fa8f | |
| parent | 2b7b1f3fa633621744ceb3865d0d012edd77c0b1 (diff) | |
| download | openbsd-07409820dc766c10b948b458d7af9315231002f1.tar.gz openbsd-07409820dc766c10b948b458d7af9315231002f1.tar.bz2 openbsd-07409820dc766c10b948b458d7af9315231002f1.zip | |
Avoid a NULL dereference in the DTLS client that can be triggered by a
crafted server response used in conjunction with an anonymous DH or
anonymous ECDH ciphersuite.
Fixes CVE-2014-3510, which is effectively a repeat of CVE-2014-3470 in
copied code.
Reported by Felix Groebert of the Google Security Team.
ok beck@ miod@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/d1_clnt.c | 10 | ||||
| -rw-r--r-- | src/lib/libssl/src/ssl/d1_clnt.c | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c index 7f6e232128..de5721851e 100644 --- a/src/lib/libssl/d1_clnt.c +++ b/src/lib/libssl/d1_clnt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_clnt.c,v 1.37 2014/11/16 14:12:47 jsing Exp $ */ | 1 | /* $OpenBSD: d1_clnt.c,v 1.38 2014/11/27 16:03:03 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
| 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
| @@ -934,6 +934,14 @@ dtls1_send_client_key_exchange(SSL *s) | |||
| 934 | 934 | ||
| 935 | alg_k = s->s3->tmp.new_cipher->algorithm_mkey; | 935 | alg_k = s->s3->tmp.new_cipher->algorithm_mkey; |
| 936 | 936 | ||
| 937 | if (s->session->sess_cert == NULL) { | ||
| 938 | ssl3_send_alert(s, SSL3_AL_FATAL, | ||
| 939 | SSL_AD_HANDSHAKE_FAILURE); | ||
| 940 | SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE, | ||
| 941 | ERR_R_INTERNAL_ERROR); | ||
| 942 | goto err; | ||
| 943 | } | ||
| 944 | |||
| 937 | if (alg_k & SSL_kRSA) { | 945 | if (alg_k & SSL_kRSA) { |
| 938 | RSA *rsa; | 946 | RSA *rsa; |
| 939 | unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH]; | 947 | unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH]; |
diff --git a/src/lib/libssl/src/ssl/d1_clnt.c b/src/lib/libssl/src/ssl/d1_clnt.c index 7f6e232128..de5721851e 100644 --- a/src/lib/libssl/src/ssl/d1_clnt.c +++ b/src/lib/libssl/src/ssl/d1_clnt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_clnt.c,v 1.37 2014/11/16 14:12:47 jsing Exp $ */ | 1 | /* $OpenBSD: d1_clnt.c,v 1.38 2014/11/27 16:03:03 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
| 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
| @@ -934,6 +934,14 @@ dtls1_send_client_key_exchange(SSL *s) | |||
| 934 | 934 | ||
| 935 | alg_k = s->s3->tmp.new_cipher->algorithm_mkey; | 935 | alg_k = s->s3->tmp.new_cipher->algorithm_mkey; |
| 936 | 936 | ||
| 937 | if (s->session->sess_cert == NULL) { | ||
| 938 | ssl3_send_alert(s, SSL3_AL_FATAL, | ||
| 939 | SSL_AD_HANDSHAKE_FAILURE); | ||
| 940 | SSLerr(SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE, | ||
| 941 | ERR_R_INTERNAL_ERROR); | ||
| 942 | goto err; | ||
| 943 | } | ||
| 944 | |||
| 937 | if (alg_k & SSL_kRSA) { | 945 | if (alg_k & SSL_kRSA) { |
| 938 | RSA *rsa; | 946 | RSA *rsa; |
| 939 | unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH]; | 947 | unsigned char tmp_buf[SSL_MAX_MASTER_KEY_LENGTH]; |
