Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 514476 (CVE-2014-3250) - <dev-ruby/facter-1.7.6: Arbitrary Code Execution with Required Social Engineering (CVE-2014-{3248,3250})
Summary: <dev-ruby/facter-1.7.6: Arbitrary Code Execution with Required Social Enginee...
Status: RESOLVED FIXED
Alias: CVE-2014-3250
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Gentoo Security
URL:
Whiteboard: B2 [glsa]
Keywords:
Depends on:
Blocks: 513322
  Show dependency tree
 
Reported: 2014-06-22 18:56 UTC by Matthew Thode ( prometheanfire )
Modified: 2014-12-26 19:35 UTC (History)
0 users

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 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-06-22 18:56:02 UTC
Puppet Labs has become aware of security vulnerabilities in Puppet,
Mcollective, Facter, and Hiera. We are working with distribution
maintainers and key customers to ensure we are able to patch the
vulnerabilities before any are exploited.

The vulnerabilities in this email have not been publicly disclosed.
They were reported to us externally.

We appreciate your consideration to the sensitivity of this
information, and respectfully ask that you refrain from publicly
disclosing the contents of this email until our planned disclosure
date, Thursday, May 29, 2014, at 18:00 UTC. On this date we plan to
release updated packages along with a public disclosure.

***** Vulnerability Summary *****
CVE Identifier: CVE-2014-3248
Arbitrary Code Execution with Required Social Engineering

On a host on which Puppet, Mcollective, Facter, or Hiera runs on Ruby
< 1.9.2, an unprivileged user can create either a valid ruby file in a
directory mirroring the internal directory structure of the
application or a file called 'rubygems.rb' in a world-writeable
location (e.g. /tmp), convince someone with admin privileges to `cd`
into that directory and run the application, and the application will
load and execute the contents of that ruby file with privileges of the
admin user.

This is due to the fact that Ruby versions < 1.9.2 append the current
working directory to the load path of an application, and these
applications do not perform load path sanitation to remove it. Only
users running Ruby < 1.9.2 are affected. Later versions of Ruby do not
append the load path with the current working directory.

Attached are patches based on Puppet 3.6.1, Facter 2.0.1, Hiera 1.3.3,
and Mcollective 2.5.1. The fix included is to remove the current
working directory from the load path in the executables included with
each application. This should hopefully be relatively easy to apply to
other versions of these software. The Puppet patch also applies
cleanly to 2.7.25.

Note that these patches do not do modify behavior at the library
level, which means that 3rd-party executables which load these
applications as libraries would still be exposed. The reasoning is
that any such executables are already exposed before they require
Puppet Labs libraries, and removing directories from the global
LOAD_PATH may have unintended consequences for 3rd-party applications
(e.g. maybe they've added "." to the LOAD_PATH explicitly).

We have assigned this vulnerability CVSSv2 score 5.9, with vector
AV:L/AC:M/Au:S/C:C/I:C/A:C/E:POC/RL:U/RC:C.

Affected software versions:
Puppet (all)
Facter 1.6.x and 2.x (1.7.x not affected)
Hiera (all)
Mcollective (all)
Puppet Enterprise 2.8.x (3.x not affected)

Resolved in pending releases:
Puppet 2.7.26* and 3.6.2
Facter 2.0.2 and 1.7.6
Hiera 1.3.4
Mcollective 2.5.2
Puppet Enterprise 2.8.7

Reproducible: Always
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-06-22 19:01:36 UTC
the 1.7 series WAS vunlerable (initial CVE said they were not)

Arches, please rapid stablize for the following

=dev-ruby/facter-1.7.6 amd64 hppa ppc sparc x86
Comment 2 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-06-22 23:47:54 UTC
looks like ppc64 is needed for bug 513322 as well
Comment 3 Myckel Habets 2014-06-29 12:21:49 UTC
Builds fine on x86. Please mark stable for x86.
Comment 4 Agostino Sarubbo gentoo-dev 2014-07-05 12:59:19 UTC
amd64 stable
Comment 5 Agostino Sarubbo gentoo-dev 2014-07-05 12:59:26 UTC
x86 stable
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-07-30 05:31:51 UTC
how goes the stablereq?
Comment 7 Agostino Sarubbo gentoo-dev 2014-08-09 09:42:52 UTC
ppc stable
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-09 10:09:17 UTC
Stable for HPPA.
Comment 9 Agostino Sarubbo gentoo-dev 2014-08-09 10:49:04 UTC
ppc64 stable
Comment 10 Raúl Porcel (RETIRED) gentoo-dev 2014-08-13 17:37:09 UTC
sparc stable
Comment 11 Yury German Gentoo Infrastructure gentoo-dev 2014-08-16 21:34:49 UTC
Arches, Thank you for your work
Maintainer(s), please drop the vulnerable version(s).

New GLSA Request filed.
Comment 12 Hans de Graaff gentoo-dev Security 2014-12-26 09:45:04 UTC
Vulnerable version has been removed.
Comment 13 Yury German Gentoo Infrastructure gentoo-dev 2014-12-26 19:35:06 UTC
Maintainer(s), Thank you for cleanup!
Comment 14 GLSAMaker/CVETool Bot gentoo-dev 2014-12-26 19:35:30 UTC
This issue was resolved and addressed in
 GLSA 201412-45 at http://security.gentoo.org/glsa/glsa-201412-45.xml
by GLSA coordinator Yury German (BlueKnight).