From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Apr 28 10:50:17 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B283316A401 for ; Fri, 28 Apr 2006 10:50:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 271B043D49 for ; Fri, 28 Apr 2006 10:50:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k3SAoGUH039864 for ; Fri, 28 Apr 2006 10:50:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k3SAoGae039862; Fri, 28 Apr 2006 10:50:16 GMT (envelope-from gnats) Resent-Date: Fri, 28 Apr 2006 10:50:16 GMT Resent-Message-Id: <200604281050.k3SAoGae039862@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Fredrik Lindberg" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79E6C16A403 for ; Fri, 28 Apr 2006 10:44:27 +0000 (UTC) (envelope-from fli@shapeshifter.se) Received: from mx1.h3q.net (manticore.shapeshifter.se [212.37.5.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D29A43D55 for ; Fri, 28 Apr 2006 10:44:25 +0000 (GMT) (envelope-from fli@shapeshifter.se) Received: from localhost (localhost [127.0.0.1]) by mx1.h3q.net (Postfix) with ESMTP id 9CD2F1A770 for ; Fri, 28 Apr 2006 12:44:21 +0200 (CEST) Received: from mx1.h3q.net ([127.0.0.1]) by localhost (mx1.h3q.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 23008-02 for ; Fri, 28 Apr 2006 12:44:19 +0200 (CEST) Received: from shapeshifter.se (sto-nat.se.tangram-group.net [212.37.5.19]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.h3q.net (Postfix) with ESMTP id B211D1A723 for ; Fri, 28 Apr 2006 12:44:19 +0200 (CEST) Received: by shapeshifter.se (sSMTP sendmail emulation); Fri, 28 Apr 2006 12:44:23 +0200 Message-Id: <20060428104419.B211D1A723@mx1.h3q.net> Date: Fri, 28 Apr 2006 12:44:23 +0200 From: "Fredrik Lindberg" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/96458: Update port: www/apache20 Patch for mod_proxy dataloss (AFS Bug 37145) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 10:50:17 -0000 >Number: 96458 >Category: ports >Synopsis: Update port: www/apache20 Patch for mod_proxy dataloss (AFS Bug 37145) >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Apr 28 10:50:16 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Fredrik Lindberg >Release: FreeBSD 7.0-CURRENT i386 >Organization: >Environment: System: FreeBSD genesis.int.shapeshifter.se 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sat Apr 22 13:39:02 CEST 2006 fli@dhcp-192-168-0-94:/usr/obj/usr/src/sys/GENESIS i386 >Description: Dataloss in POST requests occurs with mod_proxy when used together with mod_ssl on a front-end server. This is a temporary patch until 2.0.56 is released. Patch obtained from http://issues.apache.org/bugzilla/show_bug.cgi?id=37145 >How-To-Repeat: >Fix: --- apache20-proxy.patch begins here --- diff -ruN apache20.orig/Makefile apache20/Makefile --- apache20.orig/Makefile Fri Apr 28 12:15:46 2006 +++ apache20/Makefile Fri Apr 28 12:18:17 2006 @@ -9,7 +9,7 @@ PORTNAME= apache PORTVERSION= 2.0.55 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \ ${MASTER_SITE_LOCAL:S/$/:powerlogo/} diff -ruN apache20.orig/files/patch-modules:proxy:proxy_http.c apache20/files/patch-modules:proxy:proxy_http.c --- apache20.orig/files/patch-modules:proxy:proxy_http.c Thu Jan 1 01:00:00 1970 +++ apache20/files/patch-modules:proxy:proxy_http.c Fri Apr 28 12:00:36 2006 @@ -0,0 +1,102 @@ +Index: modules/proxy/proxy_http.c +=================================================================== +--- modules/proxy/proxy_http.c (Revision 326480) ++++ modules/proxy/proxy_http.c (Arbeitskopie) +@@ -504,7 +504,21 @@ + * take care of that now + */ + bb = header_brigade; +- APR_BRIGADE_CONCAT(bb, input_brigade); ++ ++ /* ++ * Save input_brigade in bb brigade. (At least) in the SSL case ++ * input_brigade contains transient buckets whose data would get ++ * overwritten during the next call of ap_get_brigade in the loop. ++ * ap_save_brigade ensures these buckets to be set aside. ++ * Calling ap_save_brigade with NULL as filter is OK, because ++ * bb brigade already has been created and does not need to get ++ * created by ap_save_brigade. ++ */ ++ status = ap_save_brigade(NULL, &bb, &input_brigade, p); ++ if (status != APR_SUCCESS) { ++ return status; ++ } ++ + header_brigade = NULL; + } + else { +@@ -611,7 +625,21 @@ + * take care of that now + */ + bb = header_brigade; +- APR_BRIGADE_CONCAT(bb, input_brigade); ++ ++ /* ++ * Save input_brigade in bb brigade. (At least) in the SSL case ++ * input_brigade contains transient buckets whose data would get ++ * overwritten during the next call of ap_get_brigade in the loop. ++ * ap_save_brigade ensures these buckets to be set aside. ++ * Calling ap_save_brigade with NULL as filter is OK, because ++ * bb brigade already has been created and does not need to get ++ * created by ap_save_brigade. ++ */ ++ status = ap_save_brigade(NULL, &bb, &input_brigade, p); ++ if (status != APR_SUCCESS) { ++ return status; ++ } ++ + header_brigade = NULL; + } + else { +@@ -735,7 +763,21 @@ + apr_brigade_cleanup(input_brigade); + } + else { +- APR_BRIGADE_CONCAT(body_brigade, input_brigade); ++ ++ /* ++ * Save input_brigade in body_brigade. (At least) in the SSL case ++ * input_brigade contains transient buckets whose data would get ++ * overwritten during the next call of ap_get_brigade in the loop. ++ * ap_save_brigade ensures these buckets to be set aside. ++ * Calling ap_save_brigade with NULL as filter is OK, because ++ * body_brigade already has been created and does not need to get ++ * created by ap_save_brigade. ++ */ ++ status = ap_save_brigade(NULL, &body_brigade, &input_brigade, p); ++ if (status != APR_SUCCESS) { ++ return status; ++ } ++ + } + + bytes_spooled += bytes; +@@ -1081,9 +1123,27 @@ + } + + apr_brigade_length(temp_brigade, 1, &bytes); +- APR_BRIGADE_CONCAT(input_brigade, temp_brigade); + bytes_read += bytes; + ++ /* ++ * Save temp_brigade in input_brigade. (At least) in the SSL case ++ * temp_brigade contains transient buckets whose data would get ++ * overwritten during the next call of ap_get_brigade in the loop. ++ * ap_save_brigade ensures these buckets to be set aside. ++ * Calling ap_save_brigade with NULL as filter is OK, because ++ * input_brigade already has been created and does not need to get ++ * created by ap_save_brigade. ++ */ ++ status = ap_save_brigade(NULL, &input_brigade, &temp_brigade, p); ++ if (status != APR_SUCCESS) { ++ ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server, ++ "proxy: processing prefetched request body failed" ++ " to %s from %s (%s)", ++ p_conn->name ? p_conn->name: "", ++ c->remote_ip, c->remote_host ? c->remote_host: ""); ++ return status; ++ } ++ + /* Ensure we don't hit a wall where we have a buffer too small + * for ap_get_brigade's filters to fetch us another bucket, + * surrender once we hit 80 bytes less than MAX_MEM_SPOOL --- apache20-proxy.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: