CVE-2022-23040: Race Condition

Published Mar 10, 2022
·
Updated

Last updated 11 April 2025

Other sources

Linux PV device frontends vulnerable to attacks by backends T[his CNA information record relates to multiple CVEs; the text explains which aspects/vulnerabilities correspond to which CVE.] Several Linux PV device frontends are using the grant table interfaces for removing access rights of the backends in ways being subject to race conditions, resulting in potential data leaks, data corruption by malicious backends, and denial of service triggered by malicious backends: blkfront, netfront, scsifront and the gntalloc driver are testing whether a grant reference is still in use. If this is not the case, they assume that a following removal of the granted access will always succeed, which is not true in case the backend has mapped the granted page between those two operations. As a result the backend can keep access to the memory page of the guest no matter how the page will be used after the frontend I/O has finished. The xenbus driver has a similar problem, as it doesn't check the success of removing the granted access of a shared ring buffer. blkfront: CVE-2022-23036 netfront: CVE-2022-23037 scsifront: CVE-2022-23038 gntalloc: CVE-2022-23039 xenbus: CVE-2022-23040 blkfront, netfront, scsifront, usbfront, dmabuf, xenbus, 9p, kbdfront, and pvcalls are using a functionality to delay freeing a grant reference until it is no longer in use, but the freeing of the related data page is not synchronized with dropping the granted access. As a result the backend can keep access to the memory page even after it has been freed and then re-used for a different purpose. CVE-2022-23041 netfront will fail a BUGON() assertion if it fails to revoke access in the rx path. This will result in a Denial of Service (DoS) situation of the guest which can be triggered by the backend. CVE-2022-23042

— Launchpad

Affected Software

