AllocateCopyPool(AllocationSize, *Buffer) will copy "AllocationSize" bytes of
memory from old "Buffer" to new allocated one. If "AllocationSize" is bigger
than size of "Buffer", heap memory overflow occurs during copy.
The solution is to allocate pool first then copy the necessary bytes to new
memory. This can avoid copying extra bytes from unknown memory range.
Jian J Wang (3):
MdeModulePkg: Fix misuses of AllocateCopyPool
ShellPkg: Fix misuses of AllocateCopyPool
IntelFrameworkModulePkg: Fix misuses of AllocateCopyPool
.../Universal/BdsDxe/DeviceMngr/DeviceManager.c | 4 +++-
MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c | 3 ++-
.../BootMaintenanceManagerCustomizedUiSupport.c | 3 ++-
MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c | 4 +++-
MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 10 ++++++----
.../Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c | 3 ++-
MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c | 3 ++-
ShellPkg/Application/Shell/Shell.c | 4 +++-
.../Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c | 6 ++++--
9 files changed, 27 insertions(+), 13 deletions(-)
--
2.14.1.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel