Bug 835122 (CVE-2013-4761) - VUL-0: CVE-2013-4761: puppet: `resource_type` remote code execution vulnerability
Summary: VUL-0: CVE-2013-4761: puppet: `resource_type` remote code execution vulnerabi...
Status: RESOLVED FIXED
Alias: CVE-2013-4761
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P1 - Urgent : Major
Target Milestone: ---
Deadline: 2014-01-27
Assignee: Kristyna Streitova
QA Contact: Security Team bot
URL:
Whiteboard: maint:running:55944:important maint:r...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-16 07:46 UTC by Matthias Weckbecker
Modified: 2014-10-06 13:50 UTC (History)
9 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Weckbecker 2013-08-16 07:46:29 UTC
Quote from [1]:

  "By using the `resource_type` service, an attacker could cause puppet to
   load arbitrary Ruby files from the puppet master node’s file system. While
   this behavior is not enabled by default, `auth.conf` settings could be
   modified to allow it. The exploit requires local file system access to the
   Puppet Master."

[1] http://puppetlabs.com/security/cve/cve-2013-4761/
Comment 1 Swamp Workflow Management 2013-08-16 22:00:10 UTC
bugbot adjusting priority
Comment 2 Swamp Workflow Management 2013-08-19 08:23:04 UTC
The SWAMPID for this issue is 54110.
This issue was rated as moderate.
Please submit fixed packages until 2013-09-02.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 4 Marcus Meissner 2013-09-05 09:32:19 UTC
was there any reply?
Comment 19 Vojtech Dziewiecki 2014-01-16 15:27:36 UTC
request 30697 submitted.
Unit tests might be broken thought.
Comment 21 Swamp Workflow Management 2014-01-20 09:28:00 UTC
The SWAMPID for this issue is 55944.
This issue was rated as important.
Please submit fixed packages until 2014-01-27.
When done, please reassign the bug to security-team@suse.de.
Patchinfo will be handled by security team.
Comment 22 Sebastian Krahmer 2014-01-28 12:24:10 UTC
So have we seen opensuse updates for this already?
If so or if not needed, we can close this.
Comment 23 Swamp Workflow Management 2014-01-28 13:05:20 UTC
Update released for: puppet, puppet-server
Products:
SLE-SERVER 11-SP1-TERADATA (x86_64)
Comment 24 Swamp Workflow Management 2014-01-28 14:54:06 UTC
Update released for: puppet, puppet-server
Products:
SLE-DESKTOP 11-SP2 (i386, x86_64)
SLE-SERVER 11-SP2 (i386, ia64, ppc64, s390x, x86_64)
SLES4VMWARE 11-SP2 (i386, x86_64)
Comment 25 Swamp Workflow Management 2014-01-28 15:00:47 UTC
Update released for: puppet, puppet-server
Products:
SLE-DESKTOP 11-SP3 (i386, x86_64)
SLE-SERVER 11-SP3 (i386, ia64, ppc64, s390x, x86_64)
SLES4VMWARE 11-SP3 (i386, x86_64)
Comment 26 Swamp Workflow Management 2014-01-28 18:06:52 UTC
SUSE-SU-2014:0155-1: An update that solves one vulnerability and has one errata is now available.

