summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2014-11-27 16:03:03 +0000
committerjsing <>2014-11-27 16:03:03 +0000
commit6cf0671671533a0aa8cb583f1d7f4f8e428268bd (patch)
treeb520ad37da120e6f1f35a849623806156505fa8f /src/lib
parent215c63694da4bf85cfa8b01c82a89a52e337e78a (diff)
downloadopenbsd-6cf0671671533a0aa8cb583f1d7f4f8e428268bd.tar.gz
openbsd-6cf0671671533a0aa8cb583f1d7f4f8e428268bd.tar.bz2
openbsd-6cf0671671533a0aa8cb583f1d7f4f8e428268bd.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 'src/lib')
-rw-r--r--src/lib/libssl/d1_clnt.c10
-rw-r--r--src/lib/libssl/src/ssl/d1_clnt.c10
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];