{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-40989", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-07-12T12:17:45.605Z", "datePublished": "2024-07-12T12:37:33.823Z", "dateUpdated": "2026-08-05T11:34:27.078Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:34:27.078Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: arm64: Disassociate vcpus from redistributor region on teardown\n\nWhen tearing down a redistributor region, make sure we don't have\nany dangling pointer to that region stored in a vcpu." } ], "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 entire attack is a sequence of ioctls on /dev/kvm and the resulting VM/vCPU/vgic-device file descriptors (KVM_CREATE_DEVICE, KVM_SET_DEVICE_ATTR, KVM_RUN, KVM_GET_DEVICE_ATTR); no network, adjacent-network, or physical path reaches arch/arm64/kvm/vgic.\nAC:L - No race and no unpredictable state is involved — the attacker deterministically forces the free (redist region with count < nr_vcpus followed by a failing first KVM_RUN, or MMIO-bus exhaustion via ~1000 ioeventfds to make kvm_io_bus_register_dev return -ENOSPC), then re-inits the vgic and reads GICR_TYPER at will, with unlimited time to groom and spray the reclaimed kmalloc-cg-64 slot.\nPR:L - Creating a VM, a KVM_DEV_TYPE_ARM_VGIC_V3 device and vCPUs requires no capability at all — only the ability to open /dev/kvm, which is world-accessible (0666 udev rule) or kvm-group on mainstream distros and is exposed to unprivileged app-domain virtualization on Android/AVF.\nUI:N - The attacker performs the region setup, the failing KVM_RUN, the re-init and the GICR_TYPER read entirely within its own process; no victim action, mount, or file open is required.\nS:U - The free is only reachable from the host VMM process, not from guest code, so the attacker and the corrupted host kernel heap are in the same security authority — this is standard local kernel privilege escalation, not a guest-to-host escape.\nC:H - vgic_mmio_vcpu_rdist_is_last() dereferences a stale pointer into a freed, reclaimed kmalloc-cg-64 object, reading base/count/free_index from whatever heap data now occupies that slot; per kernel scoring guidance a use-after-free read of reclaimed slab memory is treated as High, and the resulting GICR_TYPER_LAST bit forms a repeatable oracle over sprayed heap contents.\nI:H - The bug leaves a permanently dangling kernel heap pointer in vcpu->arch.vgic_cpu.rdreg that survives arbitrary reallocation of that slab object, which is the canonical memory-corruption primitive class; the stale dereference also feeds falsified redistributor topology into GICR_TYPER as seen by the guest and by the migration save/restore stream.\nA:H - Dereferencing freed slab memory produces a KASAN use-after-free splat (fatal under panic_on_warn) and can oops outright if the backing page has been returned to the allocator, and the attacker can re-trigger the GICR_TYPER read arbitrarily often." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "arch/arm64/kvm/vgic/vgic-init.c", "arch/arm64/kvm/vgic/vgic-mmio-v3.c", "arch/arm64/kvm/vgic/vgic.h" ], "versions": [ { "version": "e5a35635464bc5304674b84ea42615a3fd0bd949", "lessThan": "68df4fc449fcc24347209e500ce26d5816705a77", "status": "affected", "versionType": "git" }, { "version": "e5a35635464bc5304674b84ea42615a3fd0bd949", "lessThan": "48bb62859d47c5c4197a8c01128d0fa4f46ee58c", "status": "affected", "versionType": "git" }, { "version": "e5a35635464bc5304674b84ea42615a3fd0bd949", "lessThan": "152b4123f21e6aff31cea01158176ad96a999c76", "status": "affected", "versionType": "git" }, { "version": "e5a35635464bc5304674b84ea42615a3fd0bd949", "lessThan": "0d92e4a7ffd5c42b9fa864692f82476c0bf8bcc8", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "arch/arm64/kvm/vgic/vgic-init.c", "arch/arm64/kvm/vgic/vgic-mmio-v3.c", "arch/arm64/kvm/vgic/vgic.h" ], "versions": [ { "version": "5.13", "status": "affected" }, { "version": "0", "lessThan": "5.13", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.96", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.36", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.9.7", "lessThanOrEqual": "6.9.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.10", "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.13", "versionEndExcluding": "6.1.96" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.13", "versionEndExcluding": "6.6.36" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.13", "versionEndExcluding": "6.9.7" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "5.13", "versionEndExcluding": "6.10" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/68df4fc449fcc24347209e500ce26d5816705a77" }, { "url": "https://git.kernel.org/stable/c/48bb62859d47c5c4197a8c01128d0fa4f46ee58c" }, { "url": "https://git.kernel.org/stable/c/152b4123f21e6aff31cea01158176ad96a999c76" }, { "url": "https://git.kernel.org/stable/c/0d92e4a7ffd5c42b9fa864692f82476c0bf8bcc8" } ], "title": "KVM: arm64: Disassociate vcpus from redistributor region on teardown", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "title": "CVE Program Container", "references": [ { "url": "https://git.kernel.org/stable/c/68df4fc449fcc24347209e500ce26d5816705a77", "tags": [ "x_transferred" ] }, { "url": "https://git.kernel.org/stable/c/48bb62859d47c5c4197a8c01128d0fa4f46ee58c", "tags": [ "x_transferred" ] }, { "url": "https://git.kernel.org/stable/c/152b4123f21e6aff31cea01158176ad96a999c76", "tags": [ "x_transferred" ] }, { "url": "https://git.kernel.org/stable/c/0d92e4a7ffd5c42b9fa864692f82476c0bf8bcc8", "tags": [ "x_transferred" ] }, { "url": "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T21:58:53.765Z" } }, { "metrics": [ { "other": { "type": "ssvc", "content": { "id": "CVE-2024-40989", "role": "CISA Coordinator", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "version": "2.0.3", "timestamp": "2024-09-10T17:01:54.595799Z" } } } ], "title": "CISA ADP Vulnrichment", "providerMetadata": { "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2024-09-11T17:34:20.480Z" } } ] } }