Bug 1266247 - [GSS](6.4.z) Http11NioProtocol + HTTPS fails to unwrap large requests even with acceptLargeFragments is true
[GSS](6.4.z) Http11NioProtocol + HTTPS fails to unwrap large requests even wi...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web (Show other bugs)
6.4.0
Unspecified Unspecified
unspecified Severity unspecified
: CR1
: EAP 6.4.5
Assigned To: baranowb
Radim Hatlapatka
:
Depends On:
Blocks: 1235745 1269109 1281401
  Show dependency treegraph
 
Reported: 2015-09-24 17:07 EDT by Robert Bost
Modified: 2017-01-17 06:43 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
reproducer war. (71.64 KB, application/zip)
2015-09-24 17:08 EDT, Robert Bost
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2427381 None None None 2016-07-06 08:56 EDT

  None (edit)
Description Robert Bost 2015-09-24 17:07:10 EDT
Description of problem: Experiencing BUFFER_OVERFLOW in JBoss when using NIO. Buffer is not expanded so request fails.


Version-Release number of selected component (if applicable): 6.4.0


How reproducible: Always, when using NIO and HTTPS.


Steps to Reproduce:
1. Use org.apache.coyote.http11.Http11NioProtocol and HTTPS
2. Make a request that has a packet size 16KB+ 
3. Check logs for "BWEB003064: Error during blocking read: java.io.IOException: JBWEB002048: Unable to unwrap data, invalid status 
BUFFER_OVERFLOW"

Actual results: Failure to process request, resulting in failed request 


Expected results: Expected request to succeed just as it would if not using NIO 


Additional info:

Issue happens even when using `-Djsse.SSLEngine.acceptLargeFragments=true`.

I'll attached the .war I used to reproduce.

16:26:50,774 DEBUG [org.apache.coyote.http11] (http-/127.0.0.1:8443-13) JBWEB003064: Error during blocking read: java.io.IOException: JBWEB002048: Unable to unwrap data, invalid status 
BUFFER_OVERFLOW
        at org.apache.tomcat.util.net.jsse.SecureNioChannel.unwrap(SecureNioChannel.java:591) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
        at org.apache.tomcat.util.net.jsse.SecureNioChannel.readBytes(SecureNioChannel.java:134) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
        at org.apache.coyote.http11.InternalNioInputBuffer.fill0(InternalNioInputBuffer.java:515) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
        at org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:469) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
        at org.apache.coyote.http11.InternalNioInputBuffer.parseRequestLine(InternalNioInputBuffer.java:316) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
        at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:290) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:911) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
        at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:936) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
        at org.apache.tomcat.util.net.NioEndpoint$DefaultThreadFactory$1$1.run(NioEndpoint.java:1249) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
Comment 1 Robert Bost 2015-09-24 17:08 EDT
Created attachment 1076723 [details]
reproducer war.
Comment 3 Robert Bost 2015-09-25 17:54:56 EDT
For what is it worth, using org.apache.coyote.http11.Http11AprProtocol, SSL, and WebSockets seems to work without issue. Issue only seems to be present in SSL related Nio code.
Comment 8 Rémy Maucherat 2015-10-02 09:22:24 EDT
r2629 in web.
Comment 11 Radim Hatlapatka 2015-11-03 08:12:12 EST
Verified with EAP 6.4.5.CP.CR1.
Comment 13 Radim Hatlapatka 2015-11-09 10:13:59 EST
*** Bug 1275403 has been marked as a duplicate of this bug. ***
Comment 14 Petr Penicka 2017-01-17 06:43:39 EST
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.
Comment 15 Petr Penicka 2017-01-17 06:43:59 EST
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

Note You need to log in before you can comment on or make changes to this bug.