Description
In the Linux kernel, the following vulnerability has been resolved:

KVM: SEV: Nullify "have run CPUs" mask pointer when freeing it

Nullify have_run_cpus when freeing the mask, particularly in the error path
of __sev_guest_init(), so that KVM doesn't have to subtly use sev->active
to track whether or not the mask has been freed. As pointed out by Sashiko,
blindly freeing the mask in sev_vm_destroy() results in a double-free if
the mask is freed if __sev_guest_init() fails.

Throw the logic in a helper as nullifying the pointer is frustratingly
difficult and weird due to have_run_cpus being a single-entry array when
CPUMASK_OFFSTACK=n. Deliberately don't use CPUMASK_VAR_NULL, as it's not
directly assignable when the cpumask is on-stack, e.g. requires using a
local variable and a memcpy(), which is beyond ridiculous. Furthermore,
while clearing the on-stack bitmask is an unnecessary and arguably unwanted
side effect, KVM absolutely relies on '0' being the "null" value given that
the struct is zero-allocated.

Opportunistically add an alloc() helper to pair with free(); there are just
enough call sites to make doing so worthwhile.
Published: 2026-10-18
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Kernel Memory Corruption Leading to Privilege Escalation
Action: Apply Patch
AI Analysis

Impact

The flaw is a double‑free of the have_run_cpus mask within the SEV guest initialization code of KVM, an error that corrupts kernel memory and can be leveraged to execute code with kernel privileges or cause a crash. The exploitation vector hinges on creating or interfering with a SEV guest that triggers failure in __sev_guest_init(), causing the mask to be freed twice. This results in unpredictable memory corruption and the potential for privilege escalation on the host.

Affected Systems

Linux kernels that include the SEV module and have not been patched to nullify the have_run_cpus mask pointer when freeing it. Distributions that ship kernels with SEV enabled and lack the commit that adds the fix are vulnerable. No specific version information is supplied, so any kernel build that loads the sev module without the patch is considered affected.

Risk and Exploitability

Without an applied kernel patch, any process able to create a SEV guest on the host can trigger the double‑free path. The EPSS score indicates a very low probability of exploitation (<1%, approximately 0.00166), but the CVSS score of 5.5 indicates a moderate severity. The vulnerability is not listed in CISA’s KEV catalog, suggesting no known active exploitation, yet the potential for kernel code execution warrants immediate patching.

Generated by OpenCVE AI on October 23, 2026 at 06:24 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel patch that nullifies the have_run_cpus mask pointer before freeing in the SEV module (apply the commit that introduced the fix or a backported patch).
  • Reboot the system to load the updated kernel and ensure the patched module is in use.
  • If a kernel upgrade is not feasible, disable SEV support in KVM or prevent the sev.ko module from loading to eliminate the vulnerable code path.

Generated by OpenCVE AI on October 23, 2026 at 06:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 23 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-1341
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Sun, 18 Oct 2026 23:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Sun, 18 Oct 2026 16:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: KVM: SEV: Nullify "have run CPUs" mask pointer when freeing it Nullify have_run_cpus when freeing the mask, particularly in the error path of __sev_guest_init(), so that KVM doesn't have to subtly use sev->active to track whether or not the mask has been freed. As pointed out by Sashiko, blindly freeing the mask in sev_vm_destroy() results in a double-free if the mask is freed if __sev_guest_init() fails. Throw the logic in a helper as nullifying the pointer is frustratingly difficult and weird due to have_run_cpus being a single-entry array when CPUMASK_OFFSTACK=n. Deliberately don't use CPUMASK_VAR_NULL, as it's not directly assignable when the cpumask is on-stack, e.g. requires using a local variable and a memcpy(), which is beyond ridiculous. Furthermore, while clearing the on-stack bitmask is an unnecessary and arguably unwanted side effect, KVM absolutely relies on '0' being the "null" value given that the struct is zero-allocated. Opportunistically add an alloc() helper to pair with free(); there are just enough call sites to make doing so worthwhile.
Title KVM: SEV: Nullify "have run CPUs" mask pointer when freeing it
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-19T09:24:30.132Z

Reserved: 2026-09-25T10:25:14.366Z

Link: CVE-2026-98719

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-18T16:17:25.463

Modified: 2026-10-19T10:19:36.137

Link: CVE-2026-98719

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-18T00:00:00Z

Links: CVE-2026-98719 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T06:30:07Z

Weaknesses
  • CWE-1341

    Multiple Releases of Same Resource or Handle

  • CWE-416

    Use After Free