В ядре Linux была устранена следующая уязвимость: x86/hyperv: Avoid с помощью страницы вывода per-cpu в hv_apicid_to_vp_index() hv_apicid_to_vp_index() В настоящее время используются страницы ввода и вывода per-cpu hypercall. Эта функция вызывается при запуске в VTL2 и при запуске в SEV-SNP CoCo VM без паравизора. В первом случае выделяется страница вывода, а во втором — нет, поэтому гипервизор хранит в памяти не выделенный гостем индекс вывода VP.
Исправьте это, используя страницу ввода для ввода и вывода. Гипервызов имеет очень небольшой вход и выход, поэтому совместное использование одной и той же страницы для обоих является простым. Альтернативным решением является выделение страницы вывода в расчете на единицу мощности при запуске в гостевом SEV-SNP CoCo, но это использует значительно больше памяти, особенно с большим количеством vCPUs.
Показать оригинальное описание (EN)
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.