alpire commented on a change in pull request #176: CoyoteAdapter: fix 
out-of-bounds read in checkNormalize
URL: https://github.com/apache/tomcat/pull/176#discussion_r299498714
 
 

 ##########
 File path: java/org/apache/catalina/connector/CoyoteAdapter.java
 ##########
 @@ -1271,6 +1276,11 @@ public static boolean checkNormalize(MessageBytes 
uriMB) {
             }
         }
 
+        // The URL must start with '/'
+        if (c[start] != '/') {
+            return false;
+        }
+
         // Check for ending with "/." or "/.."
 
 Review comment:
   Sorry for the confusion. What I posted was the entire query, i.e. you can 
reproduce the issue with:
   ```
   $ echo -ne "\x20\x2e\x2e\x20\x30\x20\x0a" | nc localhost 8081
   HTTP/1.1 500
   Date: Tue, 02 Jul 2019 13:55:20 GMT
   Connection: close
   ```
   
   Looking more into it, you can also be reproduced with a normal looking HTTP 
query:
   ```
   $ echo -ne "GET .. HTTP/1.1\r\n\r\n" | nc localhost 8081
   ```
   

----------------------------------------------------------------
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