virt: sev-guest: Explicitly leak pages in unknown state
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 |
6.14
|
In the Linux kernel, the following vulnerability has been resolved:
virt: sev-guest: Explicitly leak pages in unknown state
When set_memory_{encrypted,decrypted}() fail, the user cannot know at which point the function failed, meaning that the pages are left in an unknown state from the point of view of the caller.
Since the pages may be left in an unencrypted state, they are not suitable for general use, and cannot be returned safely to the buddy allocator. Avoid the issue by never freeing the pages, and then do the proper accounting by calling snp_leak_pages().
From the CVE record · Linux
In the Linux kernel's sev-guest component, a failed set_memory_encrypted() or set_memory_decrypted() call can leave pages in an unknown encryption state. Returning those pages to the buddy allocator may be unsafe; the input does not identify an attacker action, access requirement, or user interaction needed to trigger this condition.
Engineers running Linux kernels with the sev-guest component should check their kernel versions; affected versions are not specified.