CVE-2020-16120: Unprivileged overlay + shiftfs read access
Last updated 14 August 2026
Other sources
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 ovlpathopen()"), 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 ovlrealioctl()") 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 ONOATIMEi") in kernel 5.11.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.262-1Fixed in 6.1.176-1Fixed in 6.1.180-1Fixed in 6.12.94-1Fixed in 6.12.101-1Fixed in 7.1.8-1Fixed in 7.1.8-2 - Upgrade
Upgrade
kernel overlayfs (ovl)to a version that resolves this vulnerability.Patch 56230d9 - Upgrade
Upgrade
kernel overlayfs (ovl)to a version that resolves this vulnerability.Patch 48bd024 - Upgrade
Upgrade
kernel overlayfs (ovl)to a version that resolves this vulnerability.Patch 05acefb - Configuration
Disable unprivileged user namespaces by setting kernel.unprivileged_userns_clone=0 (persist by adding it to /etc/sysctl.d/99-userns.conf and apply with: sudo sysctl kernel.unprivileged_userns_clone=0).
Linux kernel kernel.unprivileged_userns_clone = 0
Event History
Frequently Asked Questions
What is the severity of CVE-2020-16120?
CVE-2020-16120 has a severity rating that enables potential privilege escalation in systems using vulnerable versions of Overlayfs.
How do I fix CVE-2020-16120?
To fix CVE-2020-16120, update to the patched versions of Linux kernels: 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.119-1, or 6.12.10-1.
Which systems are affected by CVE-2020-16120?
CVE-2020-16120 affects multiple Linux distributions including Debian and various versions of Ubuntu.
Can CVE-2020-16120 be exploited in user namespaces?
Yes, CVE-2020-16120 can be exploited from within a user namespace if unprivileged user namespaces are allowed.
What is Overlayfs in relation to CVE-2020-16120?
Overlayfs is a layered filesystem in Linux that is implicated in the permission-checking flaw described in CVE-2020-16120.