CVE-2020-16120
Unprivileged overlay + shiftfs read access
Check your servers for CVE-2020-16120
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2020-16120 affects a package, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
Overlayfs did not properly perform permission checking when copying up files in an overlayfs and could be exploited from within a user namespace, if, for example, unprivileged user namespaces were allowed. It was possible to have a file not readable by an unprivileged user to be copied to a mountpoint controlled by the user, like a removable device. This was introduced in kernel version 4.19 by commit d1d04ef ("ovl: stack file ops"). This was fixed in kernel version 5.8 by commits 56230d9 ("ovl: verify permissions in ovl_path_open()"), 48bd024 ("ovl: switch to mounter creds in readdir") and 05acefb ("ovl: check permission to open real file"). Additionally, commits 130fdbc ("ovl: pass correct flags for opening real directory") and 292f902 ("ovl: call secutiry hook in ovl_real_ioctl()") in kernel 5.8 might also be desired or necessary. These additional commits introduced a regression in overlay mounts within user namespaces which prevented access to files with ownership outside of the user namespace. This regression was mitigated by subsequent commit b6650da ("ovl: do not fail because of O_NOATIMEi") in kernel 5.11.
Severity (CVSS)
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity none, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.42%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 37.9% of all scored CVEs. Scores of 1 Dec 2026.
Weakness
- CWE-266 Incorrect Privilege Assignment
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux kernel |
affected from 5.11-stable, before 5.11.0
|
Is my server affected?
Find the installed version of the package (replace PACKAGE with its name) and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i PACKAGE
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2020-16120 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2020-16120RHEL, Rocky, Alma, Fedora
rpm -q PACKAGE
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2020-16120Alpine
apk list --installed | grep -i PACKAGEWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2020-16120
trivy image --scanners vuln IMAGE | grep CVE-2020-16120
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://ubuntu.com/USN-4576-1 ubuntu.com · vendor advisory
- https://ubuntu.com/USN-4577-1 ubuntu.com · vendor advisory
- https://ubuntu.com/USN-4578-1 ubuntu.com · vendor advisory
- https://www.openwall.com/lists/oss-security/2020/10/14/2 openwall.com
- https://launchpad.net/bugs/1894980 launchpad.net · vendor advisory
- https://launchpad.net/bugs/1900141 launchpad.net · vendor advisory
- https://git.kernel.org/linus/56230d956739b9cb1cbde439d76227d77979a04d git.kernel.org
- https://git.kernel.org/linus/48bd024b8a40d73ad6b086de2615738da0c7004f git.kernel.org
- https://git.kernel.org/linus/05acefb4872dae89e772729efb194af754c877e8 git.kernel.org
- https://git.kernel.org/linus/d1d04ef8572bc8c22265057bd3d5a79f223f8f52 git.kernel.org
- https://git.kernel.org/linus/b6650dab404c701d7fe08a108b746542a934da84 git.kernel.org
Source: the record CVE-2020-16120 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse