Bug 55093

Summary: [PATCH] mod_fcgid 2.3.7 truncates large posts on RHEL/CentOS 5 with keepalives
Product: Apache httpd-2 Reporter: Travers Carter <tcarter>
Component: mod_fcgidAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED LATER    
Severity: normal Keywords: MassUpdate
Priority: P2    
Version: 2.2.24   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Patch to explictly apr_file_seek() after truncating the request body temp file

Description Travers Carter 2013-06-12 11:44:54 UTC
Created attachment 30428 [details]
Patch to explictly apr_file_seek() after truncating the request body temp file

mod_fcgid 2.3.7 causes silent truncation of all but the first request that is larger than MaxRequestInMem in any given keepalive when used with the default RHEL/CentOS v5 httpd (patched 2.2.3).

This is caused by the fact that when the temporary file used to spool the requst body is truncated for reuse on subsequent requests the version of apr_file_trunc() bundled with httpd 2.2.3 doesn't lseek() to the truncated position.

This is fixed in the current httpd 2.2 (2.2.24), but given the nature of the problem (silent data truncation), the number of RHEL/CentOS 5 systems still around and the fact that the fix is very straightforward I'd suggest it's worth considering working around.

The attached patch resolves the issue by explicitly calling apr_file_seek() after apr_file_trunc() which I think should have minimal performance impact even when it's not strictly required.
Comment 1 William A. Rowe Jr. 2018-11-07 21:08:14 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.