{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-58083","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-03-06T15:52:09.183Z","datePublished":"2025-03-06T16:13:45.631Z","dateUpdated":"2026-08-05T11:47:36.275Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:47:36.275Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: Explicitly verify target vCPU is online in kvm_get_vcpu()\n\nExplicitly verify the target vCPU is fully online _prior_ to clamping the\nindex in kvm_get_vcpu().  If the index is \"bad\", the nospec clamping will\ngenerate '0', i.e. KVM will return vCPU0 instead of NULL.\n\nIn practice, the bug is unlikely to cause problems, as it will only come\ninto play if userspace or the guest is buggy or misbehaving, e.g. KVM may\nsend interrupts to vCPU0 instead of dropping them on the floor.\n\nHowever, returning vCPU0 when it shouldn't exist per online_vcpus is\nproblematic now that KVM uses an xarray for the vCPUs array, as KVM needs\nto insert into the xarray before publishing the vCPU to userspace (see\ncommit c5b077549136 (\"KVM: Convert the kvm->vcpus array to a xarray\")),\ni.e. before vCPU creation is guaranteed to succeed.\n\nAs a result, incorrectly providing access to vCPU0 will trigger a\nuse-after-free if vCPU0 is dereferenced and kvm_vm_ioctl_create_vcpu()\nbails out of vCPU creation due to an error and frees vCPU0.  Commit\nafb2acb2e3a3 (\"KVM: Fix vcpu_array[0] races\") papered over that issue, but\nin doing so introduced an unsolvable teardown conundrum.  Preventing\naccesses to vCPU0 before it's fully online will allow reverting commit\nafb2acb2e3a3, without re-introducing the vcpu_array[0] UAF race."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable helper is reached through `/dev/kvm` ioctls (`KVM_CREATE_VCPU`, `KVM_SET_DEVICE_ATTR`, `KVM_SIGNAL_MSI`, `KVM_S390_INTERRUPT`) issued by a local process. Guest-triggerable callers exist (Hyper-V hypercalls, vGIC/eiointc MMIO) but still require local access to start a VM.\nAC:L - The out-of-range index is supplied directly by the attacker and clamps to vCPU0 deterministically, with no race needed for the wrong-vCPU/NULL-check-bypass path. For the use-after-free the attacker owns both sides of the race — one thread runs `KVM_CREATE_VCPU` with `RLIMIT_NOFILE` exhausted so `create_vcpu_fd()` fails every time, while another hammers a `kvm_get_vcpu()` path with `online_vcpus == 0`.\nPR:L - Only an unprivileged local account with `/dev/kvm` access is needed — no capability check exists on these paths, and `/dev/kvm` is routinely exposed to the `kvm` group, to containers/CI runners, and to sandboxed apps on Android and ChromeOS.\nUI:N - The attacker drives every step itself via ioctls on file descriptors it owns; no victim action or interaction is required.\nS:U - The vulnerable code and the corrupted memory are both in the host kernel, reached from the VMM process that already owns the VM, so no guest-to-host or other security-authority boundary is crossed. The guest-reachable misrouting only redirects interrupts to a different vCPU inside the same VM.\nC:H - Dereferencing a freed `struct kvm_vcpu` after heap reallocation yields a read primitive over attacker-groomed slab memory (kernel pointers, `vcpu->arch` state, `kvm` pointers). Even without the UAF, the clamped index grants unauthorized reads of vCPU0 state (e.g. `ipi_state`, `imsic_addr`) that the caller was supposed to be denied.\nI:H - The freed `kvm_vcpu` is written through on these paths (`mutex_lock(&vcpu->mutex)`, `vcpu->arch.ipi_state.*`, `kvm_make_request()`, `hv_tlb_flush_enqueue()`), giving a write-after-free into a reclaimed slab object that is a well-established route to control-flow hijack and privilege escalation.\nA:H - Use-after-free on `struct kvm_vcpu` reliably produces an oops or panic when the object is reclaimed, and the mis-clamped index also drives interrupt injection and lock operations against a nonexistent vCPU, crashing or hanging the host."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/kvm_host.h"],"versions":[{"version":"1d487e9bf8ba66a7174c56a0029c54b1eca8f99c","lessThan":"5cce2ed69b00e022b5cdf0c49c82986abd2941a8","status":"affected","versionType":"git"},{"version":"1d487e9bf8ba66a7174c56a0029c54b1eca8f99c","lessThan":"09d50ccf0b2d739db4a485b08afe7520a4402a63","status":"affected","versionType":"git"},{"version":"1d487e9bf8ba66a7174c56a0029c54b1eca8f99c","lessThan":"7c4899239d0f70f88ac42665b3da51678d122480","status":"affected","versionType":"git"},{"version":"1d487e9bf8ba66a7174c56a0029c54b1eca8f99c","lessThan":"d817e510662fd1c9797952408d94806f97a5fffd","status":"affected","versionType":"git"},{"version":"1d487e9bf8ba66a7174c56a0029c54b1eca8f99c","lessThan":"125da53b3c0c9d7f58353aea0076e9efd6498ba7","status":"affected","versionType":"git"},{"version":"1d487e9bf8ba66a7174c56a0029c54b1eca8f99c","lessThan":"f2f805ada63b536bc192458a7098388286568ad4","status":"affected","versionType":"git"},{"version":"1d487e9bf8ba66a7174c56a0029c54b1eca8f99c","lessThan":"ca8da90ed1432ff3d000de4f1e2275d4e7d21b96","status":"affected","versionType":"git"},{"version":"1d487e9bf8ba66a7174c56a0029c54b1eca8f99c","lessThan":"1e7381f3617d14b3c11da80ff5f8a93ab14cfc46","status":"affected","versionType":"git"},{"version":"559e2696d2f47a3575e9550f101a7e59e30b1b38","status":"affected","versionType":"git"},{"version":"d39f3cc71382165bb7efb8e06a2bd32f847de4ae","status":"affected","versionType":"git"},{"version":"7cee966029037a183d98cb88251ceb92a233fe63","status":"affected","versionType":"git"},{"version":"4.14.120","lessThan":"4.15","status":"affected","versionType":"semver"},{"version":"4.19.44","lessThan":"4.20","status":"affected","versionType":"semver"},{"version":"5.0.17","lessThan":"5.1","status":"affected","versionType":"semver"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["include/linux/kvm_host.h"],"versions":[{"version":"5.1","status":"affected"},{"version":"0","lessThan":"5.1","status":"unaffected","versionType":"semver"},{"version":"5.4.291","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.235","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.179","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.129","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.78","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.14","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.13.3","lessThanOrEqual":"6.13.*","status":"unaffected","versionType":"semver"},{"version":"6.14","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.4.291"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.10.235"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.15.179"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.1.129"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.6.78"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.12.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.13.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.14"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19.44"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.0.17"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/5cce2ed69b00e022b5cdf0c49c82986abd2941a8"},{"url":"https://git.kernel.org/stable/c/09d50ccf0b2d739db4a485b08afe7520a4402a63"},{"url":"https://git.kernel.org/stable/c/7c4899239d0f70f88ac42665b3da51678d122480"},{"url":"https://git.kernel.org/stable/c/d817e510662fd1c9797952408d94806f97a5fffd"},{"url":"https://git.kernel.org/stable/c/125da53b3c0c9d7f58353aea0076e9efd6498ba7"},{"url":"https://git.kernel.org/stable/c/f2f805ada63b536bc192458a7098388286568ad4"},{"url":"https://git.kernel.org/stable/c/ca8da90ed1432ff3d000de4f1e2275d4e7d21b96"},{"url":"https://git.kernel.org/stable/c/1e7381f3617d14b3c11da80ff5f8a93ab14cfc46"}],"title":"KVM: Explicitly verify target vCPU is online in kvm_get_vcpu()","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.8,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-58083","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2025-03-27T17:00:02.623750Z"}}}],"problemTypes":[{"descriptions":[{"lang":"en","type":"CWE","cweId":"CWE-416","description":"CWE-416 Use After Free"}]}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2025-03-27T17:08:23.092Z"}},{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T19:34:17.500Z"}}]}}