Bug 863484 (CVE-2012-4481)

Summary: CVE-2012-4481 ruby: Incomplete fix for CVE-2011-1005 for NameError#to_s method when used on objects
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bkabrda, isenfeld, mfisher, mmorsi, mtasaka, tagoh, tkramer, vanmeeuwen+fedora, vondruch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=20121005,reported=20121005,source=redhat,cvss2=4.3/AV:N/AC:M/Au:N/C:N/I:P/A:N,rhel-5/ruby=affected,rhel-6/ruby=affected,fedora-all/ruby=notaffected,openshift-1/ruby=affected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-07 00:30:11 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 867750, 915379, 915380    
Bug Blocks: 816611, 862631    

Description Jan Lieskovsky 2012-10-05 11:04:36 EDT
Originally, Common Vulnerabilities and Exposures assigned an identifier of CVE-2011-1005 to the following vulnerability:

The safe-level feature in Ruby 1.8.6 through 1.8.6-420, 1.8.7 through 1.8.7-330, and 1.8.8dev allows context-dependent attackers to modify strings via the Exception#to_s method, as demonstrated by changing an intended pathname.

with the following upstream patch:
[1] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=30903&view=revision

Based on later upstream patch for different (CVE-2012-4464 and CVE-2012-4466) issues:
[2] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37068

it was found that original upstream 1.8.x ruby patch for CVE-2011-1005 issue was not complete, when the NameError#to_s() method was used on / with Ruby objects (the test logic in 'test_to_s_taintness_propagation' test from [1] was actually reversed, so the test returned success also on still vulnerable instances).

Acknowledgements:

This issue was discovered by Vit Ondruch of Red Hat.
Comment 1 Jan Lieskovsky 2012-10-05 11:13:02 EDT
This issue affects the versions of the ruby package, as shipped with Red Hat Enterprise Linux 5 and 6.

--

This issue did NOT affect the versions of the ruby package, as shipped with Fedora release of 16 (got updated already) and Fedora release of 17 (upstream ruby 1.9.x version was not affected by this).
Comment 3 Jan Lieskovsky 2012-10-05 11:27:23 EDT
CVE Request:
http://www.openwall.com/lists/oss-security/2012/10/05/2
Comment 8 errata-xmlrpc 2013-01-08 00:07:34 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2013:0129 https://rhn.redhat.com/errata/RHSA-2013-0129.html
Comment 12 errata-xmlrpc 2013-03-07 13:58:59 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2013:0612 https://rhn.redhat.com/errata/RHSA-2013-0612.html
Comment 13 Vincent Danen 2013-03-07 14:15:52 EST
Statement:

(none)