CVE-2020-16120
Vulnerability Summary
Timeline
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.
CVSS Metrics
- v3.1•MEDIUM•Score: 5.1CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- v3.1•MEDIUM•Score: 4.4CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
- v2.0•LOW•Score: 2.1AV:L/AC:L/Au:N/C:P/I:N/A:N
EPSS Trends
Current EPSS score: 0.41%• Percentile: 35%
Techniques & Countermeasures
- CWE-266•Incorrect Privilege Assignment
A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.
Affected Systems
- canonical•ubuntu_linux
14.04 | 16.04 | 18.04 | 20.04
- debian•linux
< 5.8.7-1 | < 5.8.7-1 | < 5.8.7-1 | < 5.8.7-1
- ubuntu•linux
all | < 4.15.0-121.123 | < 5.4.0-51.56
- ubuntu•linux-aws
all | < 4.15.0-1086.91 | < 5.4.0-1028.29
- ubuntu•linux-aws-5.0
all
- ubuntu•linux-aws-5.3
all
- ubuntu•linux-aws-5.4
< 5.4.0-1028.29~18.04.1
- ubuntu•linux-aws-fips
< 4.15.0-2030.31 | all | < 5.4.0-1069.73+fips2
- ubuntu•linux-aws-hwe
< 4.15.0-1085.90~16.04.1
- ubuntu•linux-azure
< 4.15.0-1098.109~14.04.1 | < 4.15.0-1098.109~16.04.1 | all | < 5.4.0-1031.32
- ubuntu•linux-azure-4.15
< 4.15.0-1099.110
- ubuntu•linux-azure-5.3
all
- ubuntu•linux-azure-5.4
< 5.4.0-1031.32~18.04.1
- ubuntu•linux-azure-edge
all
- ubuntu•linux-azure-fde
all
- ubuntu•linux-azure-fde-5.15
< 5.15.0-1114.123~20.04.1
- ubuntu•linux-azure-fips
< 4.15.0-2012.14 | all | < 5.4.0-1073.76+fips1
- ubuntu•linux-bluefield
all
- ubuntu•linux-fips
all | < 4.15.0-1044.50
- ubuntu•linux-gcp
< 4.15.0-1086.98~16.04.1 | all | < 5.4.0-1028.29
- ubuntu•linux-gcp-4.15
< 4.15.0-1086.98
- ubuntu•linux-gcp-5.3
all
- ubuntu•linux-gcp-5.4
< 5.4.0-1028.29~18.04.1
- ubuntu•linux-gcp-edge
all
- ubuntu•linux-gcp-fips
all | < 5.4.0-1067.71~20.04.1
- ubuntu•linux-gke
all
- ubuntu•linux-gke-4.15
< 4.15.0-1072.76
- ubuntu•linux-gke-5.0
< 5.0.0-1049.50
- ubuntu•linux-gke-5.3
< 5.3.0-1038.40
- ubuntu•linux-gke-5.4
< 5.4.0-1027.28~18.04.1
- ubuntu•linux-gkeop-5.4
< 5.4.0-1003.3
- ubuntu•linux-hwe
< 4.15.0-120.122~16.04.1 | < 5.3.0-68.63
- ubuntu•linux-hwe-5.4
< 5.4.0-51.56~18.04.1
- ubuntu•linux-hwe-edge
all | all
- ubuntu•linux-intel-iot-realtime
all
- ubuntu•linux-kvm
all | < 4.15.0-1077.79 | < 5.4.0-1026.27
- ubuntu•linux-lowlatency-hwe-6.2
all
- ubuntu•linux-lts-xenial
all
- ubuntu•linux-oem
< 4.15.0-1099.109
- ubuntu•linux-oem-5.6
< 5.6.0-1031.32
- ubuntu•linux-oem-osp1
< 5.0.0-1069.75
- ubuntu•linux-oracle
< 4.15.0-1056.61~16.04.1 | < 4.15.0-1057.62 | < 5.4.0-1028.29
- ubuntu•linux-oracle-5.0
all
- ubuntu•linux-oracle-5.3
all
- ubuntu•linux-oracle-5.4
< 5.4.0-1028.29~18.04.1
- ubuntu•linux-raspi
< 5.4.0-1021.24
- ubuntu•linux-raspi-5.4
< 5.4.0-1021.24~18.04.1
- ubuntu•linux-raspi-realtime
all
- ubuntu•linux-raspi2
< 4.15.0-1073.78 | all
- ubuntu•linux-raspi2-5.3
< 5.3.0-1035.37
Showing first 50 affected entries in server-rendered view.
References (18)
- https://ubuntu.com/USN-4576-1
- https://ubuntu.com/USN-4577-1
- https://ubuntu.com/USN-4578-1
- https://www.openwall.com/lists/oss-security/2020/10/14/2
- https://launchpad.net/bugs/1894980
- https://launchpad.net/bugs/1900141
- https://git.kernel.org/linus/56230d956739b9cb1cbde439d76227d77979a04d
- https://git.kernel.org/linus/48bd024b8a40d73ad6b086de2615738da0c7004f
- https://git.kernel.org/linus/05acefb4872dae89e772729efb194af754c877e8
- https://git.kernel.org/linus/d1d04ef8572bc8c22265057bd3d5a79f223f8f52
- https://git.kernel.org/linus/b6650dab404c701d7fe08a108b746542a934da84
- https://ubuntu.com/security/CVE-2020-16120
- https://www.openwall.com/lists/oss-security/2020/10/13/6
- https://ubuntu.com/security/notices/USN-4578-1
- https://ubuntu.com/security/notices/USN-4577-1
- https://ubuntu.com/security/notices/USN-4576-1
- https://www.cve.org/CVERecord?id=CVE-2020-16120
- https://security-tracker.debian.org/tracker/CVE-2020-16120