Bug 892813 - (CVE-2013-2119) CVE-2013-2119 rubygem-passenger: incorrect temporary file usage
CVE-2013-2119 rubygem-passenger: incorrect temporary file usage
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 892227 967177 967178 968923 968930
Blocks: 892814
  Show dependency treegraph
Reported: 2013-01-07 17:05 EST by Vincent Danen
Modified: 2015-07-31 06:40 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-07 01:11:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Vincent Danen 2013-01-07 17:05:05 EST
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 03:26:28 EDT
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 15:58:56 EDT
For the 3.0 series, 0eaebb00 is not complete. You also need 56d9d39f.
Comment 5 Jan Lieskovsky 2013-05-30 05:46:38 EDT
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 05:47:52 EDT
Created rubygem-passenger tracking bugs for this issue

Affects: epel-6 [bug 968923]
Comment 7 Jan Lieskovsky 2013-05-30 06:03:00 EDT
Created rubygem-passenger tracking bugs for this issue

Affects: fedora-all [bug 968930]
Comment 8 Murray McAllister 2013-07-30 23:10:44 EDT

This issue was discovered by Michael Scherer of the Red Hat Regional IT team.
Comment 9 errata-xmlrpc 2013-08-05 11:53:39 EDT
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

Note You need to log in before you can comment on or make changes to this bug.