CVE-2021-4037: Kernel: security regression for cve-2018-13405

Published Sep 16, 2021
·
Updated

A vulnerability was found in the fs/inode.c:inodeinitowner() function logic of the LInux kernel that allows local users to create files for the XFS file-system with an unintended group ownership and with group execution and SGID permission bits set, in a scenario where a directory is SGID and belongs to a certain group and is writable by a user who is not a member of this group. This can lead to excessive permissions granted in case when they should not. This vulnerability is similar to the previous CVE-2018-13405 and adds the missed fix for the XFS.

Other sources

A vulnerability was found in the fs/inode.c:inodeinitowner() function logic of the Linux kernel that allows local users to create files for the XFS file-system with unintended group ownership and with group execution and SGID permission bits set, in a scenario where a directory is SGID and belongs to a certain group and is writable by a user who is not a member of this group. This can lead to excessive permissions granted in case when they should not. This vulnerability is similar to the previous CVE-2018-13405 and adds the missed fix for the XFS.

Reference:

https://bugzilla.redhat.com/showbug.cgi?id=2004810

— Red Hat

Affected Software

101 affected componentsFixes available
redhat/kernel-rt<0:4.18.0-372.9.1.rt7.166.el8
0:4.18.0-372.9.1.rt7.166.el8
redhat/kernel<0:4.18.0-372.9.1.el8
0:4.18.0-372.9.1.el8
redhat/kernel-rt<0:4.18.0-305.49.1.rt7.121.el8_4
0:4.18.0-305.49.1.rt7.121.el8_4
redhat/kernel<0:4.18.0-305.49.1.el8_4
0:4.18.0-305.49.1.el8_4
redhat/linux kernel<5.11
5.11
Linux Linux kernel<5.11
Debian Debian Linux=10.0
Debian Debian Linux=11.0
ubuntu/linux-aws<4.4.0-1113.119
4.4.0-1113.119
ubuntu/linux-azure<4.15.0-1129.142~14.04.1
4.15.0-1129.142~14.04.1
ubuntu/linux-lts-xenial<4.4.0-234.268~14.04.1
4.4.0-234.268~14.04.1
ubuntu/linux*
ubuntu/linux<4.4.0-234.268
4.4.0-234.268
ubuntu/linux-aws<4.4.0-1151.166
4.4.0-1151.166
ubuntu/linux-aws-hwe<4.15.0-1118.125~16.04.1
4.15.0-1118.125~16.04.1
ubuntu/linux-azure<4.15.0-1129.142~16.04.1
4.15.0-1129.142~16.04.1
ubuntu/linux-gcp<4.15.0-1114.128~16.04.1
4.15.0-1114.128~16.04.1
ubuntu/linux-hwe<4.15.0-166.174~16.04.1
4.15.0-166.174~16.04.1
ubuntu/linux-kvm<4.4.0-1114.124
4.4.0-1114.124
ubuntu/linux-oracle<4.15.0-1085.93~16.04.1
4.15.0-1085.93~16.04.1
ubuntu/linux-hwe-edge*
ubuntu/linux-fips<4.4.0-1083.90
4.4.0-1083.90
ubuntu/linux-fips*
ubuntu/linux<4.15.0-166.174
4.15.0-166.174
ubuntu/linux-aws<4.15.0-1118.125
4.15.0-1118.125
ubuntu/linux-aws-5.4<5.4.0-1061.64~18.04.1
5.4.0-1061.64~18.04.1
ubuntu/linux-azure-4.15<4.15.0-1129.142
4.15.0-1129.142
ubuntu/linux-azure-5.4<5.4.0-1065.68~18.04.1
5.4.0-1065.68~18.04.1
ubuntu/linux-dell300x<4.15.0-1033.38
4.15.0-1033.38
ubuntu/linux-gcp-4.15<4.15.0-1114.128
4.15.0-1114.128
ubuntu/linux-gcp-5.4<5.4.0-1059.63~18.04.1
5.4.0-1059.63~18.04.1
ubuntu/linux-gke-5.4<5.4.0-1057.60~18.04.1
5.4.0-1057.60~18.04.1
ubuntu/linux-gkeop-5.4<5.4.0-1029.30~18.04.2
5.4.0-1029.30~18.04.2
ubuntu/linux-hwe-5.4<5.4.0-92.103~18.04.2
5.4.0-92.103~18.04.2
ubuntu/linux-kvm<4.15.0-1105.107
4.15.0-1105.107
ubuntu/linux-oracle<4.15.0-1085.93
4.15.0-1085.93
ubuntu/linux-oracle-5.4<5.4.0-1059.63~18.04.1
5.4.0-1059.63~18.04.1
ubuntu/linux-raspi-5.4<5.4.0-1048.53~18.04.1
5.4.0-1048.53~18.04.1
ubuntu/linux-raspi2<4.15.0-1101.108
4.15.0-1101.108
ubuntu/linux-snapdragon<4.15.0-1118.127
4.15.0-1118.127
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-azure*
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.3*
ubuntu/linux-gke-4.15*
ubuntu/linux-hwe*
ubuntu/linux-hwe-edge*
ubuntu/linux-oem*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-aws-fips<4.15.0-2059.61
4.15.0-2059.61
ubuntu/linux-azure-fips<4.15.0-2041.45
4.15.0-2041.45
ubuntu/linux-fips<4.15.0-1075.84
4.15.0-1075.84
ubuntu/linux-gcp-fips<4.15.0-2024.26
4.15.0-2024.26
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.4.0-92.103
5.4.0-92.103
ubuntu/linux-aws<5.4.0-1061.64
5.4.0-1061.64
ubuntu/linux-aws-5.11<5.11.0-1023.24~20.04.1
5.11.0-1023.24~20.04.1
ubuntu/linux-azure<5.4.0-1065.68
5.4.0-1065.68
ubuntu/linux-azure-5.11<5.11.0-1023.24~20.04.1
5.11.0-1023.24~20.04.1
ubuntu/linux-bluefield<5.4.0-1023.26
5.4.0-1023.26
ubuntu/linux-gcp<5.4.0-1059.63
5.4.0-1059.63
ubuntu/linux-gcp-5.11<5.11.0-1024.26~20.04.1
5.11.0-1024.26~20.04.1
ubuntu/linux-gke<5.4.0-1057.60
5.4.0-1057.60
ubuntu/linux-gkeop<5.4.0-1029.30
5.4.0-1029.30
ubuntu/linux-ibm<5.4.0-1010.11
5.4.0-1010.11
ubuntu/linux-kvm<5.4.0-1051.53
5.4.0-1051.53
ubuntu/linux-oem-5.10<5.10.0-1052.54
5.10.0-1052.54
ubuntu/linux-oracle<5.4.0-1059.63
5.4.0-1059.63
ubuntu/linux-oracle-5.11<5.11.0-1023.24~20.04.1
5.11.0-1023.24~20.04.1
ubuntu/linux-raspi<5.4.0-1048.53
5.4.0-1048.53
ubuntu/linux-riscv-5.11<5.11.0-1024.25~20.04.1
5.11.0-1024.25~20.04.1
ubuntu/linux-aws-5.8*
ubuntu/linux-azure-5.8*
ubuntu/linux-gcp-5.8*
ubuntu/linux-hwe-5.11*
ubuntu/linux-hwe-5.8*
ubuntu/linux-intel-5.13*
ubuntu/linux-oem-5.6*
ubuntu/linux-oracle-5.8*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.8*
ubuntu/linux-aws-fips<5.4.0-1069.73+fips2
5.4.0-1069.73+fips2
ubuntu/linux-azure-fips<5.4.0-1073.76+fips1
5.4.0-1073.76+fips1
ubuntu/linux-fips<5.4.0-1038.44
5.4.0-1038.44
ubuntu/linux-gcp-fips<5.4.0-1067.71~20.04.1
5.4.0-1067.71~20.04.1
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-realtime*
ubuntu/linux-raspi-realtime*
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/kernel-rt to a version that resolves this vulnerability.

    Fixed in 0:4.18.0-372.9.1.rt7.166.el8
  2. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 0:4.18.0-372.9.1.el8
  3. Upgrade

    Upgrade redhat/kernel-rt to a version that resolves this vulnerability.

    Fixed in 0:4.18.0-305.49.1.rt7.121.el8_4
  4. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 0:4.18.0-305.49.1.el8_4
  5. Upgrade

    Upgrade redhat/Linux kernel to a version that resolves this vulnerability.

    Fixed in 5.11
  6. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 4.4.0-1113.119
  7. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 4.15.0-1129.142~14.04.1
  8. Upgrade

    Upgrade ubuntu/linux-lts-xenial to a version that resolves this vulnerability.

    Fixed in 4.4.0-234.268~14.04.1
  9. Upgrade

    Upgrade ubuntu/linux to a version that resolves this vulnerability.

    Fixed in 4.4.0-234.268
  10. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 4.4.0-1151.166
  11. Upgrade

    Upgrade ubuntu/linux-aws-hwe to a version that resolves this vulnerability.

    Fixed in 4.15.0-1118.125~16.04.1
  12. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 4.15.0-1129.142~16.04.1
  13. Upgrade

    Upgrade ubuntu/linux-gcp to a version that resolves this vulnerability.

    Fixed in 4.15.0-1114.128~16.04.1
  14. Upgrade

    Upgrade ubuntu/linux-hwe to a version that resolves this vulnerability.

    Fixed in 4.15.0-166.174~16.04.1
  15. Upgrade

    Upgrade ubuntu/linux-kvm to a version that resolves this vulnerability.

    Fixed in 4.4.0-1114.124
  16. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 4.15.0-1085.93~16.04.1
  17. Upgrade

    Upgrade ubuntu/linux-fips to a version that resolves this vulnerability.

    Fixed in 4.4.0-1083.90
  18. Upgrade

    Upgrade ubuntu/linux to a version that resolves this vulnerability.

    Fixed in 4.15.0-166.174
  19. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 4.15.0-1118.125
  20. Upgrade

    Upgrade ubuntu/linux-aws-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1061.64~18.04.1
  21. Upgrade

    Upgrade ubuntu/linux-azure-4.15 to a version that resolves this vulnerability.

    Fixed in 4.15.0-1129.142
  22. Upgrade

    Upgrade ubuntu/linux-azure-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1065.68~18.04.1
  23. Upgrade

    Upgrade ubuntu/linux-dell300x to a version that resolves this vulnerability.

    Fixed in 4.15.0-1033.38
  24. Upgrade

    Upgrade ubuntu/linux-gcp-4.15 to a version that resolves this vulnerability.

    Fixed in 4.15.0-1114.128
  25. Upgrade

    Upgrade ubuntu/linux-gcp-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1059.63~18.04.1
  26. Upgrade

    Upgrade ubuntu/linux-gke-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1057.60~18.04.1
  27. Upgrade

    Upgrade ubuntu/linux-gkeop-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1029.30~18.04.2
  28. Upgrade

    Upgrade ubuntu/linux-hwe-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-92.103~18.04.2
  29. Upgrade

    Upgrade ubuntu/linux-kvm to a version that resolves this vulnerability.

    Fixed in 4.15.0-1105.107
  30. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 4.15.0-1085.93
  31. Upgrade

    Upgrade ubuntu/linux-oracle-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1059.63~18.04.1
  32. Upgrade

    Upgrade ubuntu/linux-raspi-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1048.53~18.04.1
  33. Upgrade

    Upgrade ubuntu/linux-raspi2 to a version that resolves this vulnerability.

    Fixed in 4.15.0-1101.108
  34. Upgrade

    Upgrade ubuntu/linux-snapdragon to a version that resolves this vulnerability.

    Fixed in 4.15.0-1118.127
  35. Upgrade

    Upgrade ubuntu/linux-aws-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-2059.61
  36. Upgrade

    Upgrade ubuntu/linux-azure-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-2041.45
  37. Upgrade

    Upgrade ubuntu/linux-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-1075.84
  38. Upgrade

    Upgrade ubuntu/linux-gcp-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-2024.26
  39. Upgrade

    Upgrade ubuntu/linux to a version that resolves this vulnerability.

    Fixed in 5.4.0-92.103
  40. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 5.4.0-1061.64
  41. Upgrade

    Upgrade ubuntu/linux-aws-5.11 to a version that resolves this vulnerability.

    Fixed in 5.11.0-1023.24~20.04.1
  42. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 5.4.0-1065.68
  43. Upgrade

    Upgrade ubuntu/linux-azure-5.11 to a version that resolves this vulnerability.

    Fixed in 5.11.0-1023.24~20.04.1
  44. Upgrade

    Upgrade ubuntu/linux-bluefield to a version that resolves this vulnerability.

    Fixed in 5.4.0-1023.26
  45. Upgrade

    Upgrade ubuntu/linux-gcp to a version that resolves this vulnerability.

    Fixed in 5.4.0-1059.63
  46. Upgrade

    Upgrade ubuntu/linux-gcp-5.11 to a version that resolves this vulnerability.

    Fixed in 5.11.0-1024.26~20.04.1
  47. Upgrade

    Upgrade ubuntu/linux-gke to a version that resolves this vulnerability.

    Fixed in 5.4.0-1057.60
  48. Upgrade

    Upgrade ubuntu/linux-gkeop to a version that resolves this vulnerability.

    Fixed in 5.4.0-1029.30
  49. Upgrade

    Upgrade ubuntu/linux-ibm to a version that resolves this vulnerability.

    Fixed in 5.4.0-1010.11
  50. Upgrade

    Upgrade ubuntu/linux-kvm to a version that resolves this vulnerability.

    Fixed in 5.4.0-1051.53
  51. Upgrade

    Upgrade ubuntu/linux-oem-5.10 to a version that resolves this vulnerability.

    Fixed in 5.10.0-1052.54
  52. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 5.4.0-1059.63
  53. Upgrade

    Upgrade ubuntu/linux-oracle-5.11 to a version that resolves this vulnerability.

    Fixed in 5.11.0-1023.24~20.04.1
  54. Upgrade

    Upgrade ubuntu/linux-raspi to a version that resolves this vulnerability.

    Fixed in 5.4.0-1048.53
  55. Upgrade

    Upgrade ubuntu/linux-riscv-5.11 to a version that resolves this vulnerability.

    Fixed in 5.11.0-1024.25~20.04.1
  56. Upgrade

    Upgrade ubuntu/linux-aws-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1069.73+fips2
  57. Upgrade

    Upgrade ubuntu/linux-azure-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1073.76+fips1
  58. Upgrade

    Upgrade ubuntu/linux-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1038.44
  59. Upgrade

    Upgrade ubuntu/linux-gcp-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1067.71~20.04.1
  60. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1

Event History

Sep 16, 2021
CVE Published
09:00 AM
Aug 24, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via OSV·04:15 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2021-4037?

CVE-2021-4037 is classified as a high severity vulnerability due to its impact on file permissions and ownership.

2

Who is affected by CVE-2021-4037?

CVE-2021-4037 affects local users on Linux systems utilizing the XFS file system and specific kernel versions.

3

How do I fix CVE-2021-4037?

To fix CVE-2021-4037, update to the recommended kernel versions specified in the advisory.

4

What version of the Linux kernel addresses CVE-2021-4037?

The vulnerability CVE-2021-4037 is addressed in specific versions like 0:4.18.0-372.9.1.el8 and higher.

5

Can CVE-2021-4037 lead to unauthorized access?

Yes, CVE-2021-4037 can allow unauthorized group ownership and execution permissions, potentially leading to privilege escalation.

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