Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1322925 - (CVE-2016-3096) CVE-2016-3096 ansible: Code execution vulnerability in lxc_container
CVE-2016-3096 ansible: Code execution vulnerability in lxc_container
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
impact=important,public=20160331,repo...
: Security
Depends On: 1322926 1322927
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-31 13:00 EDT by Adam Mariš
Modified: 2017-05-12 03:05 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-12 03:05:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2016-03-31 13:00:20 EDT
A vulnerability in lxc_container, ansible module, was found allowing to get root inside the container. The problem is in the create_script function, which tries to write to /opt/.lxc-attach-script inside of the container. If the attacker can write to /opt/.lxc-attach-script before that, he can overwrite arbitrary files or execute commands as root.
Comment 1 Adam Mariš 2016-03-31 13:00:33 EDT
Acknowledgments:

Name: Evgeni Golov (Red Hat)
Comment 2 Adam Mariš 2016-03-31 13:01:09 EDT
Created lxc tracking bugs for this issue:

Affects: fedora-all [bug 1322926]
Affects: epel-all [bug 1322927]
Comment 4 Thomas Moschny 2016-04-01 04:08:28 EDT
Wrong component? The problem seems to affect

/usr/lib/python2.7/site-packages/ansible/modules/extras/cloud/lxc/lxc_container.py

which is part of the ansible package.

Could you please check and re-assign.
Comment 5 Adam Mariš 2016-04-01 08:39:42 EDT
(In reply to Thomas Moschny from comment #4)
> Wrong component? The problem seems to affect
> 
> /usr/lib/python2.7/site-packages/ansible/modules/extras/cloud/lxc/
> lxc_container.py
> 
> which is part of the ansible package.
> 
> Could you please check and re-assign.

You're right, my bad. Thanks for notifying, moving to ansible.
Comment 7 Kevin Fenzi 2016-04-01 18:11:32 EDT
So, currently epel6/7 and fedora 22/23 stable updates has ansible 1.9.4 and ansible1.9-1.9.4. In updates-testing we have 2.0.1.0 for ansible. We don't want to push 2.0.x stable yet, we are waiting for 2.1 upstream to fix some issues many people will hit. 

1.9.4 is vulnerable to this issue, but it requires a local user with write to /opt to exploit it, and thats root only on fedora/epel by default. So, while we are vulnerable it's pretty difficult to exploit. 

2.0.x is also vulnerable and more so, since permissions were not setup correctly there.

Currently I think we will look at fixing this in a local 2.0.x patch and pushing that to testing in all the stable branches or in a 2.0.2 if the fix turns out difficult and waiting for 2.1 (due this month) to hopefully push to stable with the fix everywhere.
Comment 8 Toshio Ernie Kuratomi 2016-04-02 04:51:58 EDT
Evgeni's fixes merged upstream.  Will be in upstream releases 1.9.6, 2.0.2, and 2.1.0.
Comment 9 Toshio Ernie Kuratomi 2016-04-04 10:41:03 EDT
@Adam -- there's also an ansible1.9 package in fedora and epel for now (to ease transition to ansible-2.0).  I'm guessing you want to open bugs against that in fedora and epel as well.
Comment 10 Evgeni Golov 2016-04-05 03:34:59 EDT
FWIW, if you are already shipping updates to lxc_container.py, you might consider also including https://github.com/ansible/ansible-modules-extras/commit/6bfd2846f853b9beaeb01da6206d8ffa4abe7a4c
Comment 11 Fedora Update System 2016-04-25 18:21:02 EDT
ansible1.9-1.9.6-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2016-04-25 19:53:27 EDT
ansible1.9-1.9.6-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 13 Fedora Update System 2016-04-29 20:20:29 EDT
ansible-2.0.2.0-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2016-04-29 20:24:31 EDT
ansible-2.0.2.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2016-05-07 08:02:54 EDT
ansible-2.0.2.0-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2016-05-07 10:05:09 EDT
ansible-2.0.2.0-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
Comment 17 Fedora Update System 2016-05-07 10:33:32 EDT
ansible-2.0.2.0-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
Comment 18 Fedora Update System 2016-05-14 22:41:54 EDT
ansible1.9-1.9.6-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
Comment 19 Fedora Update System 2016-05-14 23:04:25 EDT
ansible1.9-1.9.6-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

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