Bug 1409531 (CVE-2016-9962)
Summary: | CVE-2016-9962 docker: insecure opening of file-descriptor allows privilege escalation | ||||||
---|---|---|---|---|---|---|---|
Product: | [Other] Security Response | Reporter: | Martin Prpič <mprpic> | ||||
Component: | vulnerability | Assignee: | Trevor Jay <tjay> | ||||
Status: | CLOSED ERRATA | QA Contact: | |||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | unspecified | CC: | adimania, admiller, agoldste, ajia, amurdaca, bbreard, chris.binnie, crrobins, dwalsh, erich, ichavero, imcleod, jcajka, jchaloup, jhonce, joelsmith, knakayam, lsm5, marianne, mattdm, mhicks, miminar, nalin, rcyriac, riek, security-response-team, tjay, vbatts, ykawada | ||||
Target Milestone: | --- | Keywords: | Security | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | docker 1.12.6 | Doc Type: | Bug Fix | ||||
Doc Text: |
The runc component used by `docker exec` feature of docker allowed additional container processes to be ptraced by the pid 1 of the container. This allows the main processes of the container, if running as root, to gain low-level access to these new processes during initialization. An attacker can, depending on the nature of the incoming process, leverage this to elevate access to the host. This ranges from accessing host content through the file descriptors of the incoming process to, potentially, a complete container escape by leveraging memory access or syscall interception.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-01-18 08:17:37 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: | 1409705, 1409706, 1409707, 1409708, 1412147, 1412189, 1412237, 1412238, 1412239 | ||||||
Bug Blocks: | 1409535 | ||||||
Attachments: |
|
Description
Martin Prpič
2017-01-02 12:23:40 UTC
Acknowledgments: Name: the Docker project Upstream: Aleksa Sarai (SUSE), Tõnis Tiigi (Docker) Created attachment 1236624 [details] CVE-2016-9962 patch This is an extremely difficult to exploit flaw on standard RHEL and Fedora systems. I checked the 1.10.3 and 1.12.5 builds on Brew. Both drop the `CAP_SYS_PTRACE` capability by default. 1.10.3 blacklists `ptrace` calls under the default seccomp profile. Thus, this flaw only comes into play for containers that already have elevated privileges. Even if `ptrace` is available. The proposed exploit scenario of quickly attaching to a process joining the container space and using its file descriptors is *not* possible under the default SELinux configuration. The containerized PID 1 will have a type of `container_t` or similar SELinux type and thus will be blocked by standard type enforcement from accessing accessing any resources that haven't already been made available to containerized processes. Public via: http://seclists.org/oss-sec/2017/q1/54 Created runc tracking bugs for this issue: Affects: fedora-all [bug 1412238] External References: https://access.redhat.com/security/vulnerabilities/cve-2016-9962 This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Extras Via RHSA-2017:0116 https://rhn.redhat.com/errata/RHSA-2017-0116.html This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Extras Via RHSA-2017:0123 https://rhn.redhat.com/errata/RHSA-2017-0123.html This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Extras Via RHSA-2017:0127 https://rhn.redhat.com/errata/RHSA-2017-0127.html Upstream commit: https://github.com/opencontainers/runc/commit/50a19c6ff828c58e5dab13830bd3dacde268afe5 Mitigation: On Red Hat systems with SELinux enabled, the dangers of even privileged containers are mitigated. SELinux prevents container processes from accessing host content even if those container processes manage to gain access to the actual file descriptors. The impact of this vulnerability was upgraded to Important because the CAP_SYS_PTRACE capability is not required to exploit it, as previously thought. |