107 affected componentsFixes available
XEN Xen
Debian Debian Linux=9.0
debian/linux<5.16.14-1
5.16.14-1
debian/linux<5.16.14-1
5.16.14-1
debian/linux<5.16.14-1
5.16.14-1
ubuntu/linux-azure<4.15.0-1138.151~14.04.1
4.15.0-1138.151~14.04.1
ubuntu/linux-aws*
ubuntu/linux-lts-xenial*
ubuntu/linux-aws-hwe<4.15.0-1128.137~16.04.1
4.15.0-1128.137~16.04.1
ubuntu/linux-azure<4.15.0-1138.151~16.04.1
4.15.0-1138.151~16.04.1
ubuntu/linux-gcp<4.15.0-1122.136~16.04.1
4.15.0-1122.136~16.04.1
ubuntu/linux-hwe<4.15.0-177.186~16.04.1
4.15.0-177.186~16.04.1
ubuntu/linux-oracle<4.15.0-1093.102~16.04.1
4.15.0-1093.102~16.04.1
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-hwe-edge*
ubuntu/linux-kvm*
ubuntu/linux-fips*
ubuntu/linux-fips*
ubuntu/linux<4.15.0-177.186
4.15.0-177.186
ubuntu/linux-aws<4.15.0-1128.137
4.15.0-1128.137
ubuntu/linux-aws-5.4<5.4.0-1078.84~18.04.1
5.4.0-1078.84~18.04.1
ubuntu/linux-azure-4.15<4.15.0-1138.151
4.15.0-1138.151
ubuntu/linux-azure-5.4<5.4.0-1083.87~18.04.1
5.4.0-1083.87~18.04.1
ubuntu/linux-dell300x<4.15.0-1042.47
4.15.0-1042.47
ubuntu/linux-gcp-4.15<4.15.0-1122.136
4.15.0-1122.136
ubuntu/linux-gcp-5.4<5.4.0-1078.84~18.04.1
5.4.0-1078.84~18.04.1
ubuntu/linux-gke-5.4<5.4.0-1074.79~18.04.1
5.4.0-1074.79~18.04.1
ubuntu/linux-gkeop-5.4<5.4.0-1046.48~18.04.1
5.4.0-1046.48~18.04.1
ubuntu/linux-hwe-5.4<5.4.0-117.132~18.04.1
5.4.0-117.132~18.04.1
ubuntu/linux-ibm-5.4<5.4.0-1028.32~18.04.1
5.4.0-1028.32~18.04.1
ubuntu/linux-kvm<4.15.0-1114.117
4.15.0-1114.117
ubuntu/linux-oracle<4.15.0-1093.102
4.15.0-1093.102
ubuntu/linux-oracle-5.4<5.4.0-1076.83~18.04.1
5.4.0-1076.83~18.04.1
ubuntu/linux-raspi-5.4<5.4.0-1065.75~18.04.1
5.4.0-1065.75~18.04.1
ubuntu/linux-raspi2<4.15.0-1109.116
4.15.0-1109.116
ubuntu/linux-snapdragon<4.15.0-1127.136
4.15.0-1127.136
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-2067.70
4.15.0-2067.70
ubuntu/linux-azure-fips<4.15.0-2049.53
4.15.0-2049.53
ubuntu/linux-fips<4.15.0-1085.94
4.15.0-1085.94
ubuntu/linux-gcp-fips<4.15.0-2032.35
4.15.0-2032.35
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.4.0-117.132
5.4.0-117.132
ubuntu/linux-aws<5.4.0-1078.84
5.4.0-1078.84
ubuntu/linux-azure<5.4.0-1083.87
5.4.0-1083.87
ubuntu/linux-bluefield<5.4.0-1040.44
5.4.0-1040.44
ubuntu/linux-gcp<5.4.0-1078.84
5.4.0-1078.84
ubuntu/linux-gke<5.4.0-1074.79
5.4.0-1074.79
ubuntu/linux-gkeop<5.4.0-1046.48
5.4.0-1046.48
ubuntu/linux-ibm<5.4.0-1026.29
5.4.0-1026.29
ubuntu/linux-intel-iotg-5.15<5.15.0-1008.11~20.04.1
5.15.0-1008.11~20.04.1
ubuntu/linux-iot<5.4.0-1004.6
5.4.0-1004.6
ubuntu/linux-kvm<5.4.0-1068.72
5.4.0-1068.72
ubuntu/linux-oracle<5.4.0-1076.83
5.4.0-1076.83
ubuntu/linux-raspi<5.4.0-1065.75
5.4.0-1065.75
ubuntu/linux-aws-5.11*
ubuntu/linux-aws-5.13*
ubuntu/linux-aws-5.8*
ubuntu/linux-azure-5.11*
ubuntu/linux-azure-5.13*
ubuntu/linux-azure-5.8*
ubuntu/linux-gcp-5.11*
ubuntu/linux-gcp-5.13*
ubuntu/linux-gcp-5.8*
ubuntu/linux-hwe-5.11*
ubuntu/linux-hwe-5.13*
ubuntu/linux-hwe-5.8*
ubuntu/linux-intel-5.13*
ubuntu/linux-oem-5.10*
ubuntu/linux-oem-5.13*
ubuntu/linux-oem-5.6*
ubuntu/linux-oracle-5.11*
ubuntu/linux-oracle-5.13*
ubuntu/linux-oracle-5.8*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.11*
ubuntu/linux-riscv-5.8*
ubuntu/linux-aws-fips<5.4.0-1078.84+fips1
5.4.0-1078.84+fips1
ubuntu/linux-azure-fips<5.4.0-1083.87+fips1
5.4.0-1083.87+fips1
ubuntu/linux-fips<5.4.0-1054.61
5.4.0-1054.61
ubuntu/linux-gcp-fips<5.4.0-1078.84+fips1
5.4.0-1078.84+fips1
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-realtime<5.15.0-1007.7
5.15.0-1007.7
ubuntu/linux-raspi-realtime*
debian/linux
6.1.176-16.1.192-26.12.107-16.12.117-17.3.4-17.3.5-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 5.16.14-1
  2. Upgrade

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

    Fixed in 4.15.0-1138.151~14.04.1
  3. Upgrade

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

    Fixed in 4.15.0-1128.137~16.04.1
  4. Upgrade

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

    Fixed in 4.15.0-1138.151~16.04.1
  5. Upgrade

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

    Fixed in 4.15.0-1122.136~16.04.1
  6. Upgrade

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

    Fixed in 4.15.0-177.186~16.04.1
  7. Upgrade

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

    Fixed in 4.15.0-1093.102~16.04.1
  8. Upgrade

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

    Fixed in 4.15.0-177.186
  9. Upgrade

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

    Fixed in 4.15.0-1128.137
  10. Upgrade

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

    Fixed in 5.4.0-1078.84~18.04.1
  11. Upgrade

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

    Fixed in 4.15.0-1138.151
  12. Upgrade

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

    Fixed in 5.4.0-1083.87~18.04.1
  13. Upgrade

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

    Fixed in 4.15.0-1042.47
  14. Upgrade

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

    Fixed in 4.15.0-1122.136
  15. Upgrade

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

    Fixed in 5.4.0-1078.84~18.04.1
  16. Upgrade

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

    Fixed in 5.4.0-1074.79~18.04.1
  17. Upgrade

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

    Fixed in 5.4.0-1046.48~18.04.1
  18. Upgrade

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

    Fixed in 5.4.0-117.132~18.04.1
  19. Upgrade

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

    Fixed in 5.4.0-1028.32~18.04.1
  20. Upgrade

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

    Fixed in 4.15.0-1114.117
  21. Upgrade

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

    Fixed in 4.15.0-1093.102
  22. Upgrade

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

    Fixed in 5.4.0-1076.83~18.04.1
  23. Upgrade

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

    Fixed in 5.4.0-1065.75~18.04.1
  24. Upgrade

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

    Fixed in 4.15.0-1109.116
  25. Upgrade

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

    Fixed in 4.15.0-1127.136
  26. Upgrade

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

    Fixed in 4.15.0-2067.70
  27. Upgrade

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

    Fixed in 4.15.0-2049.53
  28. Upgrade

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

    Fixed in 4.15.0-1085.94
  29. Upgrade

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

    Fixed in 4.15.0-2032.35
  30. Upgrade

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

    Fixed in 5.4.0-117.132
  31. Upgrade

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

    Fixed in 5.4.0-1078.84
  32. Upgrade

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

    Fixed in 5.4.0-1083.87
  33. Upgrade

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

    Fixed in 5.4.0-1040.44
  34. Upgrade

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

    Fixed in 5.4.0-1078.84
  35. Upgrade

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

    Fixed in 5.4.0-1074.79
  36. Upgrade

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

    Fixed in 5.4.0-1046.48
  37. Upgrade

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

    Fixed in 5.4.0-1026.29
  38. Upgrade

    Upgrade ubuntu/linux-intel-iotg-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1008.11~20.04.1
  39. Upgrade

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

    Fixed in 5.4.0-1004.6
  40. Upgrade

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

    Fixed in 5.4.0-1068.72
  41. Upgrade

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

    Fixed in 5.4.0-1076.83
  42. Upgrade

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

    Fixed in 5.4.0-1065.75
  43. Upgrade

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

    Fixed in 5.4.0-1078.84+fips1
  44. Upgrade

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

    Fixed in 5.4.0-1083.87+fips1
  45. Upgrade

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

    Fixed in 5.4.0-1054.61
  46. Upgrade

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

    Fixed in 5.4.0-1078.84+fips1
  47. Upgrade

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

    Fixed in 5.15.0-1007.7
  48. Upgrade

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

    Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1

Event History

Mar 10, 2022
CVE Published
via MITRE·07:20 PM
Data Sourced
via MITRE·07:20 PM
DescriptionWeakness
Data Sourced
via OSV·08:15 PM
DescriptionSeverityAffected Software

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2022-23040?

CVE-2022-23040 has a high severity rating due to the potential for attackers to exploit vulnerabilities in Linux PV device frontends.

2

How do I fix CVE-2022-23040?

To fix CVE-2022-23040, update the Linux package to one of the secured versions such as 5.10.223-1 or higher.

3

What systems are affected by CVE-2022-23040?

CVE-2022-23040 affects various Linux distributions including Debian 9.0 and Xen unstable versions.

4

What types of attacks can CVE-2022-23040 facilitate?

CVE-2022-23040 can facilitate privilege escalation attacks by allowing malicious backends to exploit vulnerabilities in the frontend.

5

Is there a patch available for CVE-2022-23040?

Yes, patches for CVE-2022-23040 are available in the latest versions of the Linux package.

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