First published: Thu Dec 29 2011(Updated: )
Julian Wälde and Alexander Klink reported a flaw in the hash function used in the implementation of the JRuby arrays implemented using the hash table. A specially-crafted set of keys could trigger hash function collisions, which degrade hash table performance by changing hash table operations complexity from an expected/average O(1) to the worst case O(n). Reporters were able to find colliding strings efficiently using equivalent substrings or meet in the middle techniques. As various web application frameworks for Ruby automatically pre-fill certain arrays with data from the HTTP request (such as GET or POST parameters) for Ruby web applications, a remote attacker could use this flaw to make the Ruby interpreter use an excessive amount of CPU time by sending a POST request with a large number parameters which hash to the same value. This problem is similar to the issue that was previously reported for and fixed in e.g. perl: <a href="http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf">http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf</a> Note: This issue have been fixed in version 1.6.5.1 of JRuby <a href="http://www.jruby.org/2011/12/27/jruby-1-6-5-1.html">http://www.jruby.org/2011/12/27/jruby-1-6-5-1.html</a>
Affected Software | Affected Version | How to fix |
---|---|---|
Rubygems | <1.6.5.1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of REDHAT-BUG-770820 is categorized as moderate due to the potential for performance degradation.
To fix REDHAT-BUG-770820, upgrade JRuby to a version newer than 1.6.5.1.
The effects of REDHAT-BUG-770820 on JRuby applications include potential hash function collisions which can lead to increased latency in hash table operations.
Versions of JRuby prior to 1.6.5.1 are affected by REDHAT-BUG-770820.
The vulnerability REDHAT-BUG-770820 was reported by Julian Wälde and Alexander Klink.