x86/kvm: Disable kvmclock on all CPUs on shutdown
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
x86/kvm: Disable kvmclock on all CPUs on shutdown
Currenly, we disable kvmclock from machine_shutdown() hook and this only happens for boot CPU. We need to disable it for all CPUs to guard against memory corruption e.g. on restore from hibernate.
Note, writing '0' to kvmclock MSR doesn't clear memory location, it just prevents hypervisor from updating the location so for the short while after write and while CPU is still alive, the clock remains usable and correct so we don't need to switch to some other clocksource.
From the CVE record · Linux
The Linux kernel disables kvmclock only on the boot CPU during shutdown, leaving it enabled on other CPUs. This can cause memory corruption, for example when restoring from hibernate. The input does not specify an attacker action, access requirements, or user interaction.
Engineers running the Linux kernel should check affected versions; none are specified in the input.