In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Unconditionally reset MMU context when emulating INIT Force an MMU reset when emulating an INIT even if paging was already disabled, as the MMU page role includes guest_mode (L2), i.e. an INIT while L2 is running with CR0.PG=0 will result in KVM running L1 with a stale MMU context. В качестве альтернативы, сброс может быть строго ограничен включенной подкачкой или активной L2, но SMM также закодирован в роли страницы. Несмотря на то, что vCPU не может быть INIT'd, пока SMM активен, нет никакого значения в том, чтобы не обрабатывать SMM.
В этот момент единственный сценарий, в котором KVM не нуждается в сбросе контекста MMU, находится на INIT с vCPU, работающим в Real Mode или Unpaged Protect Mode, и, хотя INIT в этих режимах несколько распространен, это далеко от горячего пути и повторной инициализации MMU не дорого, особенно когда роль не меняется (KVM elides большинство повторных настроек в этом случае). Обратите внимание, что, как и Fixes commit, эта ошибка влияет только на вложенный SVM, поскольку INIT является безусловным перехватом на VMX, то есть невозможно эмулировать INIT, пока L2 активен. Временно сохранить гостевой TLB флеш, когда CR0.PG очищается, даже если он полностью избыточный с флешем, который излучается на всех событиях INIT (сам KVM только делает RESET, когда создается vCPU, то есть, когда CR0.PG должен быть '0').
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: KVM: x86: Unconditionally reset MMU context when emulating INIT Force an MMU reset when emulating an INIT even if paging was already disabled, as the MMU page role includes guest_mode (L2), i.e. an INIT while L2 is running with CR0.PG=0 will result in KVM running L1 with a stale MMU context. Alternatively, the reset could be scoped strictly to paging being enabled or L2 being active, but SMM is also encoded in the page role. Even though it _should_ be impossible for the vCPU to be INIT'd while SMM is active, there's zero value in not handling SMM. At that point, the only scenario where KVM _doesn't_ need to reset the MMU context is on an INIT with the vCPU running in Real Mode or Unpaged Protect Mode, and while INIT in those modes is somewhat common, it's far from a hot path and re-initializing the MMU is not expensive, especially when the role isn't changing (KVM elides most of the re-configuration in that case). Note, like the Fixes commit, this bug only affects nested SVM as INIT is an unconditional intercept on VMX, i.e. it's impossible to emulate INIT while L2 is active. Temporarily keep the guest TLB flush when CR0.PG is being cleared even though it is fully redundant with the flush that is emitted on all INIT events (KVM itself only does RESET when a vCPU is being created, i.e. when CR0.PG must be '0').
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1
|
6.12.118
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1
|
6.18.64
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1
|
7.3.5
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1
|
7.4-rc2
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.15.81
|
— |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.0.11
|
— |