Bug 892813 (CVE-2013-2119)

Summary: CVE-2013-2119 rubygem-passenger: 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: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bleanhar, brett.lentz, ccoleman, dmcphers, honglilai, jialiu, jlieskov, jrusnack, lmeyer, rmillner, security-response-team, tdawson, tkramer, vanmeeuwen+fedora
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-07 05:11:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 892227, 967177, 967178, 968923, 968930    
Bug Blocks: 892814    

Description Vincent Danen 2013-01-07 22:05:05 UTC
Michael Scherer reported that the passenger ruby gem, when used in standalone mode, does not use temporary files in a secure manner.  In the lib/phusion_passenger/standalone/main.rb's create_nginx_controller function, passenger creates an nginx configuration file insecurely and starts nginx with that configuration file:

       @temp_dir        = "/tmp/passenger-standalone.#{$$}"
       @config_filename = "#{@temp_dir}/config"

If a local attacker were able to create a temporary directory that passenger uses and supply a custom nginx configuration file they could start an nginx instance with their own configuration file.  This could result in a denial of service condition for a legitimate service or, if passenger were executed as root (in order to have nginx listen on port 80, for instance), this could lead to a local root compromise.

Comment 1 Kurt Seifried 2013-05-25 07:26:28 UTC
I have confirmed this is present in the passenger rubygem 4.0.3 (released May 24, 2013) as well 3.0.17 (the version Fedora 18 ships).

Comment 4 Hongli Lai 2013-05-29 19:58:56 UTC
For the 3.0 series, 0eaebb00 is not complete. You also need 56d9d39f.

Comment 5 Jan Lieskovsky 2013-05-30 09:46:38 UTC
This issue affects the versions of the rubygem-passenger package, as shipped with Fedora release of 17, 18, and Fedora EPEL-6. Please schedule an update.

Comment 6 Jan Lieskovsky 2013-05-30 09:47:52 UTC
Created rubygem-passenger tracking bugs for this issue

Affects: epel-6 [bug 968923]

Comment 7 Jan Lieskovsky 2013-05-30 10:03:00 UTC
Created rubygem-passenger tracking bugs for this issue

Affects: fedora-all [bug 968930]

Comment 8 Murray McAllister 2013-07-31 03:10:44 UTC
Acknowledgements:

This issue was discovered by Michael Scherer of the Red Hat Regional IT team.

Comment 9 errata-xmlrpc 2013-08-05 15:53:39 UTC
This issue has been addressed in following products:

  RHEL 6 Version of OpenShift Enterprise 1.2

Via RHSA-2013:1136 https://rhn.redhat.com/errata/RHSA-2013-1136.html