CVE-2020-12114: Race Condition
A flaw was found in the Linux kernel’s implementation of the pivotroot syscall. This flaw allows a local privileged user (root outside or root inside a privileged container) to exploit a race condition to manipulate the reference count of the root filesystem. To be able to abuse this flaw, the process or user calling pivotroot must have advanced permissions. The highest threat from this vulnerability is to system availability.
Other sources
A flaw was found in the Linux kernels implementation of the pivotroot syscall. A local privileged user (root outside or root inside a privileged container) could exploit a race condition to manipulate the reference count of the root filesystem.
To be able to abuse this flaw, the process or user calling pivotroot must have advanced permissions. As quoted from the pivotroot(2) man page:
The calling process must have the CAPSYSADMIN capability in the user namespace that owns the caller's mount namespace.
This can allow any user able to execute the pivotroot to cause a denial of service (panic) by corrupting a mountpoint reference counter, possibly allowing for a container escape.
References: http://seclists.org/oss-sec/2020/q2/86 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.14.178&id=e21c8c03af20932c15d8b1d3bb9cbad9607a6eab https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.4.221&id=83354adbd7a967230bd23a547c5b695567ddba2c https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.19.119&id=f511dc75d22e0c000fc70b54f670c2c17f5fba9a https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.9.221&id=91e997939dda1a866f23ddfb043dcd4a3ff57524
— Red Hat
A pivotroot race condition in fs/namespace.c in the Linux kernel 4.4.x before 4.4.221, 4.9.x before 4.9.221, 4.14.x before 4.14.178, 4.19.x before 4.19.119, and 5.x before 5.3 allows local users to cause a denial of service (panic) by corrupting a mountpoint reference counter.
— Ubuntu
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/kernel-rtto a version that resolves this vulnerability.Fixed in 0:4.18.0-305.rt7.72.el8 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 0:4.18.0-305.el8 - Upgrade
Upgrade
redhat/kernel-rtto a version that resolves this vulnerability.Fixed in 0:4.18.0-193.56.1.rt13.106.el8_2 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 0:4.18.0-193.56.1.el8_2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
Linux kernel 4.4.xto a version that resolves this vulnerability.Fixed in 4.4.221 - Upgrade
Upgrade
Linux kernel 4.9.xto a version that resolves this vulnerability.Fixed in 4.9.221 - Upgrade
Upgrade
Linux kernel 4.14.xto a version that resolves this vulnerability.Fixed in 4.14.178 - Upgrade
Upgrade
Linux kernel 4.19.xto a version that resolves this vulnerability.Fixed in 4.19.119 - Upgrade
Upgrade
Linux kernel 5.xto a version that resolves this vulnerability.Fixed in 5.3
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2020-12114?
CVE-2020-12114 is considered a medium severity vulnerability due to its local privilege escalation potential.
How do I fix CVE-2020-12114?
To fix CVE-2020-12114, update to the patched versions of the Linux kernel as specified by your distribution, such as kernel version 0:4.18.0-305.rt7.72.el8 or later.
Who is affected by CVE-2020-12114?
CVE-2020-12114 affects local privileged users, including those in privileged containers on Linux systems.
What type of vulnerability is CVE-2020-12114?
CVE-2020-12114 is a local privilege escalation vulnerability in the Linux kernel's pivot_root syscall.
What versions of the Linux kernel are affected by CVE-2020-12114?
The affected versions range from kernel versions 4.4.0 to 5.3 and specific versions such as 0:4.18.0-193.el8.