Skip to content
OpenAdvisories
Medium · 5.1 CVE-2020-16120 EUVD-2020-8086GHSA-q6jw-34cj-733v

Unprivileged overlay + shiftfs read access

Published Feb 10, 2021 · Updated Sep 16, 2024 · Assigned by canonical

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.

Affected products

VendorProductAffectedFixed
Linux kernel Linux kernel 5.11-stable – < 5.11.0 5.11.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 5.8.7-1 —
Debian 13 linux 5.8.7-1 —
Debian 12 linux 5.8.7-1 —
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS linux-raspi-realtime No fix yet —
Ubuntu 22.04 LTS linux-riscv +3 No fix yet —
Ubuntu 20.04 LTS linux 5.4.0-51.56 USN-4576-1
Ubuntu 20.04 LTS linux-aws +2 5.4.0-1028.29 USN-4576-1
Ubuntu 20.04 LTS linux-azure 5.4.0-1031.32 USN-4576-1
Ubuntu 20.04 LTS linux-gke +2 No fix yet —
Ubuntu 20.04 LTS linux-kvm 5.4.0-1026.27 USN-4576-1
Ubuntu 20.04 LTS linux-oem-5.6 5.6.0-1031.32 —
Ubuntu 20.04 LTS linux-raspi 5.4.0-1021.24 USN-4576-1
Ubuntu 20.04 LTS linux-riscv 5.4.0-36.41 —
Ubuntu 18.04 LTS linux 4.15.0-121.123 USN-4578-1
Ubuntu 18.04 LTS linux-aws 4.15.0-1086.91 USN-4578-1
Ubuntu 18.04 LTS linux-aws-5.4 +2 5.4.0-1028.29~18.04.1 USN-4576-1
Ubuntu 18.04 LTS linux-azure-4.15 4.15.0-1099.110 USN-4578-1
Ubuntu 18.04 LTS linux-azure-5.4 5.4.0-1031.32~18.04.1 USN-4576-1
Ubuntu 18.04 LTS linux-gcp +10 No fix yet —
Ubuntu 18.04 LTS linux-gcp-4.15 4.15.0-1086.98 USN-4578-1
Ubuntu 18.04 LTS linux-gke-4.15 4.15.0-1072.76 USN-4578-1
Ubuntu 18.04 LTS linux-gke-5.0 5.0.0-1049.50 USN-4577-1
Ubuntu 18.04 LTS linux-gke-5.3 5.3.0-1038.40 USN-4577-1
Ubuntu 18.04 LTS linux-gke-5.4 5.4.0-1027.28~18.04.1 —
Ubuntu 18.04 LTS linux-gkeop-5.4 5.4.0-1003.3 —
Ubuntu 18.04 LTS linux-hwe 5.3.0-68.63 USN-4577-1
Ubuntu 18.04 LTS linux-hwe-5.4 5.4.0-51.56~18.04.1 USN-4576-1
Ubuntu 18.04 LTS linux-kvm 4.15.0-1077.79 USN-4578-1
Ubuntu 18.04 LTS linux-oem 4.15.0-1099.109 USN-4578-1
Ubuntu 18.04 LTS linux-oem-osp1 5.0.0-1069.75 USN-4577-1
Ubuntu 18.04 LTS linux-oracle 4.15.0-1057.62 USN-4578-1
Ubuntu 18.04 LTS linux-raspi-5.4 5.4.0-1021.24~18.04.1 USN-4576-1
Ubuntu 18.04 LTS linux-raspi2 4.15.0-1073.78 USN-4578-1
Ubuntu 18.04 LTS linux-raspi2-5.3 5.3.0-1035.37 USN-4577-1
Ubuntu 18.04 LTS linux-snapdragon 4.15.0-1089.98 USN-4578-1
Ubuntu 16.04 LTS linux-aws-hwe 4.15.0-1085.90~16.04.1 USN-4578-1
Ubuntu 16.04 LTS linux-azure 4.15.0-1098.109~16.04.1 USN-4578-1
Ubuntu 16.04 LTS linux-gcp 4.15.0-1086.98~16.04.1 USN-4578-1
Ubuntu 16.04 LTS linux-hwe 4.15.0-120.122~16.04.1 USN-4578-1
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —
Ubuntu 16.04 LTS linux-oracle 4.15.0-1056.61~16.04.1 USN-4578-1
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro FIPS 20.04 LTS linux-aws-fips +2 No fix yet —
Ubuntu Pro FIPS 18.04 LTS linux-fips +3 No fix yet —
Ubuntu Pro FIPS 16.04 LTS linux-fips No fix yet —
Ubuntu Pro FIPS-updates 20.04 LTS linux-aws-fips 5.4.0-1069.73+fips2 —
Ubuntu Pro FIPS-updates 20.04 LTS linux-azure-fips 5.4.0-1073.76+fips1 —
Ubuntu Pro FIPS-updates 20.04 LTS linux-gcp-fips 5.4.0-1067.71~20.04.1 —
Ubuntu Pro FIPS-updates 18.04 LTS linux-aws-fips 4.15.0-2030.31 —
Ubuntu Pro FIPS-updates 18.04 LTS linux-azure-fips 4.15.0-2012.14 —
Ubuntu Pro FIPS-updates 18.04 LTS linux-fips 4.15.0-1044.50 —
Ubuntu Pro FIPS-updates 16.04 LTS linux-fips No fix yet —
Ubuntu Pro 20.04 LTS linux 5.4.0-51.56 LSN-0072-1
Ubuntu Pro 20.04 LTS linux-aws +1 5.4.0-1028.29 LSN-0072-1
Ubuntu Pro 20.04 LTS linux-azure 5.4.0-1031.32 LSN-0072-1
Ubuntu Pro 20.04 LTS linux-azure-fde-5.15 5.15.0-1114.123~20.04.1 —
Ubuntu Pro 18.04 LTS linux 4.15.0-121.123 LSN-0072-1
Ubuntu Pro 18.04 LTS linux-aws 4.15.0-1086.91 LSN-0072-1
Ubuntu Pro 18.04 LTS linux-oem 4.15.0-1099.109 LSN-0072-1
Ubuntu Pro 16.04 LTS linux 4.4.0-193.224 LSN-0072-1
Ubuntu Pro 16.04 LTS linux-aws 4.4.0-1117.131 LSN-0072-1
Ubuntu Pro 16.04 LTS linux-kvm No fix yet —
Ubuntu Pro 14.04 LTS linux +1 No fix yet —
Ubuntu Pro 14.04 LTS linux-azure 4.15.0-1098.109~14.04.1 USN-4578-1
Ubuntu Pro 14.04 LTS linux-lts-xenial 4.4.0-193.224~14.04.1 LSN-0072-1
ReleasePackageFixed inAdvisory
SLES 15 SP2 kernel-azure +2 5.3.18-18.24.1 SUSE-SU-2020:3491-1
SLES 15 SP2 kernel-default-base 5.3.18-24.34.1.9.11.2 SUSE-SU-2020:3122-1
SLES 15 SP2 kernel-docs +5 5.3.18-24.34.1 SUSE-SU-2020:3122-1
SLES 15 SP1 kernel-azure +2 4.12.14-8.52.1 SUSE-SU-2020:3484-1
SLES 15 SP1 kernel-docs +5 4.12.14-197.67.1 SUSE-SU-2020:3272-1
SLES 15 kernel-docs +6 4.12.14-150.63.1 SUSE-SU-2020:3532-1
SLES 12 SP5 kernel-azure +2 4.12.14-16.34.1 SUSE-SU-2020:3281-1
SLES 12 SP5 kernel-docs +4 4.12.14-122.51.2 SUSE-SU-2020:3326-1
SLES 12 SP4 kernel-syms +2 4.12.14-95.65.1 SUSE-SU-2020:3544-1
Show 14 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 kernel-docs +5 4.12.14-150.63.1 SUSE-SU-2020:3532-1
SLES for SAP 12 SP5 kernel-azure +2 4.12.14-16.34.1 SUSE-SU-2020:3281-1
SLES for SAP 12 SP5 kernel-syms +2 4.12.14-122.51.2 SUSE-SU-2020:3326-1
SLES for SAP 12 SP4 kernel-syms +2 4.12.14-95.65.1 SUSE-SU-2020:3544-1
SLE Real Time 12 SP5 kernel-rt +3 4.12.14-10.22.1 SUSE-SU-2020:3512-1
SLE Live Patching 15 SP2 kernel-default 5.3.18-24.34.1 SUSE-SU-2020:3122-1
SLE Live Patching 15 SP2 kernel-livepatch-SLE15-SP2_Update_6 1-5.3.2 SUSE-SU-2020:3122-1
SLE Live Patching 15 SP1 kernel-default 4.12.14-197.67.1 SUSE-SU-2020:3272-1
SLE Live Patching 15 SP1 kernel-livepatch-SLE15-SP1_Update_18 1-3.3.1 SUSE-SU-2020:3272-1
SLE Live Patching 15 kernel-default 4.12.14-150.63.1 SUSE-SU-2020:3532-1
SLE Live Patching 15 kernel-livepatch-SLE15_Update_21 1-1.5.1 SUSE-SU-2020:3532-1
SLE Live Patching 12 SP5 kernel-default 4.12.14-122.51.2 SUSE-SU-2020:3326-1
SLE Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_12 1-8.5.2 SUSE-SU-2020:3326-1
SLE Live Patching 12 SP4 kernel-default 4.12.14-95.65.1 SUSE-SU-2020:3544-1
SLE Live Patching 12 SP4 kgraft-patch-SLE12-SP4_Update_17 1-6.5.1 SUSE-SU-2020:3544-1
SLE HPC 15 kernel-docs +5 4.12.14-150.63.1 SUSE-SU-2020:3532-1
SUSE Real Time Module 15 SP2 kernel-rt +3 5.3.18-16.1 SUSE-SU-2020:3522-1
SUSE Real Time Module 15 SP1 kernel-rt +3 4.12.14-14.41.2 SUSE-SU-2020:3513-1
SUSE OpenStack Cloud Crowbar 9 kernel-syms +2 4.12.14-95.65.1 SUSE-SU-2020:3544-1
SUSE OpenStack Cloud 9 kernel-syms +2 4.12.14-95.65.1 SUSE-SU-2020:3544-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.2 kernel-default-base 5.3.18-lp152.50.1.lp152.8.10.1 openSUSE-SU-2020:2112-1
openSUSE Leap 15.2 kernel-docs +8 5.3.18-lp152.50.1 openSUSE-SU-2020:1906-1
openSUSE Leap 15.2 kernel-rt +3 5.3.18-lp152.3.5.1 openSUSE-SU-2021:0242-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) kernel 5.10.78.1-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 7 kernel-uek-container 4.14.35-2047.501.0.el7 ELSA-2021-9087, ELSA-2021-9086
Oracle Linux 7 kernel-uek-container-debug 5.4.17-2036.104.4.el8 ELSA-2021-9086
Oracle Linux 7 perf +10 4.14.35-2047.501.1.el7uek ELSA-2021-9085, ELSA-2021-9084

Advisories 24

References