1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/arch/x86/coco/tdx
Kirill A. Shutemov b6fb565a2d x86/tdx: Fix data leak in mmio_read()
The mmio_read() function makes a TDVMCALL to retrieve MMIO data for an
address from the VMM.

Sean noticed that mmio_read() unintentionally exposes the value of an
initialized variable (val) on the stack to the VMM.

This variable is only needed as an output value. It did not need to be
passed to the VMM in the first place.

Do not send the original value of *val to the VMM.

[ dhansen: clarify what 'val' is used for. ]

Fixes: 31d58c4e55 ("x86/tdx: Handle in-kernel MMIO")
Reported-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc:stable@vger.kernel.org
Link: https://lore.kernel.org/all/20240826125304.1566719-1-kirill.shutemov%40linux.intel.com
2024-08-26 12:45:19 -07:00
..
Makefile x86/tdx: Add unaccepted memory support 2023-06-06 18:25:57 +02:00
tdcall.S x86/tdx: Reimplement __tdx_hypercall() using TDX_MODULE_CALL asm 2023-09-12 16:30:14 -07:00
tdx-shared.c x86/virt/tdx: Define TDX supported page sizes as macros 2023-12-08 09:12:00 -08:00
tdx.c x86/tdx: Fix data leak in mmio_read() 2024-08-26 12:45:19 -07:00