File apache2-CVE-2017-3169.patch of Package apache2.10086
Index: httpd-2.4.16/modules/ssl/ssl_engine_io.c
===================================================================
--- httpd-2.4.16.orig/modules/ssl/ssl_engine_io.c 2017-08-16 14:42:31.750415361 +0200
+++ httpd-2.4.16/modules/ssl/ssl_engine_io.c 2017-08-16 14:43:32.647574810 +0200
@@ -845,19 +845,20 @@ static apr_status_t ssl_filter_write(ap_
* establish an outgoing SSL connection. */
#define MODSSL_ERROR_BAD_GATEWAY (APR_OS_START_USERERR + 1)
-static void ssl_io_filter_disable(SSLConnRec *sslconn, ap_filter_t *f)
+static void ssl_io_filter_disable(SSLConnRec *sslconn,
+ bio_filter_in_ctx_t *inctx)
{
- bio_filter_in_ctx_t *inctx = f->ctx;
SSL_free(inctx->ssl);
sslconn->ssl = NULL;
inctx->ssl = NULL;
inctx->filter_ctx->pssl = NULL;
}
-static apr_status_t ssl_io_filter_error(ap_filter_t *f,
+static apr_status_t ssl_io_filter_error(bio_filter_in_ctx_t *inctx,
apr_bucket_brigade *bb,
apr_status_t status)
{
+ ap_filter_t *f = inctx->f;
SSLConnRec *sslconn = myConnConfig(f->c);
apr_bucket *bucket;
int send_eos = 1;
@@ -871,7 +872,7 @@ static apr_status_t ssl_io_filter_error(
ssl_log_ssl_error(SSLLOG_MARK, APLOG_INFO, sslconn->server);
sslconn->non_ssl_request = NON_SSL_SEND_HDR_SEP;
- ssl_io_filter_disable(sslconn, f);
+ ssl_io_filter_disable(sslconn, inctx);
/* fake the request line */
bucket = HTTP_ON_HTTPS_PORT_BUCKET(f->c->bucket_alloc);
@@ -1348,7 +1349,7 @@ static apr_status_t ssl_io_filter_input(
* rather than have SSLEngine On configured.
*/
if ((status = ssl_io_filter_handshake(inctx->filter_ctx)) != APR_SUCCESS) {
- return ssl_io_filter_error(f, bb, status);
+ return ssl_io_filter_error(inctx, bb, status);
}
if (is_init) {
@@ -1402,7 +1403,7 @@ static apr_status_t ssl_io_filter_input(
/* Handle custom errors. */
if (status != APR_SUCCESS) {
- return ssl_io_filter_error(f, bb, status);
+ return ssl_io_filter_error(inctx, bb, status);
}
/* Create a transient bucket out of the decrypted data. */
@@ -1588,7 +1589,7 @@ static apr_status_t ssl_io_filter_output
inctx->block = APR_BLOCK_READ;
if ((status = ssl_io_filter_handshake(filter_ctx)) != APR_SUCCESS) {
- return ssl_io_filter_error(f, bb, status);
+ return ssl_io_filter_error(inctx, bb, status);
}
while (!APR_BRIGADE_EMPTY(bb)) {