summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorLi RongQing <lirongqing@baidu.com>2024-06-19 13:18:01 +0200
committerIngo Molnar <mingo@kernel.org>2024-12-29 10:18:44 +0100
commit27834971f616c5e154423c578fa95e0444444ce1 (patch)
tree94e7b37d219dbad82c8847ba115b55fb47a99b8d /arch/x86
parentx86/fred: Clear WFE in missing-ENDBRANCH #CPs (diff)
downloadlinux-27834971f616c5e154423c578fa95e0444444ce1.tar.xz
linux-27834971f616c5e154423c578fa95e0444444ce1.zip
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: f4738f56d1dc ("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> Signed-off-by: Ingo Molnar <mingo@kernel.org> 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
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions