{"id":"CVE-2026-99471","aliases":["CVE-2026-99471"],"related":[],"kind":"vulnerability","state":"published","title":"KVM: PPC: Book3S HV: Add SRCU protection for virtual-mode HPT hcalls","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: PPC: Book3S HV: Add SRCU protection for virtual-mode HPT hcalls\n\nThe virtual-mode HPT hcall handlers (H_ENTER, H_REMOVE, H_BULK_REMOVE,\nH_CLEAR_REF, H_CLEAR_MOD) call into book3s_hv_rm_mmu.c, which accesses\nmemslots via kvm_memslots_raw().  kvm_memslots_raw() uses\nrcu_dereference_raw_check() to bypass SRCU lockdep annotation checking.\nThis is safe in real mode because the entire guest entry/exit is wrapped\nin srcu_read_lock/unlock inside kvmppc_run_core() and\nkvmhv_run_single_vcpu().\n\nHowever, since commit 6165d5dd99db (\"KVM: PPC: Book3S HV: add virtual\nmode handlers for HPT hcalls and page faults\"), these same handlers are\nalso executed in virtual mode via kvmppc_pseries_do_hcall(), which runs\nafter SRCU has already been released on guest exit.\n\nA concurrent KVM_SET_USER_MEMORY_REGION deletion or move can therefore\ncall synchronize_srcu_expedited() — which does not wait for this thread —\nand then kfree(slot) and vfree(slot->arch.rmap) while the hcall handler\nstill holds a raw pointer to the memslot.  lock_rmap() then writes to\nfreed vmalloc memory, leading to use-after-free and memory corruption.\nBecause kvm_memslots_raw() suppresses lockdep checks, this race is\nentirely silent.\n\nFix this by factoring out the 7 HPT hcall handlers (H_REMOVE, H_ENTER,\nH_READ, H_CLEAR_MOD, H_CLEAR_REF, H_PROTECT, H_BULK_REMOVE) into a\nhelper function, kvmppc_pseries_do_hpt_hcall(), and wrapping its call\nsite in srcu_read_lock(&kvm->srcu) / srcu_read_unlock(&kvm->srcu, idx).\nTargeting only the HPT hcalls avoids wrapping non-HPT hcalls that sleep\n(such as H_CONFER, H_REGISTER_VPA, H_PAGE_INIT) or handlers that already\nacquire SRCU internally (such as H_RTAS).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: PPC: Book3S HV: Add SRCU protection for virtual-mode HPT hcalls\n\nThe virtual-mode HPT hcall handlers (H_ENTER, H_REMOVE, H_BULK_REMOVE,\nH_CLEAR_REF, H_CLEAR_MOD) call into book3s_hv_rm_mmu.c, which accesses\nmemslots via kvm_memslots_raw().  kvm_memslots_raw() uses\nrcu_dereference_raw_check() to bypass SRCU lockdep annotation checking.\nThis is safe in real mode because the entire guest entry/exit is wrapped\nin srcu_read_lock/unlock inside kvmppc_run_core() and\nkvmhv_run_single_vcpu().\n\nHowever, since commit 6165d5dd99db (\"KVM: PPC: Book3S HV: add virtual\nmode handlers for HPT hcalls and page faults\"), these same handlers are\nalso executed in virtual mode via kvmppc_pseries_do_hcall(), which runs\nafter SRCU has already been released on guest exit.\n\nA concurrent KVM_SET_USER_MEMORY_REGION deletion or move can therefore\ncall synchronize_srcu_expedited() — which does not wait for this thread —\nand then kfree(slot) and vfree(slot->arch.rmap) while the hcall handler\nstill holds a raw pointer to the memslot.  lock_rmap() then writes to\nfreed vmalloc memory, leading to use-after-free and memory corruption.\nBecause kvm_memslots_raw() suppresses lockdep checks, this race is\nentirely silent.\n\nFix this by factoring out the 7 HPT hcall handlers (H_REMOVE, H_ENTER,\nH_READ, H_CLEAR_MOD, H_CLEAR_REF, H_PROTECT, H_BULK_REMOVE) into a\nhelper function, kvmppc_pseries_do_hpt_hcall(), and wrapping its call\nsite in srcu_read_lock(&kvm->srcu) / srcu_read_unlock(&kvm->srcu, idx).\nTargeting only the HPT hcalls avoids wrapping non-HPT hcalls that sleep\n(such as H_CONFER, H_REGISTER_VPA, H_PAGE_INIT) or handlers that already\nacquire SRCU internally (such as H_RTAS).","source":"cvelist"}],"published":"2026-11-19T14:42:57.597Z","modified":"2026-11-23T08:17:50.807Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"6165d5dd99dbaec7a309491c3951bd81fc89978d","fixed":"fbfff331e73f44c25f4edd112eaef3b6865171c6","status":"affected"},{"type":"git","introduced":"6165d5dd99dbaec7a309491c3951bd81fc89978d","fixed":"294e306dc1c49f1124d0b82eef565778d975420b","status":"affected"},{"type":"git","introduced":"6165d5dd99dbaec7a309491c3951bd81fc89978d","fixed":"0b456d70fff190abac02795ddb088618ff512a48","status":"affected"},{"type":"git","introduced":"6165d5dd99dbaec7a309491c3951bd81fc89978d","fixed":"0f86aba67317d65b2dc89995dd5ddefe219411a7","status":"affected"},{"type":"git","introduced":"6165d5dd99dbaec7a309491c3951bd81fc89978d","fixed":"4ab2c987fd15a4bd28ef46a9ac871359886e6439","status":"affected"},{"type":"git","introduced":"6165d5dd99dbaec7a309491c3951bd81fc89978d","fixed":"c3d0261c4fae2cc36dcf9f4e247552498232caff","status":"affected"},{"type":"git","introduced":"6165d5dd99dbaec7a309491c3951bd81fc89978d","fixed":"61a39797bb136243c48b46e2586d8a9e2cea6a89","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.14","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.61","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.2","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/fbfff331e73f44c25f4edd112eaef3b6865171c6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/294e306dc1c49f1124d0b82eef565778d975420b","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0b456d70fff190abac02795ddb088618ff512a48","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0f86aba67317d65b2dc89995dd5ddefe219411a7","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4ab2c987fd15a4bd28ef46a9ac871359886e6439","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c3d0261c4fae2cc36dcf9f4e247552498232caff","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/61a39797bb136243c48b46e2586d8a9e2cea6a89","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99471","url":"https://www.cve.org/CVERecord?id=CVE-2026-99471","licence":"CVE Terms of Use","modified":"2026-11-23T08:03:16.250Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99471","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99471","licence":"Public domain","modified":"2026-11-23T08:17:50.807Z"}],"updatedAt":"2026-11-25T22:59:52.082Z","epss":{"score":0.00173,"percentile":0.07045,"date":"2026-12-01T12:00:22.000Z"}}