Author: markt
Date: Thu Jun 21 11:16:44 2012
New Revision: 1352495
URL: http://svn.apache.org/viewvc?rev=1352495&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53119
Prevent buffer overflow errors being reported when a client disconnects before
the response has been fully written from an AJP connection using the APR/native
connector.
(Make sure the buffer is cleared on write error to prevent possible overflow if
it is written to again before the connection is closed).
Modified:
tomcat/tc6.0.x/trunk/STATUS.txt
tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1352495&r1=1352494&r2=1352495&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Jun 21 11:16:44 2012
@@ -142,17 +142,6 @@ PATCHES PROPOSED TO BACKPORT:
+1: kkolinko
-1:
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53119
- Prevent buffer overflow errors being reported when a
- client disconnects before the response has been fully written from an
- AJP connection using the APR/native connector.
- (Make sure the buffer is cleared on write error to prevent possible
- overflow if it is written to again before the connection is closed).
- https://issues.apache.org/bugzilla/attachment.cgi?id=28890
- It is backport of r1344253
- +1: kkolinko, schultz, markt
- -1:
-
* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52850
Extend memory leak prevention and detection code to
work with IBM as well as Oracle JVMs. Based on patch provided by Rohit
Kelapure.
Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1352495&r1=1352494&r2=1352495&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Thu
Jun 21 11:16:44 2012
@@ -1258,6 +1258,9 @@ public class AjpAprProcessor implements
throws IOException {
if (outputBuffer.position() > 0) {
if ((socket != 0) && Socket.sendbb(socket, 0,
outputBuffer.position()) < 0) {
+ // There are no re-tries so clear the buffer to prevent a
+ // possible overflow if the buffer is used again. BZ53119.
+ outputBuffer.clear();
throw new IOException(sm.getString("ajpprocessor.failedsend"));
}
outputBuffer.clear();
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1352495&r1=1352494&r2=1352495&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Thu Jun 21 11:16:44 2012
@@ -149,6 +149,11 @@
<bug>52606</bug>: Ensure replayed POST bodies are available when using
AJP. (markt)
</fix>
+ <fix>
+ <bug>53119</bug>: Prevent buffer overflow errors being reported when a
+ client disconnects before the response has been fully written from an
+ AJP connection using the APR/native connector. (kkolinko)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]