Bug 892806 (CVE-2013-0162)

Summary: CVE-2013-0162 rubygem-ruby_parser: incorrect temporary file usage
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: athomas, bkabrda, bkearney, bleanhar, cpelland, jeckersb, jialiu, jomara, jrusnack, junpark, katello-bugs, lmeyer, mitch, mmccune, morazi, msuchy, rmillner, security-response-team, tdawson, tkramer, vondruch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=20130121,reported=20130107,source=redhat,cvss2=2.1/AV:L/AC:L/Au:N/C:N/I:P/A:N,fedora-all/rubygem-ruby_parser=affected,epel-all/rubygem-ruby_parser=affected,openshift-1/rubygem-ruby_parser=affected,openshift-1/ruby193-rubygem-ruby_parser=affected,openshift-enterprise-1/rubygem-ruby_parser=affected,openshift-enterprise-1/ruby193-rubygem-ruby_parser=affected,sam-1/rubygem-ruby_parser=affected,cloudformscommon-1/rubygem-ruby_parser=affected,rhn_satellite_6/ruby193-rubygem-ruby_parser=affected,cwe=CWE-377
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-23 09:26:28 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 948101, 892221, 895189, 895191, 895192, 896331, 906437, 1030772    
Bug Blocks: 767033, 883745, 892809, 892883, 906653, 1028279    
Attachments:
Description Flags
CVE-2013-0162-rubygem-ruby_parser.patch none

Description Vincent Danen 2013-01-07 16:48:35 EST
Michael Scherer discovered that the ruby_parser ruby gem did not create temporary files in a safe manner.  In /usr/share/gems/gems/ruby_parser-2.0.4/lib/gauntlet_rubyparser.rb's diff_pp function it creates files as /tmp/a.[pid] and /tmp/b.[pid] which can be predicted and used for either a denial of service (file cannot be overwritten), or to change the contents of a files that are writable.

The initial report is in bug #892221.
Comment 1 Kurt Seifried 2013-01-09 01:19:29 EST
Sent email about setting a CRD.
Comment 7 Kurt Seifried 2013-01-16 11:24:35 EST
Created attachment 679696 [details]
CVE-2013-0162-rubygem-ruby_parser.patch
Comment 12 Murray McAllister 2013-02-13 03:54:08 EST
Acknowledgements:

This issue was discovered by Michael Scherer of the Red Hat Regional IT team.
Comment 15 Vincent Danen 2013-02-21 13:27:59 EST
Upstream had been notified as per comment #1 but apparently there was no response.  Upstream version 3.1.1 is still vulnerable (verified via download and on github).
Comment 16 errata-xmlrpc 2013-02-21 14:05:23 EST
This issue has been addressed in following products:

  CloudForms for RHEL 6

Via RHSA-2013:0548 https://rhn.redhat.com/errata/RHSA-2013-0548.html
Comment 17 errata-xmlrpc 2013-02-21 14:21:22 EST
This issue has been addressed in following products:

  Red Hat Subscription Asset Manager 1.2

Via RHSA-2013:0544 https://rhn.redhat.com/errata/RHSA-2013-0544.html
Comment 18 errata-xmlrpc 2013-02-28 14:08:43 EST
This issue has been addressed in following products:

  RHEL 6 Version of OpenShift Enterprise

Via RHSA-2013:0582 https://rhn.redhat.com/errata/RHSA-2013-0582.html
Comment 19 Vincent Danen 2013-04-03 22:00:40 EDT
Created rubygem-ruby_parser tracking bugs for this issue

Affects: epel-all [bug 948101]