summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2017-06-14 20:25:52 +0200
committerBernd Edlinger <bernd.edlinger@hotmail.de>2017-07-03 16:34:33 +0200
commitb43c37658600300de485100185eebec8bfa3dbcf (patch)
tree62c13fe35ffbba7f0ac59ffc957ce3391b3b563c /ssl
parentc31ad0bbf8415a691dd833b29e5be66f7c4aba42 (diff)
Fix potential crash in tls_construct_finished.
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3667)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/statem/statem_lib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c
index 5cd17f2836..933f18ecbb 100644
--- a/ssl/statem/statem_lib.c
+++ b/ssl/statem/statem_lib.c
@@ -501,7 +501,12 @@ int tls_construct_finished(SSL *s, WPACKET *pkt)
&& (!s->method->ssl3_enc->change_cipher_state(s,
SSL3_CC_HANDSHAKE | SSL3_CHANGE_CIPHER_CLIENT_WRITE))) {
SSLerr(SSL_F_TLS_CONSTRUCT_FINISHED, SSL_R_CANNOT_CHANGE_CIPHER);
- goto err;
+ /*
+ * This is a fatal error, which leaves
+ * enc_write_ctx in an inconsistent state
+ * and thus ssl3_send_alert may crash.
+ */
+ return 0;
}
if (s->server) {