Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513290 - =dev-ruby/hiera-1.3.4 - stable/keyword request
Summary: =dev-ruby/hiera-1.3.4 - stable/keyword request
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords: KEYWORDREQ, STABLEREQ
Depends on: 505920 513430
Blocks: 513322
  Show dependency tree
 
Reported: 2014-06-15 03:36 UTC by Matthew Thode ( prometheanfire )
Modified: 2014-12-22 13:58 UTC (History)
3 users (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 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-06-15 03:36:35 UTC
***** 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
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-15 03:38:21 UTC
Arches, please stablize for the following

=dev-ruby/hiera-1.3.4 amd64 hppa ppc sparc x86

sparc, I know that this means a keyword req at the same time :(
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-15 15:32:22 UTC
I think you need an intermediate ebuild that excludes IUSE=ruby_targets_ruby21.

RepoMan scours the neighborhood...
>>> Creating Manifest for /newaches/gentoo/cvs/gentoo-x86/dev-ruby/hiera
  dependency.bad                2
   dev-ruby/hiera/hiera-1.3.4.ebuild: DEPEND: hppa(default/linux/hppa/13.0) ['dev-ruby/mocha[ruby_targets_ruby20]', 'dev-ruby/mocha[ruby_targets_ruby21]', 'dev-ruby/json[ruby_targets_ruby21]', 'dev-lang/ruby:2.1', 'dev-ruby/rspec:2[ruby_targets_ruby21]', 'virtual/rubygems[ruby_targets_ruby21]', 'virtual/rubygems[ruby_targets_ruby21]']
   dev-ruby/hiera/hiera-1.3.4.ebuild: RDEPEND: hppa(default/linux/hppa/13.0) ['dev-ruby/json[ruby_targets_ruby21]', 'dev-lang/ruby:2.1', 'virtual/rubygems[ruby_targets_ruby21]']
Comment 3 Hans de Graaff gentoo-dev Security 2014-06-16 05:38:16 UTC
Note that this security bug does not affect Gentoo since we removed <dev-lang/ruby-1.9.2 some time ago and we do not install for jruby 1.6.

Stabling this version will also require additional stable bugs to be handled: bug 505920 and bug 513430
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-17 13:21:07 UTC
(In reply to Hans de Graaff from comment #3)
> Note that this security bug does not affect Gentoo since we removed
> <dev-lang/ruby-1.9.2 some time ago and we do not install for jruby 1.6.
> 
> Stabling this version will also require additional stable bugs to be
> handled: bug 505920 and bug 513430

So this is not a security bug report?
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-07-30 05:31:35 UTC
how goes the stablereq?
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-09 10:30:46 UTC
Stable for HPPA.
Comment 7 Manuel Rüger (RETIRED) gentoo-dev 2014-08-25 16:15:03 UTC
Stable on amd64
Comment 8 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2014-09-19 14:48:48 UTC
stable?
Comment 9 Agostino Sarubbo gentoo-dev 2014-09-20 21:21:57 UTC
The ppc team is unable to work in this way. There are tens of blocker/depends on. As said multiple times, please open _one_ bug with a complete list where repoman does not complain about missing depends and does not complain about missing ebuilds with some ruby_targets. Thanks
Comment 10 Agostino Sarubbo gentoo-dev 2014-09-20 21:25:39 UTC
The ppc64 team is unable to work in this way. There are tens of blocker/depends on. As said multiple times, please open _one_ bug with a complete list where repoman does not complain about missing depends and does not complain about missing ebuilds with some ruby_targets. Thanks
Comment 11 Agostino Sarubbo gentoo-dev 2014-09-20 21:27:32 UTC
The sparc team is unable to work in this way. There are tens of blocker/depends on. As said multiple times, please open _one_ bug with a complete list where repoman does not complain about missing depends and does not complain about missing ebuilds with some ruby_targets. Thanks
Comment 12 Agostino Sarubbo gentoo-dev 2014-09-20 21:39:42 UTC
The x86 team is unable to work in this way. There are tens of blocker/depends on. As said multiple times, please open _one_ bug with a complete list where repoman does not complain about missing depends and does not complain about missing ebuilds with some ruby_targets. Thanks
Comment 13 Hans de Graaff gentoo-dev Security 2014-12-20 07:26:28 UTC
Stable dependencies are now in place:

=dev-ruby/hiera-1.3.4
Comment 14 Agostino Sarubbo gentoo-dev 2014-12-22 13:57:07 UTC
x86 stable
Comment 15 Agostino Sarubbo gentoo-dev 2014-12-22 13:57:21 UTC
ppc stable
Comment 16 Agostino Sarubbo gentoo-dev 2014-12-22 13:58:42 UTC
sparc stable. Closing.