diff options
| author | jsing <> | 2014-06-05 17:47:16 +0000 | 
|---|---|---|
| committer | jsing <> | 2014-06-05 17:47:16 +0000 | 
| commit | 83a6f5c7b1f679afd99888b31214b0e10dd90c81 (patch) | |
| tree | bf905cfeccfb2219a6b68551540ead21470e1ab3 /src | |
| parent | e559f608e16ce124fe9a533161750610f6d3956b (diff) | |
| download | openbsd-83a6f5c7b1f679afd99888b31214b0e10dd90c81.tar.gz openbsd-83a6f5c7b1f679afd99888b31214b0e10dd90c81.tar.bz2 openbsd-83a6f5c7b1f679afd99888b31214b0e10dd90c81.zip | |
Ensure that sess_cert is not NULL before trying to use it.
Fixes CVE-2014-3470, from OpenSSL.
ok deraadt@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/s3_clnt.c | 8 | ||||
| -rw-r--r-- | src/lib/libssl/src/ssl/s3_clnt.c | 8 | 
2 files changed, 16 insertions, 0 deletions
| diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c index 2b538f21b4..d1455cffc1 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
| @@ -2156,6 +2156,14 @@ ssl3_send_client_key_exchange(SSL *s) | |||
| 2156 | int ecdh_clnt_cert = 0; | 2156 | int ecdh_clnt_cert = 0; | 
| 2157 | int field_size = 0; | 2157 | int field_size = 0; | 
| 2158 | 2158 | ||
| 2159 | if (s->session->sess_cert == NULL) { | ||
| 2160 | ssl3_send_alert(s, SSL3_AL_FATAL, | ||
| 2161 | SSL_AD_UNEXPECTED_MESSAGE); | ||
| 2162 | SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, | ||
| 2163 | SSL_R_UNEXPECTED_MESSAGE); | ||
| 2164 | goto err; | ||
| 2165 | } | ||
| 2166 | |||
| 2159 | /* | 2167 | /* | 
| 2160 | * Did we send out the client's ECDH share for use | 2168 | * Did we send out the client's ECDH share for use | 
| 2161 | * in premaster computation as part of client | 2169 | * in premaster computation as part of client | 
| diff --git a/src/lib/libssl/src/ssl/s3_clnt.c b/src/lib/libssl/src/ssl/s3_clnt.c index 2b538f21b4..d1455cffc1 100644 --- a/src/lib/libssl/src/ssl/s3_clnt.c +++ b/src/lib/libssl/src/ssl/s3_clnt.c | |||
| @@ -2156,6 +2156,14 @@ ssl3_send_client_key_exchange(SSL *s) | |||
| 2156 | int ecdh_clnt_cert = 0; | 2156 | int ecdh_clnt_cert = 0; | 
| 2157 | int field_size = 0; | 2157 | int field_size = 0; | 
| 2158 | 2158 | ||
| 2159 | if (s->session->sess_cert == NULL) { | ||
| 2160 | ssl3_send_alert(s, SSL3_AL_FATAL, | ||
| 2161 | SSL_AD_UNEXPECTED_MESSAGE); | ||
| 2162 | SSLerr(SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE, | ||
| 2163 | SSL_R_UNEXPECTED_MESSAGE); | ||
| 2164 | goto err; | ||
| 2165 | } | ||
| 2166 | |||
| 2159 | /* | 2167 | /* | 
| 2160 | * Did we send out the client's ECDH share for use | 2168 | * Did we send out the client's ECDH share for use | 
| 2161 | * in premaster computation as part of client | 2169 | * in premaster computation as part of client | 
