]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/Gcd: Check memory allocation when initializing memory
authorJeff Brasen <jbrasen@nvidia.com>
Wed, 28 Oct 2020 17:35:02 +0000 (01:35 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 5 Nov 2020 03:37:37 +0000 (03:37 +0000)
commit978b9d511f5b9cb7bc5b09749f86c39bec51525d
treea6db134459aa752ef76f6010277288fe577ba05d
parent8d5708833509ece6ac63084dc07c8ac53c4d4c1a
MdeModulePkg/Gcd: Check memory allocation when initializing memory

CoreInitializeMemoryServices was not checking for any existing memory
allocation created in the HOB producer phase. If there are memory
allocations outside of the region covered by the HOB List then Gcd could
select that region for memory which can result in the memory allocation
to not be handled and memory overwrites.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
MdeModulePkg/Core/Dxe/Gcd/Gcd.c