dma-direct: Leak pages on dma_set_decrypted() failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dma-direct: Leak pages on dma_set_decrypted() failure
On TDX it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory to the page allocator, which could lead to functional or security issues.
DMA could free decrypted/shared pages if dma_set_decrypted() fails. This should be a rare case. Just leak the pages in this case instead of freeing them.
From the CVE record · Linux
On TDX, an untrusted host can cause memory encryption or decryption operations to fail, leaving memory shared. If dma_set_decrypted() then fails, DMA may return decrypted, shared pages to the page allocator, potentially causing functional or security issues. The description does not specify authentication or user-interaction requirements.
Operators running the Linux kernel on TDX should check their systems; affected versions are not specified.