CVE-2026-99258: x86/hyperv: Avoid using per-cpu output page in hv_apicid_to_vp_index()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
x86/hyperv: Avoid using per-cpu output page in hv_apicid_to_vp_index()
hv_apicid_to_vp_index() currently uses the per-cpu hypercall input and output pages. This function is called when running in VTL2 and when running in an SEV-SNP CoCo VM with no paravisor. In the former case, the output page is allocated, but in the latter case it is not, so the hypervisor stores the output VP index in memory that has not been allocated by the guest.
Fix this by using the input page for both input and output. The hypercall has very small input and output, so sharing the same page for both is straightforward. An alternative fix is to allocate the per-cpu output page when running in an SEV-SNP CoCo guest, but this uses significantly more memory, particularly with larger vCPUs counts.
The Linux kernel CVE team has assigned CVE-2026-99258 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.12.41 with commit 3d12349ade541eefde0e71bf5c4aa7aa04c52a79 and fixed in 6.12.115 with commit bdba5f1b8bd0d18b1df61f769b559ed272902489 Issue introduced in 6.16 with commit 86c48271e0d60c82665e9fd61277002391efcef7 and fixed in 6.18.59 with commit 2b561786c9076a892ef8b8f416c9828bc87ed44f Issue introduced in 6.16 with commit 86c48271e0d60c82665e9fd61277002391efcef7 and fixed in 7.2.13 with commit bc8ca0f4769627ae7d04e7ffdbd20de4f27a9bf9 Issue introduced in 6.16 with commit 86c48271e0d60c82665e9fd61277002391efcef7 and fixed in 7.3 with commit 7b74c117e2aac78e0f723e1c9c3644451c56b0d9 Issue introduced in 6.15.3 with commit cb002d6c8f06d6061e84b2109cb84416107a9fb9
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-99258
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/x86/hyperv/hv_init.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/bdba5f1b8bd0d18b1df61f769b559ed272902489 https://git.kernel.org/stable/c/2b561786c9076a892ef8b8f416c9828bc87ed44f https://git.kernel.org/stable/c/bc8ca0f4769627ae7d04e7ffdbd20de4f27a9bf9 https://git.kernel.org/stable/c/7b74c117e2aac78e0f723e1c9c3644451c56b0d9