From: Joe Orton Date: Thu, 15 Apr 2004 19:41:39 +0000 (+0000) Subject: * modules/ssl/ssl_engine_io.c (ssl_io_filter_cleanup): Don't try and X-Git-Tag: 2.0.50~201 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d03cd8ee7060ab2c53065e1ff0cc4e668d164c2;p=thirdparty%2Fapache%2Fhttpd.git * modules/ssl/ssl_engine_io.c (ssl_io_filter_cleanup): Don't try and send an SSL shutdown from a pool cleanup. PR: 27945 Reviewed by: Jeff Trawick, Madhusudan Mathihalli git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@103396 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 1c0d19d287a..ff933a7da53 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.50 + *) mod_ssl: Fix potential segfaults when performing SSL shutdown from + a pool cleanup. PR 27945. [Joe Orton] + *) Add forensic logging module (mod_log_forensic). [Ben Laurie] diff --git a/STATUS b/STATUS index 1ab374cad6a..a11079d9950 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2004/04/14 14:45:28 $] +Last modified at [$Date: 2004/04/15 19:41:38 $] Release: @@ -142,10 +142,6 @@ PATCHES TO BACKPORT FROM 2.1 modules/experimental/util_ldap.c: r1.22, r1.24 +1: bnicholes, minfrin - *) mod_ssl: Fix segfaults when doing shutdown from a cleanup. - http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/ssl/ssl_engine_io.c?r1=1.121&r2=1.122 - +1: jorton, trawick, madhum - *) (re-)add support for RewriteRules in containers. PR 27985 modules/mappers/mod_rewrite.c: r1.254 +1: nd, trawick diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c index 93e85460dd0..1304f7f5a4d 100644 --- a/modules/ssl/ssl_engine_io.c +++ b/modules/ssl/ssl_engine_io.c @@ -983,22 +983,20 @@ static apr_status_t ssl_filter_io_shutdown(ssl_filter_ctx_t *filter_ctx, static apr_status_t ssl_io_filter_cleanup(void *data) { - apr_status_t ret; - ssl_filter_ctx_t *filter_ctx = (ssl_filter_ctx_t *)data; - conn_rec *c; + ssl_filter_ctx_t *filter_ctx = data; - if (!filter_ctx->pssl) { - /* already been shutdown */ - return APR_SUCCESS; - } + if (filter_ctx->pssl) { + conn_rec *c = (conn_rec *)SSL_get_app_data(filter_ctx->pssl); + SSLConnRec *sslconn = myConnConfig(c); - c = (conn_rec *)SSL_get_app_data(filter_ctx->pssl); - if ((ret = ssl_filter_io_shutdown(filter_ctx, c, 0)) != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_INFO, ret, NULL, - "SSL filter error shutting down I/O"); - } + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, + "SSL connection destroyed without being closed"); - return ret; + SSL_free(filter_ctx->pssl); + sslconn->ssl = filter_ctx->pssl = NULL; + } + + return APR_SUCCESS; } /*