[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Rich Salz rsalz at openssl.org
Tue Apr 11 16:16:28 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  6302d9373829ff37c257d93f8566f2272968d67d (commit)
      from  376dc4e06b4936ff0c9c53b8f53795d0b3774ab3 (commit)


- Log -----------------------------------------------------------------
commit 6302d9373829ff37c257d93f8566f2272968d67d
Author: Rich Salz <rsalz at openssl.org>
Date:   Tue Apr 11 12:11:34 2017 -0400

    Additional check to handle BAD SSL_write retry
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3123)

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

Summary of changes:
 ssl/record/rec_layer_s3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c
index 2f105a4..c533bbd 100644
--- a/ssl/record/rec_layer_s3.c
+++ b/ssl/record/rec_layer_s3.c
@@ -368,7 +368,8 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
      * promptly send beyond the end of the users buffer ... so we trap and
      * report the error in a way the user will notice
      */
-    if ((unsigned int)len < s->rlayer.wnum) {
+    if (((unsigned int)len < s->rlayer.wnum) 
+        || ((wb->left != 0) && ((unsigned int)len < (s->rlayer.wnum + s->rlayer.wpend_tot)))) {
         SSLerr(SSL_F_SSL3_WRITE_BYTES, SSL_R_BAD_LENGTH);
         return -1;
     }


More information about the openssl-commits mailing list