Fix double-free in TLS server name extensions which could lead to a remote
authorMark J. Cox <mark@openssl.org>
Wed, 28 May 2008 07:26:33 +0000 (07:26 +0000)
committerMark J. Cox <mark@openssl.org>
Wed, 28 May 2008 07:26:33 +0000 (07:26 +0000)
crash found by Codenomicon TLS test suite (CVE-2008-0891)

Reviewed by: openssl-security@openssl.org

Obtained from: jorton@redhat.com

CHANGES
ssl/t1_lib.c

diff --git a/CHANGES b/CHANGES
index 9c4559fa5aa30f11d5e2c47d84e63f8196333248..9d4d7ee16c42a0d9d83396d68af6c0c0744f1d5c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,10 @@
 
  Changes between 0.9.8g and 0.9.8h  [xx XXX xxxx]
 
+  *) Fix double free in TLS server name extensions which could lead to
+     a remote crash found by Codenomicon TLS test suite (CVE-2008-0891) 
+     [Joe Orton]
+
   *) Clear error queue in SSL_CTX_use_certificate_chain_file()
 
      Clear the error queue to ensure that error entries left from
index 93a4caa48e0afeb88f66177170fd50997de720ec..35f04afa4a72dc5ffc152b57adb7371ace33cfe3 100644 (file)
@@ -381,6 +381,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in
                                                s->session->tlsext_hostname[len]='\0';
                                                if (strlen(s->session->tlsext_hostname) != len) {
                                                        OPENSSL_free(s->session->tlsext_hostname);
+                                                       s->session->tlsext_hostname = NULL;
                                                        *al = TLS1_AD_UNRECOGNIZED_NAME;
                                                        return 0;
                                                }