alpire opened a new pull request #176: CoyoteAdapter: fix out-of-bounds read in 
checkNormalize
URL: https://github.com/apache/tomcat/pull/176
 
 
   On malformed requests, checkNormalize would throw an 
ArrayIndexOutOfBoundsException leading to a 500 response. This change fixes 
checkNormalize to return false instead of throwing exception on those inputs, 
and adds a few tests to check the new functionality.
   
   For the record, the exception is below:
   
   ```
   java.lang.ArrayIndexOutOfBoundsException: -1
           at 
org.apache.catalina.connector.CoyoteAdapter.checkNormalize(CoyoteAdapter.java:1275)
 ~[tomcat-embed-core-9.0.19.jar!/:9.0.19]
           at 
org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:647)
 ~[tomcat-embed-core-9.0.19.jar!/:9.0.19]
           at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:337) 
~[tomcat-embed-core-9.0.19.jar!/:9.0.19]
           at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) 
~[tomcat-embed-core-9.0.19.jar!/:9.0.19]
           at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
 [tomcat-embed-core-9.0.19.jar!/:9.0.19]
           at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836)
 [tomcat-embed-core-9.0.19.jar!/:9.0.19]
           at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1747)
 [tomcat-embed-core-9.0.19.jar!/:9.0.19]
           at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
[tomcat-embed-core-9.0.19.jar!/:9.0.19]
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[na:1.8.0_212]
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[na:1.8.0_212]
           at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 [tomcat-embed-core-9.0.19.jar!/:9.0.19]
           at java.lang.Thread.run(Thread.java:748) [na:1.8.0_212]
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to