Утечка состояния регистров между гостевыми системами и хостом в KVM arm64 ядра Linux
Linux kernel
Кратко
Поддержка KVM в ядре Linux для arm64 может раскрывать функции S1PIE и S1POE без зависимых от них функций, из-за чего гости могут обращаться к регистрам, которые не перехватываются и не переключаются. При VHE это может привести к утечке значений регистров между гостевыми системами, а в конфигурациях nVHE, hVHE и pKVM хост-ядро может возобновить работу с гостевыми значениями PIR_EL1 и PIRE0_EL1.
Резюме сгенерировано ИИ по данным источников и переведено автоматически.
Исправление
Исправленная версия не указана.
Оригинальное описание (EN)
Оригинальный заголовок: Linux kernel register state leak across guests and host in KVM arm64
In the Linux kernel, the following vulnerability has been resolved: KVM: arm64: Sanitise ID_AA64MMFR3_EL1.S1P[IO]E KVM uses the VM's ID registers as the source of truth for what the guest has, but userspace can expose S1PIE or S1POE without the features they imply. As per the architecture, both imply TCR2 and ATS1A, and S1POE also implies HPDS. With TCR2 hidden, the world switch skips PIR_EL1, PIRE0_EL1 and POR_EL1 while KVM doesn't trap them, so the guest accesses registers that are neither trapped nor switched. Under VHE, that leaks values between guests. On nVHE and hVHE, pKVM included, the host kernel resumes with the guest's PIR_EL1 and PIRE0_EL1. On first run, clear S1PIE and S1POE from the VM's ID registers when the features they imply are missing, before anything derives state from them. The guest and userspace then see neither feature, and the guest's accesses to their registers UNDEF.