Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795100051; b=mAUAJrxTO69rzR9J3PFpaeN8FK1TFFET0ahhNxaRTpRQZiNw0JS5D+/E57DLmt9+CjNo hfT5jV59L45rhKuHXX8iJJT3vKhOxxIVGn7bPKoeBzVSYz1M4Y3wwV8AY6ywHC2iWam3a Hgim9G7KC8zaiR4sPLfLlhvA3syleMy+8TNEPyUic7IOYFGGFwrPTii33f56pKL5IIVGe 0YoOuuQTAWPHtC57LvvYBK0fjggRipF3BUfz1N0NLiAM3zFu5OKMYxnqTB0pMMVI3fPHV MY5qra4eU3BCOYXjSQRfDDbXJKw1nfvHD6i613GpgXAhsj5lhA5Lpezp+rG8EwVq56Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795100051; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Type:Content-Transfer-Encoding; bh=qETBxulIUe6NnMUGoENrGiLcmcxMqr1yhjeDZhTxDN8=; b=5DBecTrEMetC85AES8tgFny7EA9OVkLRNh0jm6A90WG8NZlVKQfjMQrYmLyJr1wKcZtc YzSgJe3GtNLvsllV9EMXLXGVJQ6tn3o7gIzlgxOrS5iyuEj2vXBaHKVGmL/DP7QV8IwzD ShSALvSxCbMqFjaqpVnniQNpKzOggUFjDZ4eywtydkFkuoaG6Ji3D+TxLSFh4iuHTPs13 56Pcq4qC65L/7cwOx/yV6mkV0xYJ4AULwzMY600L4EefL2YxO1A6w+1xZO5hJRYLsQ/OE ukIEB5pBvXSaGJIuRGg9NPw/dD18Q/tFoi6iHppAAfOK0P4J8ym4dKAg6ZPmSAHCsOw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=YGJV3a1e; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40014606A320 for ; Thu, 19 Nov 2026 14:54:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=YGJV3a1e Received: by smtp.kernel.org (Postfix) with ESMTPSA id 496D91F000C5; Thu, 19 Nov 2026 14:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795100050; bh=qETBxulIUe6NnMUGoENrGiLcmcxMqr1yhjeDZhTxDN8=; h=From:To:Cc:Subject:Date:Reply-To; b=YGJV3a1etUiHIPXz/knlYgp9vrbv8aZy+Vwd8+fRLF6HkiJTdhlETsHljcxRPTRrP YT5LRi4sjvIHuOQ27UzL2dmiaLLOxLH2hENWexMs2gj3XRFtmLzl4Su+tYaWSAnIYC s7TvAKj0EL6VW5kOfNWi2GRZlhh4L6C7Ml5DiQMk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99471: KVM: PPC: Book3S HV: Add SRCU protection for virtual-mode HPT hcalls Date: Thu, 19 Nov 2026 15:26:09 +0100 Message-ID: <2026111910-CVE-2026-99471-3ab5@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3873; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=oYbPreuXGiWakYSEMTKnlHTFI4+MjgmXVKNSSoehCpE=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2bq+v1MwOa3YbaG/6XX2h6jYJ53lap8mn/10oaDv9 hsOE1/9jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIEymG+e6nWlTSts0S09i4 VD0hObP7zqY7KQwL9qxxUNkq7HrYYoLAZeH/ab1v756tBAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: KVM: PPC: Book3S HV: Add SRCU protection for virtual-mode HPT hcalls The virtual-mode HPT hcall handlers (H_ENTER, H_REMOVE, H_BULK_REMOVE, H_CLEAR_REF, H_CLEAR_MOD) call into book3s_hv_rm_mmu.c, which accesses memslots via kvm_memslots_raw(). kvm_memslots_raw() uses rcu_dereference_raw_check() to bypass SRCU lockdep annotation checking. This is safe in real mode because the entire guest entry/exit is wrapped in srcu_read_lock/unlock inside kvmppc_run_core() and kvmhv_run_single_vcpu(). However, since commit 6165d5dd99db ("KVM: PPC: Book3S HV: add virtual mode handlers for HPT hcalls and page faults"), these same handlers are also executed in virtual mode via kvmppc_pseries_do_hcall(), which runs after SRCU has already been released on guest exit. A concurrent KVM_SET_USER_MEMORY_REGION deletion or move can therefore call synchronize_srcu_expedited() — which does not wait for this thread — and then kfree(slot) and vfree(slot->arch.rmap) while the hcall handler still holds a raw pointer to the memslot. lock_rmap() then writes to freed vmalloc memory, leading to use-after-free and memory corruption. Because kvm_memslots_raw() suppresses lockdep checks, this race is entirely silent. Fix this by factoring out the 7 HPT hcall handlers (H_REMOVE, H_ENTER, H_READ, H_CLEAR_MOD, H_CLEAR_REF, H_PROTECT, H_BULK_REMOVE) into a helper function, kvmppc_pseries_do_hpt_hcall(), and wrapping its call site in srcu_read_lock(&kvm->srcu) / srcu_read_unlock(&kvm->srcu, idx). Targeting only the HPT hcalls avoids wrapping non-HPT hcalls that sleep (such as H_CONFER, H_REGISTER_VPA, H_PAGE_INIT) or handlers that already acquire SRCU internally (such as H_RTAS). The Linux kernel CVE team has assigned CVE-2026-99471 to this issue. Affected and fixed versions =========================== Issue introduced in 5.14 with commit 6165d5dd99dbaec7a309491c3951bd81fc89978d and fixed in 6.12.117 with commit 0f86aba67317d65b2dc89995dd5ddefe219411a7 Issue introduced in 5.14 with commit 6165d5dd99dbaec7a309491c3951bd81fc89978d and fixed in 6.18.61 with commit 4ab2c987fd15a4bd28ef46a9ac871359886e6439 Issue introduced in 5.14 with commit 6165d5dd99dbaec7a309491c3951bd81fc89978d and fixed in 7.3.2 with commit c3d0261c4fae2cc36dcf9f4e247552498232caff Issue introduced in 5.14 with commit 6165d5dd99dbaec7a309491c3951bd81fc89978d and fixed in 7.4-rc1 with commit 61a39797bb136243c48b46e2586d8a9e2cea6a89 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-99471 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: arch/powerpc/kvm/book3s_hv.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/0f86aba67317d65b2dc89995dd5ddefe219411a7 https://git.kernel.org/stable/c/4ab2c987fd15a4bd28ef46a9ac871359886e6439 https://git.kernel.org/stable/c/c3d0261c4fae2cc36dcf9f4e247552498232caff https://git.kernel.org/stable/c/61a39797bb136243c48b46e2586d8a9e2cea6a89