linux-next/drivers/virt
Li RongQing 10331a9348 virt: tdx-guest: Just leak decrypted memory on unrecoverable errors
In CoCo VMs it is possible for the untrusted host to cause
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.

Leak the decrypted memory when set_memory_decrypted() fails,
and don't need to print an error since set_memory_decrypted()
will call WARN_ONCE().

Fixes: f4738f56d1 ("virt: tdx-guest: Add Quote generation support using TSM_REPORTS")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20240619111801.25630-1-lirongqing%40baidu.com
2024-12-18 06:07:55 -08:00
..
acrn assorted variants of irqfd setup: convert to CLASS(fd) 2024-11-03 01:28:07 -05:00
coco virt: tdx-guest: Just leak decrypted memory on unrecoverable errors 2024-12-18 06:07:55 -08:00
nitro_enclaves kunit: fix Kconfig for build-in tests USB4 and Nitro Enclaves 2022-09-01 13:00:48 -06:00
vboxguest virt: vbox: utils: fix all kernel-doc warnings 2023-12-23 14:15:46 +01:00
fsl_hypervisor.c virt: fsl: Use of_property_present() for testing DT property presence 2023-04-21 09:20:56 -05:00
Kconfig virt: vmgenid: add support for devicetree bindings 2024-04-27 02:38:34 +02:00
Makefile virt: coco: Add a coco/Makefile and coco/Kconfig 2023-10-19 18:11:38 -07:00
vmgenid.c Merge branch 'acpi-bus' 2024-05-13 19:15:14 +02:00