Red Hat Bugzilla – Bug 1409531
CVE-2016-9962 docker: insecure opening of file-descriptor allows privilege escalation
Last modified: 2017-01-18 03:17:37 EST
The following issue was reported in Docker: RunC allowed additional container processes via `runc exec` to be ptraced by the pid 1 of the container. This allows the main processes of the container, if running as root, to gain access to file-descriptors of these new processes during the initialization and can lead to container escapes or modification of runC state before the process is fully placed inside the container.
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