KVM: SEV: Use READ_ONCE() when reading entries/indices from PSC buffer
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:
KVM: SEV: Use READ_ONCE() when reading entries/indices from PSC buffer
Use READ_ONCE() when reading entries/indices from the guest-accessible Page State Change buffer to defend against TOCTOU bugs.
Don't bother with READ_ONCE()/WRITE_ONCE() for cases where KVM is writing (and not consuming the result!), as the guest isn't supposed to touch the buffer while it's being processed. I.e. using READ_ONCE() is all about protecting against misbehaving guests.
From the CVE record · Linux
The Linux kernel’s KVM SEV code reads entries and indices from a guest-accessible Page State Change buffer. A misbehaving guest can change that buffer while KVM processes it, creating a time-of-check-to-time-of-use vulnerability. The input does not specify a resulting impact or any additional authentication or user-interaction requirements.
Operators running Linux kernels with KVM SEV should check whether their kernel includes the fix; affected versions are not specified.