Category: security (important)
Bug References: 835122,853982
CVE References: CVE-2013-4761
Sources used:
SUSE Linux Enterprise Server 11 SP3 for VMware (src):    puppet-2.6.18-0.12.1
SUSE Linux Enterprise Server 11 SP3 (src):    puppet-2.6.18-0.12.1
SUSE Linux Enterprise Server 11 SP2 for VMware (src):    puppet-2.6.18-0.12.1
SUSE Linux Enterprise Server 11 SP2 (src):    puppet-2.6.18-0.12.1
SUSE Linux Enterprise Desktop 11 SP3 (src):    puppet-2.6.18-0.12.1
SUSE Linux Enterprise Desktop 11 SP2 (src):    puppet-2.6.18-0.12.1
Comment 27 Forgotten User v1zY0WZ-hH 2014-02-11 11:51:40 UTC
This updated package completely breaks puppet.  The application of bug-835122_ubuntu-2.7.11-puppet-Aug-2013-CVE-fixes.patch does not leave /usr/lib64/ruby/vendor_ruby/1.8/puppet/parser/type_loader.rb in a usable state as the signature for the "import" method is changed and the call to it from the "load_until" method is not fixed.  This results in obscure error "wrong number of arguments (1 for 2)" when trying to load *anything* from the module path.(In reply to comment #26)
> SUSE-SU-2014:0155-1: An update that solves one vulnerability and has one errata
> is now available.
> 
> Category: security (important)
> Bug References: 835122,853982
> CVE References: CVE-2013-4761
> Sources used:
> SUSE Linux Enterprise Server 11 SP3 for VMware (src):    puppet-2.6.18-0.12.1
> SUSE Linux Enterprise Server 11 SP3 (src):    puppet-2.6.18-0.12.1
> SUSE Linux Enterprise Server 11 SP2 for VMware (src):    puppet-2.6.18-0.12.1
> SUSE Linux Enterprise Server 11 SP2 (src):    puppet-2.6.18-0.12.1
> SUSE Linux Enterprise Desktop 11 SP3 (src):    puppet-2.6.18-0.12.1
> SUSE Linux Enterprise Desktop 11 SP2 (src):    puppet-2.6.18-0.12.1

This updated package completely breaks puppet.  The application of bug-835122_ubuntu-2.7.11-puppet-Aug-2013-CVE-fixes.patch does not leave /usr/lib64/ruby/vendor_ruby/1.8/puppet/parser/type_loader.rb in a usable state as the signature for the "import" method is changed and the call to it from the "load_until" method is not fixed.  This results in obscure error "wrong number of arguments (1 for 2)" when trying to load *anything* from the module path.
Comment 29 Liu Shukui 2014-02-12 04:29:53 UTC
(In reply to comment #27)
> This updated package completely breaks puppet.  The application of
> bug-835122_ubuntu-2.7.11-puppet-Aug-2013-CVE-fixes.patch does not leave
> /usr/lib64/ruby/vendor_ruby/1.8/puppet/parser/type_loader.rb in a usable state
> as the signature for the "import" method is changed and the call to it from the
> "load_until" method is not fixed.  This results in obscure error "wrong number
> of arguments (1 for 2)" when trying to load *anything* from the module path.

Very sorry for the inconvenience, Dardo Kleiner.


I will do the regression test once again right now.

When I did the regression test at the end of last month, it worked well.
It seems that you launched puppet on x86_64, right?
Did you try it on i386 platform?
Comment 30 Forgotten User v1zY0WZ-hH 2014-02-12 12:19:38 UTC
(In reply to comment #29)
> (In reply to comment #27)
> > This updated package completely breaks puppet.  The application of
> > bug-835122_ubuntu-2.7.11-puppet-Aug-2013-CVE-fixes.patch does not leave
> > /usr/lib64/ruby/vendor_ruby/1.8/puppet/parser/type_loader.rb in a usable state
> > as the signature for the "import" method is changed and the call to it from the
> > "load_until" method is not fixed.  This results in obscure error "wrong number
> > of arguments (1 for 2)" when trying to load *anything* from the module path.
> 
> Very sorry for the inconvenience, Dardo Kleiner.
> 
> 
> I will do the regression test once again right now.
> 
> When I did the regression test at the end of last month, it worked well.
> It seems that you launched puppet on x86_64, right?
> Did you try it on i386 platform?

I am using x86_64 - I do not have an i386 platform to test.  Unless it was packaged differently, I would expect the problem to be the same as its a Ruby syntax error in type_loader.rb.

Here's a simple test - this is stock SLES11SP3 w/ all latest updates:

# rpm -q puppet
puppet-2.6.18-0.12.1
# mkdir -p modules/test/manifests
# echo "class test { }" > modules/test/manifests/init.pp
# puppet apply --modulepath=./modules <(echo 'include ::test')
wrong number of arguments (1 for 2) at ...

# zypper -n in --oldpackage -y puppet-2.6.18-0.8.1
# puppet apply --modulepath=./modules <(echo 'include ::test')
notice: Finished catalog run in 0.01 seconds

Thanks for your attention!
Comment 31 Leonardo Chiquitto 2014-02-12 12:31:17 UTC
Fixing this regression is of course already high priority for us, but we would like to handle it through L3 (so we can even provide you an earlier build of the fixed package as a PTF).

Dardo, do you have a contact in NTS? If yes, could you ask the engineer to open a new bug report and escalate it to L3? Thanks!
Comment 32 Liu Shukui 2014-02-12 12:49:27 UTC
> I am using x86_64 - I do not have an i386 platform to test.  Unless it was
> packaged differently, I would expect the problem to be the same as its a Ruby
> syntax error in type_loader.rb.
> 
> Here's a simple test - this is stock SLES11SP3 w/ all latest updates:
> 
> # rpm -q puppet
> puppet-2.6.18-0.12.1
> # mkdir -p modules/test/manifests
> # echo "class test { }" > modules/test/manifests/init.pp
> # puppet apply --modulepath=./modules <(echo 'include ::test')
> wrong number of arguments (1 for 2) at ...
> 
> # zypper -n in --oldpackage -y puppet-2.6.18-0.8.1
> # puppet apply --modulepath=./modules <(echo 'include ::test')
> notice: Finished catalog run in 0.01 seconds
> 
> Thanks for your attention!


I was able to reproduce it. From this point of view, it's a regression indeed.
I redid the regression/functional tests listed in my testreport today, but
couldn't find the regression you provided, I think we mush improve the
regression testcases to cove more aspects of puppet.

Anyway, I will add your testcase in regression test from now on.
Comment 35 Sebastian Krahmer 2014-05-27 11:30:13 UTC
What are we up to here?

Theres also a new puppet security update coming. Something to
integrate from here?
Comment 36 Leonardo Chiquitto 2014-05-28 11:42:43 UTC
AFAIR, we've reverted the patch in the last update to fix the regression. I don't know if there's someone working on the back port.
Comment 40 Marcus Meissner 2014-10-01 20:55:01 UTC
Is this fixed with our 2.7 version update?
Comment 41 Kristyna Streitova 2014-10-06 13:50:41 UTC
We have the 2.7.26 version and the bug was resolved in 2.7.23 version. So it should be fixed.