Bug 1245941 (CVE-2015-1334)

Summary: CVE-2015-1334 lxc: possible unconfined code execution
Product: [Other] Security Response Reporter: Martin Prpič <mprpic>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: karlthered, pokorra.mailinglists, sagarun, thomas.moschny
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:42:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1245942, 1245943    
Bug Blocks:    

Description Martin Prpič 2015-07-23 07:56:53 UTC
A flaw was found in LXC that allows processes intended to be run inside of confined LXC containers to escape SELinux confinement. A malicious container can create a fake proc filesystem, possibly by mounting tmpfs on top of the container's /proc, and wait for a lxc-attach to be ran from the host environment. lxc-attach incorrectly trusts the container's /proc/PID/attr/{current,exec} files to set up the SELinux domain transitions, which may result in no confinement being used.

This flaw is reported to affect LXC 0.9.0 and later.

Additional information:

https://launchpad.net/bugs/1475050

Upstream patches:

https://github.com/lxc/lxc/commit/5c3fcae78b63ac9dd56e36075903921bd9461f9e (master)
https://github.com/lxc/lxc/commit/659e807c8dd1525a5c94bdecc47599079fad8407 (stable-1.1)
https://github.com/lxc/lxc/commit/15ec0fd9d490dd5c8a153401360233c6ee947c24 (stable-1.0)

Comment 1 Martin Prpič 2015-07-23 07:57:57 UTC
Created lxc tracking bugs for this issue:

Affects: fedora-all [bug 1245942]
Affects: epel-all [bug 1245943]

Comment 2 Thomas Moschny 2015-07-24 07:11:58 UTC
(In reply to Martin Prpic from comment #0)
> https://github.com/lxc/lxc/commit/659e807c8dd1525a5c94bdecc47599079fad8407
> (stable-1.1)

That does not apply cleanly to 1.1.2. Three options:
- merge and fix by hand, yields http://ur1.ca/n7io5 - not sure if that is ok
- pick more commits, e.g. https://github.com/lxc/lxc/commit/8af7999
- wait for 1.1.3 which should be released soon

Also asked upstream, waiting for response.

Comment 3 Thomas Moschny 2015-08-02 14:18:32 UTC
Got no reply from upstream, used variant 1.
(Also seems to be the similar to what Ubuntu did.)

Comment 4 Fedora Update System 2015-08-10 10:06:00 UTC
lxc-1.1.2-2.fc23 has been pushed to the Fedora 23 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2015-08-11 02:11:22 UTC
lxc-1.1.2-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2015-08-11 02:13:00 UTC
lxc-1.0.7-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-08-17 19:06:14 UTC
lxc-1.0.7-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 8 Fedora Update System 2015-08-17 19:07:16 UTC
lxc-1.0.7-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.

Comment 9 Thomas Moschny 2016-04-29 18:39:02 UTC
Please close.

Comment 10 Product Security DevOps Team 2019-06-08 02:42:51 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.