ID CVE-2016-3697
Summary libcontainer/user/user.go in runC before 0.1.0, as used in Docker before 1.11.2, improperly treats a numeric UID as a potential username, which allows local users to gain privileges via a numeric username in the password file in a container.
References
Vulnerable Configurations
  • Docker 1.11.1
    cpe:2.3:a:docker:docker:1.11.1
  • cpe:2.3:a:opencontainers:runc:0.0.9
    cpe:2.3:a:opencontainers:runc:0.0.9
  • OpenSUSE 13.2
    cpe:2.3:o:opensuse:opensuse:13.2
CVSS
Base: 2.1 (as of 15-06-2016 - 13:41)
Impact:
Exploitability:
CWE CWE-264
CAPEC
  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Blue Boxing
    This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
  • Restful Privilege Elevation
    Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
  • Target Programs with Elevated Privileges
    This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
Access
VectorComplexityAuthentication
LOCAL LOW NONE
Impact
ConfidentialityIntegrityAvailability
PARTIAL NONE NONE
nessus via4
  • NASL family Huawei Local Security Checks
    NASL id EULEROS_SA-2016-1016.NASL
    description According to the version of the docker packages installed, the EulerOS installation on the remote host is affected by the following vulnerability : - It was found that Docker would launch containers under the specified UID instead of a username. An attacker able to launch a container could use this flaw to escalate their privileges to root within the launched container.(CVE-2016-3697) Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-11-14
    plugin id 99779
    published 2017-05-01
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=99779
    title EulerOS 2.0 SP1 : docker (EulerOS-SA-2016-1016)
  • NASL family Oracle Linux Local Security Checks
    NASL id ORACLELINUX_ELSA-2016-3568.NASL
    description Description of changes: docker-engine [1.10.3-1.0.3] - CVE-2016-3697: docker: Potential privilege escalation via confusion of usernames and UIDs [orabug 23279003] docker-engine-selinux [1.10.3-1.0.3] - Rebuild with the updated docker-engine
    last seen 2019-02-21
    modified 2016-10-19
    plugin id 91294
    published 2016-05-23
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=91294
    title Oracle Linux 6 / 7 : docker-engine (ELSA-2016-3568)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2016-6A0D540088.NASL
    description built docker @projectatomic/fedora-1.10.3 commit f476348 ---- built docker @projectatomic/fedora-1.10.3 commit f476348 ---- built docker @projectatomic/fedora-1.10.3 commit 4158ccc ---- Resolves: #1335649 - enable Red Hat subscription use in Docker containers on Fedora ---- built docker @projectatomic/fedora-1.10.3 commit 8ecd47f ---- built docker @projectatomic/fedora-1.10.3 commit 8ecd47f ---- built docker @projectatomic/fedora-1.10.3 commit 667d6d1 ---- built docker @projectatomic/fedora-1.10.3 commit bba2d6d ---- built docker @projectatomic/fedora-1.10.3 commit a41254f ---- built docker @projectatomic/fedora-1.10.3 commit#964eda6 ---- built docker @projectatomic/fedora-1.10.3 commit#ef2fa35 ---- docker package runtime depends on docker-forward-journald ---- rebuilt to remove dockerroot user creation ---- rebuilt to remove dockerroot user creation ---- rebuilt to include dss_libdir directory ---- built docker @projectatomic/fedora-1.10.2 commit#86e59a5 ---- rebuilt with seccomp enabled ---- built docker @projectatomic/fedora-1.10.1 commit#6c71d8f ---- built docker @projectatomic/fedora-1.10.1 commit#6c71d8f ---- rebuilt, no change ---- built docker @projectatomic/fedora-1.10.2 commit#0f5ac89 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2016-10-18
    plugin id 92105
    published 2016-07-14
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=92105
    title Fedora 23 : 2:docker (2016-6a0d540088)
  • NASL family Red Hat Local Security Checks
    NASL id REDHAT-RHSA-2016-1034.NASL
    description An update for docker is now available for Red Hat Enterprise Linux 7 Extras. Red Hat Product Security has rated this update as having a security impact of Moderate. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section. Docker is an open source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere. Security Fix(es) : * It was found that Docker would launch containers under the specified UID instead of a username. An attacker able to launch a container could use this flaw to escalate their privileges to root within the launched container. (CVE-2016-3697) This issue was discovered by Mrunal Patel (Red Hat). Bug Fix(es) : * The process of pulling an image spawns a new 'goroutine' for each layer in the image manifest. If any of these downloads, everything stops and an error is returned, even though other goroutines would still be running and writing output through a progress reader which is attached to an http response writer. Since the request handler had already returned from the first error, the http server panics when one of these download goroutines makes a write to the response writer buffer. This bug has been fixed, and docker no longer panics when pulling an image. (BZ#1264562) * Previously, in certain situations, a container rootfs remained busy during container removal. This typically happened if a container mount point leaked into another mount namespace. As a consequence, container removal failed. To fix this bug, a new docker daemon option 'dm.use_deferred_deletion' has been provided. If set to true, this option will defer the container rootfs deletion. The user will see success on container removal but the actual thin device backing the rootfs will be deleted later when it is not busy anymore. (BZ#1190492) * Previously, the Docker unit file had the 'Restart' option set to 'on-failure'. Consequently, the docker daemon was forced to restart even in cases where it couldn't be started because of configuration or other issues and this situation forced unnecessary restarts of the docker-storage-setup service in a loop. This also caused real error messages to be lost due to so many restarts. To fix this bug, 'Restart=on-failure' has been replaced with 'Restart=on-abnormal' in the docker unit file. As a result, the docker daemon will not automatically restart if it fails with an unclean exit code. (BZ#1319783) * Previously, the request body was incorrectly read twice by the docker daemon and consequently, an EOF error was returned. To fix this bug, the code which incorrectly read the request body the first time has been removed. As a result, the EOF error is no longer returned and the body is correctly read when really needed. (BZ#1329743) Enhancement(s) : * The /usr/bin/docker script now calls /usr/bin/docker-current or /usr/bin/ docker-latest based on the value of the sysconfig variable DOCKERBINARY present in /etc/sysconfig/docker. /usr/bin/docker and /etc/sysconfig/docker provided by the docker-common package allow the admin to configure which docker client binary gets called. /usr/bin/docker will call /usr/bin/ docker-latest by default when docker is not installed. If docker is installed, /usr/bin/docker will call /usr/bin/docker-current by default, unless DOCKERBINARY is set to /usr/bin/docker-latest in /etc/sysconfig/ docker. This way, you can use docker-latest or docker without the need to check which version of the daemon is currently running. (BZ#1328219)
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 91115
    published 2016-05-13
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=91115
    title RHEL 7 : docker (RHSA-2016:1034)
  • NASL family Gentoo Local Security Checks
    NASL id GENTOO_GLSA-201612-28.NASL
    description The remote host is affected by the vulnerability described in GLSA-201612-28 (Docker: Privilege escalation) Docker does not properly distinguish between numeric UIDs and string usernames. Impact : Local attackers could possibly escalate their privileges. Workaround : There is no known workaround at this time.
    last seen 2019-02-21
    modified 2016-12-12
    plugin id 95696
    published 2016-12-12
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=95696
    title GLSA-201612-28 : Docker: Privilege escalation
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2016-643.NASL
    description This update for docker fixes the following issues : Security issues fixed : - CVE-2016-3697: Potential privilege escalation via confusion of usernames and UIDs (boo#976777) Bugs fixed : - devicemapper: fix zero-sized field access - remove docker-netns-aarch64.patch: This patch was adding We'll fix that later if we want to release for those archs. - Exclude init scripts other than systemd from the test-package make it explicit. - Add test subpackage and fix line numbers in patches
    last seen 2019-02-21
    modified 2016-10-13
    plugin id 91401
    published 2016-06-01
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=91401
    title openSUSE Security Update : docker (openSUSE-2016-643)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2016-6EF52E1FC3.NASL
    description Resolves: #1340519 - add TasksMax=infinity ---- built docker @projectatomic/fedora-1.10.3 commit f476348 ---- built docker @projectatomic/fedora-1.10.3 commit f476348 ---- built docker @projectatomic/fedora-1.10.3 commit 4158ccc ---- Resolves: #1335649 - enable Red Hat subscription use in Docker containers on Fedora ---- built docker @projectatomic/fedora-1.10.3 commit 8ecd47f Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2016-10-18
    plugin id 92108
    published 2016-07-14
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=92108
    title Fedora 24 : 2:docker (2016-6ef52e1fc3)
  • NASL family Red Hat Local Security Checks
    NASL id REDHAT-RHSA-2016-2634.NASL
    description An update for docker is now available for Red Hat Enterprise Linux 7 Extras. Red Hat Product Security has rated this update as having a security impact of Moderate. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section. Docker is an open source engine that automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere. Security Fix(es) : * It was found that Docker would launch containers under the specified UID instead of a username. An attacker able to launch a container could use this flaw to escalate their privileges to root within the launched container. (CVE-2016-3697) This issue was discovered by Mrunal Patel (Red Hat). Bug Fix(es) : * This update also provides various bug fixes and enhancements. Users are advised to upgrade to these updated packages.
    last seen 2019-02-21
    modified 2018-11-10
    plugin id 94606
    published 2016-11-07
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=94606
    title RHEL 7 : docker (RHSA-2016:2634)
redhat via4
advisories
  • rhsa
    id RHSA-2016:1034
  • rhsa
    id RHSA-2016:2634
refmap via4
confirm
gentoo GLSA-201612-28
suse openSUSE-SU-2016:1417
Last major update 17-01-2017 - 21:59
Published 01-06-2016 - 16:59
Last modified 30-10-2018 - 12:27
Back to Top