{"id":"CVE-2026-98467","summary":"KVM: arm64: nv: Fix null ptr deref on nested wp/unmap, teardown race","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: arm64: nv: Fix null ptr deref on nested wp/unmap, teardown race\n\nCommit 7270cc9157f4 (\"KVM: arm64: nv: Handle VNCR_EL2 invalidation from MMU\nnotifiers\") introduced VNCR_EL2 invalidation in both kvm_nested_s2_unmap()\nand kvm_nested_s2_wp().\n\nHowever at the point of this being performed concurrent stage 2 teardown of\na nested guest can cause kvm-\u003earch.mmu.pgt to be set to NULL.\n\nThis happens in kvm_flush_shadow_all() -\u003e kvm_arch_flush_shadow_all() -\u003e\nkvm_free_stage2_pgd() and is performed under the kvm-\u003emmu_lock.\n\nCommit ec14c272408a (\"KVM: arm64: nv: Unmap/flush shadow stage 2 page\ntables\") introduced the teardown of the entire nested MMU range, which then\ninvokes stage2_apply_range() with resched=true:\n\nmmu_notifier_invalidate_range_start()\n  -\u003e ... -\u003e kvm_mmu_notifier_invalidate_range_start()\n    -\u003e kvm_mmu_unmap_gfn_range()\n      -\u003e kvm_unmap_gfn_range()\n        -\u003e kvm_nested_s2_unmap()\n          -\u003e kvm_stage2_unmap_range()\n            -\u003e __unmap_stage2_range()\n                -\u003e stage2_apply_range()\n\nThis means that stage2_apply_range() can drop the kvm-\u003emmu_lock and thus\nconcurrent progress can be made in lockstep with\nkvm_arch_flush_shadow_all().\n\nIf kvm_arch_flush_shadow_all() advances ahead of stage2_apply_range() and\ncompletes its operation it guarantees a NULL pointer deref.\n\nSince kvm_free_stage2_pgd() is performed under the kvm-\u003emmu_lock this will\neither be observed NULL or not and serialised against\nkvm_free_stage2_pgd().\n\nResolve the issue by abstracting the invalidation to a new function,\nkvm_invalidate_vncr_ipa_all(), and check that the pgt is non-NULL before\ndereferencing it.","modified":"2026-10-19T02:46:21.372242964Z","published":"2026-10-18T15:15:19.294Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98467.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3cefc1ab511fad6a0f708e7a4aee9f91346e9457"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4c74e233cdedd11592775fae2a6243e67ca3f891"},{"type":"WEB","url":"https://git.kernel.org/stable/c/970de111c087488e53cadf5480b94e0f695db985"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98467.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98467"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"7270cc9157f474dfc46750a34c9d7defc686b2eb"},{"fixed":"970de111c087488e53cadf5480b94e0f695db985"},{"fixed":"3cefc1ab511fad6a0f708e7a4aee9f91346e9457"},{"fixed":"4c74e233cdedd11592775fae2a6243e67ca3f891"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98467.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.16.0"},{"fixed":"6.18.55"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.2.9"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98467.json"}}],"schema_version":"1.9.0"}