CVE-2023-52597: KVM: s390: fix setting of fpc register
In the Linux kernel, the following vulnerability has been resolved:
KVM: s390: fix setting of fpc register
kvmarchvcpuioctlsetfpu() allows to set the floating point control (fpc) register of a guest cpu. The new value is tested for validity by temporarily loading it into the fpc register.
This may lead to corruption of the fpc register of the host process: if an interrupt happens while the value is temporarily loaded into the fpc register, and within interrupt context floating point or vector registers are used, the current fp/vx registers are saved with savefpuregs() assuming they belong to user space and will be loaded into fp/vx registers when returning to user space.
testfpctl() restores the original user space / host process fpc register value, however it will be discarded, when returning to user space.
In result the host process will incorrectly continue to run with the value that was supposed to be used for a guest cpu.
Fix this by simply removing the test. There is another test right before the SIE context is entered which will handles invalid values.
This results in a change of behaviour: invalid values will now be accepted instead of that the ioctl fails with -EINVAL. This seems to be acceptable, given that this interface is most likely not used anymore, and this is in addition the same behaviour implemented with the memory mapped interface (replace invalid values with zero) - see syncregs() in kvm-s390.c.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2023-52597?
CVE-2023-52597 is classified as a high severity vulnerability in the Linux kernel.
How do I fix CVE-2023-52597?
To remediate CVE-2023-52597, update the Linux kernel to one of the patched versions: 5.10.223-1, 5.10.226-1, 6.1.123-1, 6.1.119-1, 6.12.11-1, or 6.12.12-1.
What software is affected by CVE-2023-52597?
CVE-2023-52597 affects specific versions of the Linux kernel distributed by Debian.
What does CVE-2023-52597 exploit in the Linux kernel?
CVE-2023-52597 pertains to an issue with the KVM subsystem, specifically how the floating point control register is set for guest CPUs.
Was CVE-2023-52597 publicly disclosed?
CVE-2023-52597 was publicly disclosed as part of a routine security update for the Linux kernel.