| Summary: | DoS attack from similar hash values | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Greg Wilkins <gregw> |
| Component: | server | Assignee: | Jan Bartel <janb> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | david_williams, glyn.normington, gregw, jesse.mcconnell, jetty-inbox, john.arthorne, stephen.francisco, wayne.beaton |
| Version: | 7.5.2 | Keywords: | security |
| Target Milestone: | 7.5.x | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=367638 | ||
| Whiteboard: | |||
|
Description
Greg Wilkins
Andrea, Thanks for the report. Note that with Jetty, by default we limit the form content to be 8K in the URI and 200K in body content. Can you advise if the CPU usage grows linearly or greater with the size of the form? ie is a limited form size a moderate initial defence? Could you provide a list (or generator) of example keys that hash to the same value so that we may perform our own testing of impacts. We understand that such a list should not be widely distributed, but anybody with knowledge of this attack could generate such a list without much effort. Note also, that I would assume similar attacks can be mounted on HTTP headers and Cookies, although the later two are also size limited. Knowing the performance curve against size would be very good. I would also expect that many applications might also be vulnerable, specially ones that use JSON (or similar) to parse user supplied data into Maps of Maps. I would suggest that you raise this issue with the commonly supplied JSON libraries as well. Do you yet have any idea of what approach could possibly be implemented in the JVM to alleviate this? Would runtime selection of some random element to the hash algorithm be sufficient (although long running applications would be vulnerable to having the "frequency of their shields" discovered by the Klingons). We have implemented a maxFormKeys configuration (default 1000) on the ContextHandler, which reduces the number of keys that can be added to the map, and thus reduces the impact of bad keys. The testing we did shows that severe non-linear impacts only occur after approx 10000 keys. The Multipart filter has been similarly updated. The jetty-8 servlet 3.0 multipart handling needs to be updated *** Bug 367733 has been marked as a duplicate of this bug. *** Fixed for jetty-7.6.0.RC4 and jetty-8.1.0.RC4. I don't see the difference between this bug and bug 367638. Are you talking about the same fix in both cases (maxFormKeys)? Also, is there any workaround we can do on the Equinox side for Indigo stream where we are using an old Jetty 6? Or would you need to expose the same configurable property (and default upper bound) there first? Is it time to turn off the "committer-only" flag? (In reply to comment #8) > Is it time to turn off the "committer-only" flag? Ping? why does the same bug have so many instances...I cleared that flag on the other one a while back, didn't realize this one was here. |