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

Rich Salz rsalz at openssl.org
Fri Mar 10 20:58:01 UTC 2017


The branch OpenSSL_1_0_2-stable has been updated
       via  5e90cb5404c2b6127520f5bda9ada5fa1560038d (commit)
      from  acdf0814234c8a20bcbdab7f1cf0b4d452adb415 (commit)


- Log -----------------------------------------------------------------
commit 5e90cb5404c2b6127520f5bda9ada5fa1560038d
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Fri Mar 10 15:10:41 2017 +0100

    Avoid questionable use of the value of a pointer
    
    that refers to space
    deallocated by a call to the free function in tls_decrypt_ticket.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2897)
    (cherry picked from commit 13ed1afa923f4ffb553e389de08f26e9ce84e8a2)

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

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

diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index acef270..6587e8b 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -3577,10 +3577,11 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick,
     p = sdec;
 
     sess = d2i_SSL_SESSION(NULL, &p, slen);
+    slen -= p - sdec;
     OPENSSL_free(sdec);
     if (sess) {
         /* Some additional consistency checks */
-        if (p != sdec + slen || sess->session_id_length != 0) {
+        if (slen != 0 || sess->session_id_length != 0) {
             SSL_SESSION_free(sess);
             return 2;
         }


More information about the openssl-commits mailing list