Bug 770820 - (CVE-2011-4838) CVE-2011-4838 jruby: hash table collisions DoS (oCERT-2011-003)
CVE-2011-4838 jruby: hash table collisions DoS (oCERT-2011-003)
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 770821 771530 771536
Blocks: hashdos/oCERT-2011-003 770822
  Show dependency treegraph
Reported: 2011-12-29 05:44 EST by Huzaifa S. Sidhpurwala
Modified: 2018-04-13 18:24 EDT (History)
3 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description Huzaifa S. Sidhpurwala 2011-12-29 05:44:45 EST
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:

Note: This issue have been fixed in version of JRuby
Comment 2 Huzaifa S. Sidhpurwala 2011-12-29 05:48:22 EST
Created jruby tracking bugs for this issue

Affects: fedora-16 [bug 770821]
Comment 4 David Jorm 2012-01-02 21:00:39 EST
JBoss Enterprise SOA Platform 5.2.0 ships JRuby 1.6.5 as part of the scripting_chain quickstart sample application. JRuby 1.6.5 exposes this flaw, although the sample application itself does not appear to expose the flaw. If the version of JRuby shipped with the scripting_chain sample application was used to build a custom application, then this flaw could be exposed. Bugs have been filed to update the sample application to use JRuby

Comment 8 Murray McAllister 2012-07-02 19:43:01 EDT

Red Hat would like to thank oCERT for reporting this issue. oCERT acknowledges Julian Wälde and Alexander Klink as the original reporters.
Comment 9 errata-xmlrpc 2012-07-31 10:33:40 EDT
This issue has been addressed in following products:

  JBoss Enterprise SOA Platform 5.3.0

Via RHSA-2012:1125 https://rhn.redhat.com/errata/RHSA-2012-1125.html
Comment 10 Jan Lieskovsky 2012-11-12 06:24:44 EST
Relevant upstream patch:

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