Fix Kerberos issue in ssl_session_dup
authorMatt Caswell <matt@openssl.org>
Wed, 10 Jun 2015 08:32:34 +0000 (09:32 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 10 Jun 2015 09:03:42 +0000 (10:03 +0100)
The fix for CVE-2015-1791 introduced an error in ssl_session_dup for
Kerberos.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit dcad51bc13c9b716d9a66248bcc4038c071ff158)

ssl/ssl_sess.c

index 98b9107b5af0b7aa08d0552c48199e97624b4fc9..1fb682a9b3e0b3137f9ef51bdb063ea545a11fd6 100644 (file)
@@ -239,7 +239,7 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
     memcpy(dest, src, sizeof(*dest));
 
 #ifndef OPENSSL_NO_KRB5
-    dest->krb5_client_princ_len = dest->krb5_client_princ_len;
+    dest->krb5_client_princ_len = src->krb5_client_princ_len;
     if (src->krb5_client_princ_len > 0)
         memcpy(dest->krb5_client_princ, src->krb5_client_princ,
                src->krb5_client_princ_len);