[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Tue Nov 7 14:10:11 UTC 2017


The branch OpenSSL_1_0_2-stable has been updated
       via  565a53f35cb7a40b4e551f5c63672020eb4809c8 (commit)
      from  d88c136822d9020868b854e1614b9df5b8c43714 (commit)


- Log -----------------------------------------------------------------
commit 565a53f35cb7a40b4e551f5c63672020eb4809c8
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Mon Nov 6 11:27:41 2017 +0100

    Fix error handling in heartbeat processing
    
    Fixes: #4590
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/4681)

-----------------------------------------------------------------------

Summary of changes:
 ssl/s3_pkt.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c
index 04212c5..b914568 100644
--- a/ssl/s3_pkt.c
+++ b/ssl/s3_pkt.c
@@ -1324,10 +1324,16 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
         }
 #ifndef OPENSSL_NO_HEARTBEATS
         else if (rr->type == TLS1_RT_HEARTBEAT) {
-            tls1_process_heartbeat(s);
+            i = tls1_process_heartbeat(s);
+
+            if (i < 0)
+                return i;
 
-            /* Exit and notify application to read again */
             rr->length = 0;
+            if (s->mode & SSL_MODE_AUTO_RETRY)
+                goto start;
+
+            /* Exit and notify application to read again */
             s->rwstate = SSL_READING;
             BIO_clear_retry_flags(SSL_get_rbio(s));
             BIO_set_retry_read(SSL_get_rbio(s));


More information about the openssl-commits mailing list