SecurityContext

CVE-2022-23040: Linux - Race Condition

  • Cve: CVE-2022-23040
  • Name: Linux - Race Condition
  • Description: 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 BUG_ON() 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
  • Impact: Attackers can cause data leaks, corruption, or denial of service by exploiting race conditions in grant reference management.
  • Remediation: Update to the latest kernel versions where these CVEs are addressed and apply security patches provided by the Linux distribution.
  • Vulnerability type: race_condition
  • Vulnerability impact: information_disclosure, data_tampering, denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7
  • Cvss vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.00365
  • Epss percentile: 0.30967
  • Assignee: [email protected]
  • Published at: 2022-03-10T20:15:08Z
  • Age in days: 1720
  • Modified at: 2026-06-17T04:29:24Z
  • References total: 2
  • Products total: 2
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-23040
  • Nvd status: modified
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, oss, projects total, projects, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-362Concurrent Execution using Shared Resource with Improper Synchronization

References

UrlSourceTags
https://lists.debian.org/debian-lts-announce/2022/07/msg00000.htmlnvdMailing List, Third Party Advisory
https://xenbits.xenproject.org/xsa/advisory-396.txtnvdThird Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
xen:xenall versionsnonvd/v1/products/xen/xen
debian:debian_linux= 9.0nonvd/v1/products/debian/debian_linux

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Authentication required: yes
  • Exposed hosts: 4739835
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports