CVE-2021-4155: Medium severity Linux Linux kernel vulnerability

Published Dec 22, 2021
·
Updated

A data leak flaw was found in the way XFSIOCALLOCSP IOCTL in the XFS filesystem allowed for size increase of files with unaligned size. A local attacker could use this flaw to leak data on the XFS filesystem otherwise not accessible to them.

Affected Software

18 affected componentsFixes available
redhat/kernel<0:2.6.32-754.47.1.el6
0:2.6.32-754.47.1.el6
redhat/kernel-rt<0:3.10.0-1160.59.1.rt56.1200.el7
0:3.10.0-1160.59.1.rt56.1200.el7
redhat/kernel<0:3.10.0-1160.59.1.el7
0:3.10.0-1160.59.1.el7
redhat/kernel<0:3.10.0-514.97.1.el7
0:3.10.0-514.97.1.el7
redhat/kernel<0:3.10.0-693.96.1.el7
0:3.10.0-693.96.1.el7
redhat/kernel<0:3.10.0-957.88.1.el7
0:3.10.0-957.88.1.el7
redhat/kernel<0:3.10.0-1062.63.1.el7
0:3.10.0-1062.63.1.el7
redhat/kernel-rt<0:4.18.0-348.12.2.rt7.143.el8_5
0:4.18.0-348.12.2.rt7.143.el8_5
redhat/kernel<0:4.18.0-348.12.2.el8_5
0:4.18.0-348.12.2.el8_5
redhat/kernel<0:4.18.0-147.59.1.el8_1
0:4.18.0-147.59.1.el8_1
redhat/kernel-rt<0:4.18.0-193.75.1.rt13.125.el8_2
0:4.18.0-193.75.1.rt13.125.el8_2
redhat/kernel<0:4.18.0-193.75.1.el8_2
0:4.18.0-193.75.1.el8_2
redhat/kernel-rt<0:4.18.0-305.34.2.rt7.107.el8_4
0:4.18.0-305.34.2.rt7.107.el8_4
redhat/kernel<0:4.18.0-305.34.2.el8_4
0:4.18.0-305.34.2.el8_4
redhat/redhat-virtualization-host<0:4.3.22-20220330.1.el7_9
0:4.3.22-20220330.1.el7_9
Linux Linux kernel<5.16
redhat/Kernel<5.16
5.16
debian/linux
5.10.223-15.10.249-16.1.159-16.1.162-16.12.63-16.12.73-16.18.12-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 0:2.6.32-754.47.1.el6
  2. Upgrade

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

    Fixed in 0:3.10.0-1160.59.1.rt56.1200.el7
  3. Upgrade

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

    Fixed in 0:3.10.0-1160.59.1.el7
  4. Upgrade

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

    Fixed in 0:3.10.0-514.97.1.el7
  5. Upgrade

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

    Fixed in 0:3.10.0-693.96.1.el7
  6. Upgrade

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

    Fixed in 0:3.10.0-957.88.1.el7
  7. Upgrade

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

    Fixed in 0:3.10.0-1062.63.1.el7
  8. Upgrade

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

    Fixed in 0:4.18.0-348.12.2.rt7.143.el8_5
  9. Upgrade

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

    Fixed in 0:4.18.0-348.12.2.el8_5
  10. Upgrade

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

    Fixed in 0:4.18.0-147.59.1.el8_1
  11. Upgrade

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

    Fixed in 0:4.18.0-193.75.1.rt13.125.el8_2
  12. Upgrade

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

    Fixed in 0:4.18.0-193.75.1.el8_2
  13. Upgrade

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

    Fixed in 0:4.18.0-305.34.2.rt7.107.el8_4
  14. Upgrade

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

    Fixed in 0:4.18.0-305.34.2.el8_4
  15. Upgrade

    Upgrade redhat/redhat-virtualization-host to a version that resolves this vulnerability.

    Fixed in 0:4.3.22-20220330.1.el7_9
  16. Upgrade

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

    Fixed in 5.10.223-1Fixed in 5.10.249-1Fixed in 6.1.159-1Fixed in 6.1.162-1Fixed in 6.12.63-1Fixed in 6.12.73-1Fixed in 6.18.12-1
  17. Upgrade

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

    Fixed in 5.16
  18. Compensating control

    Deploy the SystemTap mitigation for XFS by saving the CVE-2021-4155.stp script, ensuring xfs_alloc_file_space is not called with 0 as an argument, and resetting 0 with XFS_BMAPI_PREALLOC. Use $alloc_type = 0x40 for Red Hat Enterprise Linux 6 and $alloc_type = 0x8 for Red Hat Enterprise Linux 7 onwards.

  19. Operational

    Install the required packages with `yum install -y kernel-devel kernel-debuginfo` and `yum install -y systemtap systemtap-runtime`, then build the mitigation kernel module as root with `stap -r \`uname -r\` -m cve_2021_4155.ko -g CVE-2021-4155.stp -p4` and load it as root with `staprun -L cve_2021_4155.ko`.

Event History

Dec 22, 2021
Data Sourced
via Red Hat·08:55 AM
DescriptionSeverityAffected Software
Jan 10, 2022
CVE Published
06:36 AM
Aug 24, 2022
CVE Published
via MITRE·03:10 PM
Data Sourced
via MITRE·03:10 PM
DescriptionWeakness
Jan 12, 2024
Data Sourced
via Launchpad·12:01 AM
Description
May 2, 2025
Data Sourced
via Ubuntu·04:35 AM
RemedyDescriptionSeverityAffected Software
Feb 24, 2026
Data Sourced
via Debian·10:50 PM
DescriptionAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2021-4155?

CVE-2021-4155 is classified as a medium severity vulnerability due to its data leak implications.

2

How do I fix CVE-2021-4155?

To fix CVE-2021-4155, update your system to the appropriate kernel versions or apply available patches.

3

Who is affected by CVE-2021-4155?

CVE-2021-4155 affects local users with access to systems running specific versions of the XFS filesystem.

4

What type of vulnerability is CVE-2021-4155?

CVE-2021-4155 is a data leak vulnerability that allows unauthorized access to potentially sensitive information.

5

Can CVE-2021-4155 be exploited remotely?

No, CVE-2021-4155 requires local access, making it less likely to be exploited remotely.

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