This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
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)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20111228,repor...
: 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: 2015-07-31 02:46 EDT (History)
4 users (show)

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


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:
  http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf

Note: This issue have been fixed in version 1.6.5.1 of JRuby
http://www.jruby.org/2011/12/27/jruby-1-6-5-1.html
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 1.6.5.1:

https://issues.jboss.org/browse/JBESB-3725
https://issues.jboss.org/browse/SOA-3680
Comment 8 Murray McAllister 2012-07-02 19:43:01 EDT
Acknowledgements:

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:
  https://github.com/jruby/jruby/commit/f007944b459e7c5e33b8296433d8b9d704bf02cc

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