components/openssl/openssl-1.0.1/patches/41_uninitialized_ctx.patch
author Misaki Miyashita <Misaki.Miyashita@Oracle.COM>
Wed, 27 May 2015 16:32:47 -0700
changeset 4366 8e8f535e48a5
permissions -rw-r--r--
PSARC/2015/043 Further OpenSSL Thread and Fork Safety 19579036 proftpd child process segfaults after failed login attempt 21149030 SegFault when a cleanup callback is called before the cipher initialization

#
# This was developed in house.  Upstreadm notified (PR#277).
#
diff -ru  openssl-1.0.1m/crypto/evp/evp_enc.c openssl-1.0.1m/crypto/evp/evp_enc.c.new
--- openssl-1.0.1m/crypto/evp/evp_enc.c Thu May  7 09:46:32 2015
+++ openssl-1.0.1m/crypto/evp/evp_enc.c.new     Thu May  7 09:46:23 2015
@@ -179,6 +179,7 @@
                 EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE);
                 return 0;
             }
+            (void) memset(ctx->cipher_data, 0, ctx->cipher->ctx_size);
         } else {
             ctx->cipher_data = NULL;
         }