CVE-2026-99340 (GCVE-0-2026-99340)

Vulnerability from cvelistv5 – Published: 2026-11-19 14:21 – Updated: 2026-11-22 11:07
VLAI
Title
KVM: x86: Take SRCU in kvm_zap_gfn_range()
Summary
In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Take SRCU in kvm_zap_gfn_range() kvm_zap_gfn_range() walks memslots and rmaps and may drop mmu_lock to reschedule. Callers that do not already hold kvm->srcu (or slots_lock) can race with memslot deletion: synchronize_srcu_expedited() does not wait, kvm_free_memslot() frees the old slot and its rmap, and the zap resumes on freed memory. The VFIO noncoherent-DMA path hits this by zapping the entire GPA space without SRCU. KASAN reported: BUG: KASAN: vmalloc-out-of-bounds in slot_rmap_walk_next+0x82/0x1c0 Read of size 8 at addr ffffc900005c1008 Call Trace: slot_rmap_walk_next+0x82/0x1c0 __kvm_rmap_zap_gfn_range+0x17a/0x280 kvm_zap_gfn_range+0x2a6/0x6a0 kvm_vfio_set_attr+0x576/0x770 kvm_device_ioctl+0x1ff/0x3b0 Take SRCU inside kvm_zap_gfn_range() so every caller is covered. Nesting with an existing kvm->srcu critical section is fine; the helper uses a local index. Drop the now-redundant SRCU pair from __kvm_set_or_clear_apicv_inhibit().
Impacted products
Vendor Product Version
Linux Linux Affected: 362ff6dca5416e20646badf09394b9a8bfc000db , < 9d119b4921ac74bc606917fd274c10c966fa5b72 (git)
Affected: 362ff6dca5416e20646badf09394b9a8bfc000db , < ec9df57c8e00f189d58d927cc9a1f49592f687af (git)
Affected: 362ff6dca5416e20646badf09394b9a8bfc000db , < e34057e59ed784a37657835aac9f54eec0864342 (git)
Affected: 362ff6dca5416e20646badf09394b9a8bfc000db , < b59a87c1ba3c347e8aec5f932eb7abf13064fd62 (git)
Create a notification for this product.
Linux Linux Affected: 6.7
Unaffected: 0 , < 6.7 (semver)
Unaffected: 6.12.117 , ≤ 6.12.* (semver)
Unaffected: 6.18.61 , ≤ 6.18.* (semver)
Unaffected: 7.3.2 , ≤ 7.3.* (semver)
Unaffected: 7.4-rc1 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/x86/kvm/mmu/mmu.c",
            "arch/x86/kvm/x86.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "9d119b4921ac74bc606917fd274c10c966fa5b72",
              "status": "affected",
              "version": "362ff6dca5416e20646badf09394b9a8bfc000db",
              "versionType": "git"
            },
            {
              "lessThan": "ec9df57c8e00f189d58d927cc9a1f49592f687af",
              "status": "affected",
              "version": "362ff6dca5416e20646badf09394b9a8bfc000db",
              "versionType": "git"
            },
            {
              "lessThan": "e34057e59ed784a37657835aac9f54eec0864342",
              "status": "affected",
              "version": "362ff6dca5416e20646badf09394b9a8bfc000db",
              "versionType": "git"
            },
            {
              "lessThan": "b59a87c1ba3c347e8aec5f932eb7abf13064fd62",
              "status": "affected",
              "version": "362ff6dca5416e20646badf09394b9a8bfc000db",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/x86/kvm/mmu/mmu.c",
            "arch/x86/kvm/x86.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.7"
            },
            {
              "lessThan": "6.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.117",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.61",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.117",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.61",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3.2",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.4-rc1",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86: Take SRCU in kvm_zap_gfn_range()\n\nkvm_zap_gfn_range() walks memslots and rmaps and may drop mmu_lock to\nreschedule. Callers that do not already hold kvm-\u003esrcu (or slots_lock)\ncan race with memslot deletion: synchronize_srcu_expedited() does not\nwait, kvm_free_memslot() frees the old slot and its rmap, and the zap\nresumes on freed memory.\n\nThe VFIO noncoherent-DMA path hits this by zapping the entire GPA\nspace without SRCU. KASAN reported:\n\n  BUG: KASAN: vmalloc-out-of-bounds in slot_rmap_walk_next+0x82/0x1c0\n  Read of size 8 at addr ffffc900005c1008\n  Call Trace:\n   slot_rmap_walk_next+0x82/0x1c0\n   __kvm_rmap_zap_gfn_range+0x17a/0x280\n   kvm_zap_gfn_range+0x2a6/0x6a0\n   kvm_vfio_set_attr+0x576/0x770\n   kvm_device_ioctl+0x1ff/0x3b0\n\nTake SRCU inside kvm_zap_gfn_range() so every caller is covered.\nNesting with an existing kvm-\u003esrcu critical section is fine; the\nhelper uses a local index. Drop the now-redundant SRCU pair from\n__kvm_set_or_clear_apicv_inhibit()."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - kvm_zap_gfn_range() is reached from local kvm_device_ioctl() KVM_SET_DEVICE_ATTR on the kvm-vfio fd: kvm_vfio_set_attr() calls kvm_vfio_update_coherency(), which on a noncoherent VFIO file calls kvm_arch_register_noncoherent_dma() and kvm_noncoherent_dma_assignment_start_or_stop() to zap GPA 0..~0. No remote peer supplies the raced memslot or the VFIO fd.\nAC:L - The VM owner allocates rmaps by entering nested EPT (nested=1): kvm_init_shadow_ept_mmu() sets root_role.direct=false, and mmu_alloc_shadow_roots() reaches memslot_rmap_alloc() via mmu_first_shadow_root_alloc(). It races KVM_SET_DEVICE_ATTR with KVM_SET_USER_MEMORY_REGION deletion. __walk_slot_rmaps() drops mmu_lock via cond_resched_rwlock_write(), so synchronize_srcu_expedited() in kvm_swap_active_memslots() returns before kvm_free_memslot().\nPR:L - kvm_device_ioctl() admits the caller when dev-\u003ekvm-\u003emm == current-\u003emm and does not check CAP_SYS_ADMIN. vfio_group_fops_open() and vfio_device_fops_cdev_open() likewise require no admin capability for an IOMMU-backed node (CAP_SYS_RAWIO is only the noiommu case). A local VM owner who can open /dev/kvm and that VFIO node can issue both ioctls.\nUI:N - The attacker opens /dev/kvm, creates the KVM_DEV_TYPE_VFIO device, and issues KVM_SET_DEVICE_ATTR and KVM_SET_USER_MEMORY_REGION on fds it already holds.\nS:U - The use-after-free is of the host memslot rmap freed by kvm_free_memslot() during a host ioctl, so the VM-owner process corrupts host kernel memory. Guest RMP faults call sev_handle_rmp_fault() only from npf_interception() under the kvm-\u003esrcu read lock taken in kvm_arch_vcpu_ioctl_run(), which already covered that caller.\nC:H - slot_rmap_walk_next() resumes on the rmap vfree\u0027d by memslot_rmap_free() and atomic_long_reads rmap-\u003eval (the reported KASAN vmalloc-out-of-bounds read of 8 bytes). kvm_zap_all_rmap_sptes() then treats a non-zero value as an SPTE pointer or a pte_list_desc and reads through it, so reclaimed rmap contents become a kernel read primitive.\nI:H - kvm_zap_all_rmap_sptes() cmpxchg-writes KVM_RMAP_LOCKED into the freed rmap_head, then mmu_spte_clear_track_bits() stores SHADOW_NONPRESENT_VALUE through the embedded pointer, or kmem_cache_frees the pte_list_desc chain when KVM_RMAP_MANY is set. Reclaiming the vmalloc rmap therefore yields a kernel write and free.\nA:H - Continuing the walk after vfree faults on the unmapped vmalloc rmap or hits the KASAN vmalloc-out-of-bounds read in slot_rmap_walk_next() from kvm_vfio_set_attr(). A reclaimed non-pointer value passed to mmu_spte_clear_track_bits() also oopses the host."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-11-22T11:07:44.543Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/9d119b4921ac74bc606917fd274c10c966fa5b72"
        },
        {
          "url": "https://git.kernel.org/stable/c/ec9df57c8e00f189d58d927cc9a1f49592f687af"
        },
        {
          "url": "https://git.kernel.org/stable/c/e34057e59ed784a37657835aac9f54eec0864342"
        },
        {
          "url": "https://git.kernel.org/stable/c/b59a87c1ba3c347e8aec5f932eb7abf13064fd62"
        }
      ],
      "title": "KVM: x86: Take SRCU in kvm_zap_gfn_range()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-99340",
    "datePublished": "2026-11-19T14:21:48.075Z",
    "dateReserved": "2026-09-25T10:25:14.409Z",
    "dateUpdated": "2026-11-22T11:07:44.543Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-99340",
      "date": "2026-11-22",
      "epss": "0.00221",
      "percentile": "0.12705"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "arch/x86/kvm/mmu/mmu.c",
                  "arch/x86/kvm/x86.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "9d119b4921ac74bc606917fd274c10c966fa5b72",
                    "status": "affected",
                    "version": "362ff6dca5416e20646badf09394b9a8bfc000db",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "ec9df57c8e00f189d58d927cc9a1f49592f687af",
                    "status": "affected",
                    "version": "362ff6dca5416e20646badf09394b9a8bfc000db",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "e34057e59ed784a37657835aac9f54eec0864342",
                    "status": "affected",
                    "version": "362ff6dca5416e20646badf09394b9a8bfc000db",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "b59a87c1ba3c347e8aec5f932eb7abf13064fd62",
                    "status": "affected",
                    "version": "362ff6dca5416e20646badf09394b9a8bfc000db",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "arch/x86/kvm/mmu/mmu.c",
                  "arch/x86/kvm/x86.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "6.7"
                  },
                  {
                    "lessThan": "6.7",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.12.*",
                    "status": "unaffected",
                    "version": "6.12.117",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.18.*",
                    "status": "unaffected",
                    "version": "6.18.61",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "7.3.*",
                    "status": "unaffected",
                    "version": "7.3.2",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "7.4-rc1",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: x86: Take SRCU in kvm_zap_gfn_range()\n\nkvm_zap_gfn_range() walks memslots and rmaps and may drop mmu_lock to\nreschedule. Callers that do not already hold kvm-\u003esrcu (or slots_lock)\ncan race with memslot deletion: synchronize_srcu_expedited() does not\nwait, kvm_free_memslot() frees the old slot and its rmap, and the zap\nresumes on freed memory.\n\nThe VFIO noncoherent-DMA path hits this by zapping the entire GPA\nspace without SRCU. KASAN reported:\n\n  BUG: KASAN: vmalloc-out-of-bounds in slot_rmap_walk_next+0x82/0x1c0\n  Read of size 8 at addr ffffc900005c1008\n  Call Trace:\n   slot_rmap_walk_next+0x82/0x1c0\n   __kvm_rmap_zap_gfn_range+0x17a/0x280\n   kvm_zap_gfn_range+0x2a6/0x6a0\n   kvm_vfio_set_attr+0x576/0x770\n   kvm_device_ioctl+0x1ff/0x3b0\n\nTake SRCU inside kvm_zap_gfn_range() so every caller is covered.\nNesting with an existing kvm-\u003esrcu critical section is fine; the\nhelper uses a local index. Drop the now-redundant SRCU pair from\n__kvm_set_or_clear_apicv_inhibit()."
          }
        ],
        "id": "CVE-2026-99340",
        "lastModified": "2026-11-22T11:16:47.950",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2026-11-19T15:17:45.113",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/9d119b4921ac74bc606917fd274c10c966fa5b72"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/b59a87c1ba3c347e8aec5f932eb7abf13064fd62"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/e34057e59ed784a37657835aac9f54eec0864342"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/ec9df57c8e00f189d58d927cc9a1f49592f687af"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Received"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-11-22T11:32:21+00:00",
      "cve": "CVE-2026-99340",
      "id": "CVE-2026-99340",
      "initial_release_date": "2026-11-19T14:21:48.075000+00:00",
      "product_status:known_affected": "125",
      "product_status:known_not_affected": "79",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: kernel: Use-after-free in KVM via race condition during memory invalidation",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-99340.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "important",
      "current_release_date": "2026-11-20T17:48:53Z",
      "cve": "CVE-2026-99340",
      "id": "CVE-2026-99340",
      "initial_release_date": "2026-11-20T17:48:53Z",
      "product_status:known_not_affected": "351",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2026-99340",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/2026/cve-2026-99340.json",
      "version": "2"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…