audk/OvmfPkg/Library/BaseMemEncryptSevLib
Tom Lendacky 85b8eac59b OvfmPkg/VmgExitLib: Validate #VC MMIO is to un-encrypted memory
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3108

When SEV-ES is active, and MMIO operation will trigger a #VC and the
VmgExitLib exception handler will process this MMIO operation.

A malicious hypervisor could try to extract information from encrypted
memory by setting a reserved bit in the guests nested page tables for
a non-MMIO area. This can result in the encrypted data being copied into
the GHCB shared buffer area and accessed by the hypervisor.

Prevent this by ensuring that the MMIO source/destination is un-encrypted
memory. For the APIC register space, access is allowed in general.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <0cf28470ad5e694af45f7f0b35296628f819567d.1610045305.git.thomas.lendacky@amd.com>
2021-01-07 19:34:39 +00:00
..
Ia32 OvmfPkg/MemEncryptSevLib: Address range encryption state interface 2021-01-07 19:34:39 +00:00
X64 OvmfPkg/MemEncryptSevLib: Address range encryption state interface 2021-01-07 19:34:39 +00:00
DxeMemEncryptSevLib.inf OvfmPkg/VmgExitLib: Validate #VC MMIO is to un-encrypted memory 2021-01-07 19:34:39 +00:00
DxeMemEncryptSevLibInternal.c OvmfPkg/MemEncryptSevLib: Add an interface to retrieve the encryption mask 2021-01-07 19:34:39 +00:00
PeiDxeMemEncryptSevLibInternal.c OvmfPkg/MemEncryptSevLib: Make the MemEncryptSevLib available for SEC 2021-01-07 19:34:39 +00:00
PeiMemEncryptSevLib.inf OvmfPkg/MemEncryptSevLib: Address range encryption state interface 2021-01-07 19:34:39 +00:00
PeiMemEncryptSevLibInternal.c OvmfPkg/MemEncryptSevLib: Add an interface to retrieve the encryption mask 2021-01-07 19:34:39 +00:00
SecMemEncryptSevLib.inf OvmfPkg/MemEncryptSevLib: Address range encryption state interface 2021-01-07 19:34:39 +00:00
SecMemEncryptSevLibInternal.c OvmfPkg/MemEncryptSevLib: Make the MemEncryptSevLib available for SEC 2021-01-07 19:34:39 +00:00