CVE-2020-16120: Unprivileged overlay + shiftfs read access

Published Feb 10, 2021
·
Updated

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

6 affected componentsFixes available
Linux Linux kernel<5.11
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=20.04
debian/linux
5.10.223-15.10.262-16.1.176-16.1.180-16.12.94-16.12.101-17.1.8-17.1.8-2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to 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
  2. Upgrade

    Upgrade kernel overlayfs (ovl) to a version that resolves this vulnerability.

    Patch 56230d9
  3. Upgrade

    Upgrade kernel overlayfs (ovl) to a version that resolves this vulnerability.

    Patch 48bd024
  4. Upgrade

    Upgrade kernel overlayfs (ovl) to a version that resolves this vulnerability.

    Patch 05acefb
  5. 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

Feb 10, 2021
CVE Published
via MITRE·07:45 PM
Data Sourced
via MITRE·07:45 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 11, 2024
Data Sourced
via Launchpad·11:43 PM
Description
Aug 14, 2026
Data Sourced
via Ubuntu·04:23 PM
RemedyDescriptionSeverityAffected Software
Aug 16, 2026
Data Sourced
via Debian·04:26 PM
DescriptionAffected Software

Frequently Asked Questions

1

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.

2

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.

3

Which systems are affected by CVE-2020-16120?

CVE-2020-16120 affects multiple Linux distributions including Debian and various versions of Ubuntu.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203