]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/Core/Pei: Fix pointer size mismatch in EvacuateTempRam()
authorMichael Kubacki <michael.kubacki@microsoft.com>
Thu, 9 Sep 2021 03:46:01 +0000 (11:46 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 16 Sep 2021 01:51:36 +0000 (01:51 +0000)
commitc19d18136ef920e3e84f961e2a335a41147adcb8
tree07a8135f4cf503fea915c60d110236b4c7355100
parent6f501a7c9bb196ce1ad9dd5b0024974d1b6784be
MdeModulePkg/Core/Pei: Fix pointer size mismatch in EvacuateTempRam()

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3512

In 32-bit PEI, the local variable pointers MigratedFvHeader and
RawDataFvHeader in EvacuateTempRam() will be 32-bit in size. The
pointers are currently passed to PeiServicesAllocatePages() which
expects a 64-bit output buffer of type EFI_PHYSICAL_ADDRESS.

When PeiServicesAllocatePages() writes to the buffer, the data
can overflow.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c