]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1720129, r1723295, r1733088, r1733089 from trunk:
authorJim Jagielski <jim@apache.org>
Sat, 19 Mar 2016 13:26:25 +0000 (13:26 +0000)
committerJim Jagielski <jim@apache.org>
Sat, 19 Mar 2016 13:26:25 +0000 (13:26 +0000)
* mod_ssl: Free dhparams when getting DH params. This fixes issue when
  SSLCryptoDevice does not get unregistered because of non-zero refcount
  during the mod_ssl unload happening on httpd startup.

mod_ssl: follow up to r1720129.
Free ecparams read from certificate file(s) on startup.

Follow up to r1720129 and r1723295: CHANGES entry.

Rephrase r1733088 since leaking means horrible things in cryptography.
This is not a security fix :p
Submitted by: jkaluza, ylavic, ylavic, ylavic
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1735770 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/ssl/ssl_engine_init.c

diff --git a/CHANGES b/CHANGES
index 931dbb73c45e9bb73f155fb1ddf3369776ee36bc..b2364409f42a58af3df1e86c858c87f1c2aa736c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
   *) core: Ensure that httpd exits with an error status when the MPM fails
      to run.  [Yann Ylavic]
 
+  *) mod_ssl: Fix a possible memory leak on restart for custom [EC]DH params.
+     [Jan Kaluza, Yann Ylavic]
+
   *) mod_ssl: Add SSLOCSPProxyURL to add the possibility to do all queries
      to OCSP responders through a HTTP proxy. [Ruediger Pluem]
 
diff --git a/STATUS b/STATUS
index 532f43be1debd53cad1fb31a16e6fb0b5144dd07..57047e4cefcadfd8c4ab3691591046b8272838a3 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -112,18 +112,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_ssl: Free dhparams when getting DH params. This fixes issue when
-     SSLCryptoDevice does not get unregistered because of non-zero refcount
-     during the mod_ssl unload happening on httpd startup.
-     trunk patch: http://svn.apache.org/r1720129
-                  http://svn.apache.org/r1723295
-                  http://svn.apache.org/r1733088
-                  http://svn.apache.org/r1733089
-     2.4.x patch: http://home.apache.org/~ylavic/patches/httpd-2.4.x-dh_leaks.patch
-     +1: ylavic, icing, trawick
-     rpluem says: Can we get an updated 2.4.x proposal that includes r1723295?
-     ylavic: r1723295 + CHANGES entry now included => votes reset
-
   *) mod_deflate: follow up to r1619444 (and to r1619383). (backported in r1669555)
                   Fix counting of inflated bytes in deflate_in_filter() when
                   asked to flush
index d158795e6ee742e7bdb5fa6b95e72cfd1bee56da..3704bd7230e33d133e3e49ee1909bb1d4641eff0 100644 (file)
@@ -1026,7 +1026,7 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
     X509 *cert;
     DH *dhparams;
 #ifdef HAVE_ECC
-    EC_GROUP *ecparams;
+    EC_GROUP *ecparams = NULL;
     int nid;
     EC_KEY *eckey = NULL;
 #endif
@@ -1174,6 +1174,7 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
         ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02540)
                      "Custom DH parameters (%d bits) for %s loaded from %s",
                      BN_num_bits(dhparams->p), vhost_id, certfile);
+        DH_free(dhparams);
     }
 
 #ifdef HAVE_ECC
@@ -1202,6 +1203,7 @@ static apr_status_t ssl_init_server_certs(server_rec *s,
 #endif
     }
     EC_KEY_free(eckey);
+    EC_GROUP_free(ecparams);
 #endif
 
     return APR_SUCCESS;