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

Published Oct 18, 2021
·
Updated

A vulnerability was found in btrfsalloctreeb in fs/btrfs/extent-tree.c in the Linux kernel due to an improper lock operation in btrfs. In this flaw, a user with a local privilege may cause a denial of service (DOS) due to a deadlock problem.

Other sources

In the Linux kernel before 5.14, an improper lock operation in btrfs allows users to crash the kernel or deadlock the system. The btrfs is returning to userspace when the lock is still held. In btrfsalloctreeblock(), after btrfsinitnewbuffer(), the new extent buffer @buf is locked, but if later operations like adding delayed tree ref fail, the kernel just free @buf without unlocking it, resulting in the deadlock.

References:

https://lkml.org/lkml/2021/10/18/885 https://lkml.org/lkml/2021/9/13/2565

— Red Hat

Affected Software

104 affected componentsFixes available
redhat/kernel<5.15
5.15
Linux Linux kernel<5.15
Linux Linux kernel=5.15
Linux Linux kernel=5.15-rc1
Linux Linux kernel=5.15-rc2
Linux Linux kernel=5.15-rc3
Linux Linux kernel=5.15-rc4
Linux Linux kernel=5.15-rc5
Debian Debian Linux=9.0
debian/linux<=5.10.223-1, <=5.10.234-1
6.1.129-16.1.135-16.12.25-16.12.27-1
ubuntu/linux-aws<4.4.0-1117.123
4.4.0-1117.123
ubuntu/linux-azure<4.15.0-1142.156~14.04.1
4.15.0-1142.156~14.04.1
ubuntu/linux-lts-xenial<4.4.0-239.273~14.04.1
4.4.0-239.273~14.04.1
ubuntu/linux<4.4.0-239.273
4.4.0-239.273
ubuntu/linux-aws<4.4.0-1155.170
4.4.0-1155.170
ubuntu/linux-aws-hwe<4.15.0-1133.143~16.04.1
4.15.0-1133.143~16.04.1
ubuntu/linux-azure<4.15.0-1142.156~16.04.1
4.15.0-1142.156~16.04.1
ubuntu/linux-gcp<4.15.0-1127.142~16.04.1
4.15.0-1127.142~16.04.1
ubuntu/linux-hwe<4.15.0-184.194~16.04.1
4.15.0-184.194~16.04.1
ubuntu/linux-kvm<4.4.0-1118.128
4.4.0-1118.128
ubuntu/linux-oracle<4.15.0-1098.108~16.04.1
4.15.0-1098.108~16.04.1
ubuntu/linux-hwe-edge*
ubuntu/linux-fips<4.4.0-1088.95
4.4.0-1088.95
ubuntu/linux-fips*
ubuntu/linux<4.15.0-184.194
4.15.0-184.194
ubuntu/linux-aws<4.15.0-1133.143
4.15.0-1133.143
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-1142.156
4.15.0-1142.156
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-1047.52
4.15.0-1047.52
ubuntu/linux-gcp-4.15<4.15.0-1127.142
4.15.0-1127.142
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-1119.123
4.15.0-1119.123
ubuntu/linux-oracle<4.15.0-1098.108
4.15.0-1098.108
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-1114.122
4.15.0-1114.122
ubuntu/linux-snapdragon<4.15.0-1132.142
4.15.0-1132.142
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-2072.76
4.15.0-2072.76
ubuntu/linux-azure-fips<4.15.0-2053.58
4.15.0-2053.58
ubuntu/linux-fips<4.15.0-1090.100
4.15.0-1090.100
ubuntu/linux-gcp-fips<4.15.0-2037.41
4.15.0-2037.41
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-hwe-5.13<5.13.0-23.23~20.04.2
5.13.0-23.23~20.04.2
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-1051.53
5.10.0-1051.53
ubuntu/linux-oem-5.13<5.13.0-1026.32
5.13.0-1026.32
ubuntu/linux-oem-5.14<5.14.0-1007.7
5.14.0-1007.7
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*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 5.15
  2. Upgrade

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

    Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1
  3. Upgrade

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

    Fixed in 4.4.0-1117.123
  4. Upgrade

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

    Fixed in 4.15.0-1142.156~14.04.1
  5. Upgrade

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

    Fixed in 4.4.0-239.273~14.04.1
  6. Upgrade

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

    Fixed in 4.4.0-239.273
  7. Upgrade

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

    Fixed in 4.4.0-1155.170
  8. Upgrade

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

    Fixed in 4.15.0-1133.143~16.04.1
  9. Upgrade

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

    Fixed in 4.15.0-1142.156~16.04.1
  10. Upgrade

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

    Fixed in 4.15.0-1127.142~16.04.1
  11. Upgrade

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

    Fixed in 4.15.0-184.194~16.04.1
  12. Upgrade

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

    Fixed in 4.4.0-1118.128
  13. Upgrade

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

    Fixed in 4.15.0-1098.108~16.04.1
  14. Upgrade

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

    Fixed in 4.4.0-1088.95
  15. Upgrade

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

    Fixed in 4.15.0-184.194
  16. Upgrade

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

    Fixed in 4.15.0-1133.143
  17. Upgrade

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

    Fixed in 5.4.0-1061.64~18.04.1
  18. Upgrade

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

    Fixed in 4.15.0-1142.156
  19. Upgrade

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

    Fixed in 5.4.0-1065.68~18.04.1
  20. Upgrade

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

    Fixed in 4.15.0-1047.52
  21. Upgrade

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

    Fixed in 4.15.0-1127.142
  22. Upgrade

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

    Fixed in 5.4.0-1059.63~18.04.1
  23. Upgrade

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

    Fixed in 5.4.0-1057.60~18.04.1
  24. Upgrade

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

    Fixed in 5.4.0-1029.30~18.04.2
  25. Upgrade

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

    Fixed in 5.4.0-92.103~18.04.2
  26. Upgrade

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

    Fixed in 4.15.0-1119.123
  27. Upgrade

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

    Fixed in 4.15.0-1098.108
  28. Upgrade

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

    Fixed in 5.4.0-1059.63~18.04.1
  29. Upgrade

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

    Fixed in 5.4.0-1048.53~18.04.1
  30. Upgrade

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

    Fixed in 4.15.0-1114.122
  31. Upgrade

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

    Fixed in 4.15.0-1132.142
  32. Upgrade

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

    Fixed in 4.15.0-2072.76
  33. Upgrade

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

    Fixed in 4.15.0-2053.58
  34. Upgrade

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

    Fixed in 4.15.0-1090.100
  35. Upgrade

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

    Fixed in 4.15.0-2037.41
  36. Upgrade

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

    Fixed in 5.4.0-92.103
  37. Upgrade

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

    Fixed in 5.4.0-1061.64
  38. Upgrade

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

    Fixed in 5.11.0-1023.24~20.04.1
  39. Upgrade

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

    Fixed in 5.4.0-1065.68
  40. Upgrade

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

    Fixed in 5.11.0-1023.24~20.04.1
  41. Upgrade

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

    Fixed in 5.4.0-1023.26
  42. Upgrade

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

    Fixed in 5.4.0-1059.63
  43. Upgrade

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

    Fixed in 5.11.0-1024.26~20.04.1
  44. Upgrade

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

    Fixed in 5.4.0-1057.60
  45. Upgrade

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

    Fixed in 5.4.0-1029.30
  46. Upgrade

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

    Fixed in 5.13.0-23.23~20.04.2
  47. Upgrade

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

    Fixed in 5.4.0-1010.11
  48. Upgrade

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

    Fixed in 5.4.0-1051.53
  49. Upgrade

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

    Fixed in 5.10.0-1051.53
  50. Upgrade

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

    Fixed in 5.13.0-1026.32
  51. Upgrade

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

    Fixed in 5.14.0-1007.7
  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 Linux kernel to a version that resolves this vulnerability.

    Fixed in 5.14

Event History

Oct 18, 2021
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeakness
Mar 23, 2022
CVE Published
via MITRE·07:46 PM
Data Sourced
via MITRE·07:46 PM
DescriptionWeakness
Data Sourced
via OSV·08:15 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2021-4149?

CVE-2021-4149 is classified as a denial of service vulnerability due to a potential deadlock problem in the Linux kernel.

2

How do I fix CVE-2021-4149?

To remediate CVE-2021-4149, upgrade the Linux kernel to version 5.15 or later.

3

Which Linux kernel versions are affected by CVE-2021-4149?

CVE-2021-4149 affects Linux kernel versions prior to 5.15.

4

Can CVE-2021-4149 be exploited remotely?

CVE-2021-4149 requires local privileges to exploit, meaning it cannot be done remotely by an external attacker.

5

What kind of systems are vulnerable to CVE-2021-4149?

Systems running an affected version of the Linux kernel prior to 5.15 are vulnerable to CVE-2021-4149.

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