Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home > News > Security > Security Fixes and Improvements

December 29th, 2011, 09:17 GMT · By Eduard Kovacs

Ruby Flaw Allows Hackers to Launch DoS Attacks

SHARE:

Adjust text size:


Ruby vulnerability allows attackers to launch DOS
Enlarge picture
A serious vulnerability that could allow a cybercriminal to issue a denial-of-service (DoS) attack on Ruby was found. The attack is possible with the aid of a specially crafted series of strings that collide their hash values.

The deterministic hash function used to hash a string in the 1.8 series of Ruby, which makes sure that no other bits of information than the input string itself is involved in generating the hash value, allows for the string’s hash value to be pre-calculated beforehand.

“By collecting a series of strings that have the identical hash value, an attacker can let Ruby process collide bins of hash tables (including Hash class instances),” reads the issue’s description.

“Hash tables' amortized O(1) attribute depends on uniformity of distribution of hash values. By giving such crafted input, an attacker can let hash tables work much slower than expected (namely O(n2) to construct a n-elements table this case).”

All the versions of Ruby 1.8.7-p352 and prior are affected by the issue, but the 1.9 series are off the hook since they don’t share the same hash implementations.

A solution to this problem, one that would make it difficult for an attacker to launch a successful operation, is to scramble the string hash function by some PRNG-generated random bits. This way, a string’s hashed value is no longer deterministic.

By utilizing this method, a different number will be generated at each boot, which means that an attacker would have to create a set of strings which are robust for this kind of scrambling, a goal not easy to achieve.

Anyhow, this method is not bulletproof since the hash algorithm doesn’t become cryptographically secure. It could still be exploited by an attacker if outputs are disclosed.

This is why users are advised to make use of secure hash algorithms found in Ruby’s standard library if they’re required to disclose outputs. Also, Ruby customers are advised to upgrade to the latest version.

Other web programing languages and applications are also susceptible to a similar DoS attack. Learn how this is possible.

Ruby 1.8.7-p357 is available for download here.
FILED UNDER:
security update
Ruby
DOS

TELL US WHAT YOU THINK:

1,428 hits · Link to this article · Print article · Send to friend · Subscribe to news

MUST-READ RELATED ARTICLES:


Microsoft Releases Out-of-Band Security Bulletin for ASP.NET/IIS on All Windows Versions

Simple Machines Forum Project Releases 2.0.2 and 1.1.16 Security Patches

HP Releases Firmware Update to Prevent Unauthorized Access

Thunderbird 9 Fixes Critical Security Bug

XSS Vulnerabilities Fixed in Fork CMS 3.1.7

READER COMMENTS:



No user comments yet.
Be the first to express your opinion!
Copyright © 2001-2012 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM