Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499666 - <www-apache/passenger-4.0.37 : insecure use of temporary files (CVE-2014-1831)
Summary: <www-apache/passenger-4.0.37 : insecure use of temporary files (CVE-2014-1831)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Gentoo Security
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard: ~4 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-29 09:33 UTC by Agostino Sarubbo
Modified: 2015-06-17 17:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2014-01-29 09:33:41 UTC
From ${URL} :

n upstream commit [1] to the Passenger rubygem indicated that versions 4.0.5 and later are affected by a 
temporary file flaw described as follows:

"
Phusion Passenger creates a "server instance directory" in /tmp during startup,
which is a temporary directory that Phusion Passenger uses to store working files.
This directory is deleted after Phusion Passenger exits. For various technical
reasons, this directory must have a semi-predictable filename. If a local attacker
can predict this filename, and precreates a symlink with the same filename that
points to an arbitrary directory with mode 755, owner root and group root, then
the attacker will succeed in making Phusion Passenger write files and create
subdirectories inside that target directory. The following files/subdirectories
are created:

* control_process.pid
* generation-X, where X is a number.

If you happen to have a file inside the target directory called `control_process.pid`, then that file's 
contents are overwritten.

These files and directories are deleted during Phusion Passenger exit. The target
directory itself is not deleted, nor are any other contents inside the target
directory, although the symlink is.
"

It is fixed in upstream version 4.0.37.

[1] https://github.com/phusion/passenger/commit/34b1087870c2


@maintainer(s): since the fixed package is already in the tree, please let us know if it is ready for the stabilization or not.
Comment 1 Hans de Graaff gentoo-dev Security 2014-01-29 10:35:16 UTC
(In reply to Agostino Sarubbo from comment #0)

> @maintainer(s): since the fixed package is already in the tree, please let
> us know if it is ready for the stabilization or not.

This is not relevant since the currently stable 3.x versions are not affected by this bug. I also don't consider 4.0.x ready for stabilization yet given the stream of bug fixes it still sees.

Only thing left on our side is cleanup which I'll do next week once it is clear that this new release won't break things.
Comment 2 Hans de Graaff gentoo-dev Security 2014-02-13 12:56:04 UTC
(In reply to Hans de Graaff from comment #1)

> Only thing left on our side is cleanup which I'll do next week once it is
> clear that this new release won't break things.

Vulnerable versions have been cleaned up.
Comment 3 GLSAMaker/CVETool Bot gentoo-dev 2015-06-17 17:53:29 UTC
CVE-2014-1831 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-1831):
  Phusion Passenger before 4.0.37 allows local users to write to certain files
  and directories via a symlink attack on (1) control_process.pid or a (2)
  generation-* file.