CWE
189
Advisory Published
CVE Published
Updated

CVE-2011-0188

First published: Fri Mar 04 2011(Updated: )

Drew Yao of Apple Product Security reported a flaw in how Ruby's BigDecimal implementation. In a 64-bit program, if the amount of memory to allocate is greater than 2^32, the allocated amount will be truncated to a 32-bit unsigned integer, however the amount to memset will use the full 64-bit number, leading to a crash or memory corruption. After the memset, the unexpectedly small buffer could be used in other ways that lead to memory corruption or, possibly, code execution. This flaw only affects 64-bit processes. To test whether or not ruby is vulnerable, the following can be used (on a vulnerable ruby it will cause a segfault): $ ruby -e 'require "bigdecimal"; BigDecimal.new("8").**(0x20000000)' Upstream committed the following to fix the flaw: <a href="http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/bigdecimal/bigdecimal.c?r1=29364&amp;r2=30993">http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/bigdecimal/bigdecimal.c?r1=29364&amp;r2=30993</a>

Credit: product-security@apple.com

Affected SoftwareAffected VersionHow to fix
Ruby-lang Ruby<=1.9.2-p136
Ruby-lang Ruby=1.9
Ruby-lang Ruby=1.9-r18423
Ruby-lang Ruby=1.9.0
Ruby-lang Ruby=1.9.0-r18423
Ruby-lang Ruby=1.9.0-0
Ruby-lang Ruby=1.9.0-1
Ruby-lang Ruby=1.9.0-2
Ruby-lang Ruby=1.9.0-20060415
Ruby-lang Ruby=1.9.0-20070709
Ruby-lang Ruby=1.9.1
Ruby-lang Ruby=1.9.1--p0
Ruby-lang Ruby=1.9.1--p129
Ruby-lang Ruby=1.9.1--p243
Ruby-lang Ruby=1.9.1--p376
Ruby-lang Ruby=1.9.1--p429
Ruby-lang Ruby=1.9.1--preview_1
Ruby-lang Ruby=1.9.1--preview_2
Ruby-lang Ruby=1.9.1--rc1
Ruby-lang Ruby=1.9.1--rc2
Ruby-lang Ruby=1.9.2
Ruby-lang Ruby=1.9.2-dev
Apple Mac OS X=10.5.8
Apple Mac OS X=10.6.0
Apple Mac OS X=10.6.1
Apple Mac OS X=10.6.2
Apple Mac OS X=10.6.3
Apple Mac OS X=10.6.4
Apple Mac OS X=10.6.5
Apple Mac OS X=10.6.6
Apple Mac OS X Server=10.5.8
Apple Mac OS X Server=10.6.0
Apple Mac OS X Server=10.6.1
Apple Mac OS X Server=10.6.2
Apple Mac OS X Server=10.6.3
Apple Mac OS X Server=10.6.4
Apple Mac OS X Server=10.6.5
Apple Mac OS X Server=10.6.6

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203