Revision: 17932
http://sourceforge.net/p/edk2/code/17932
Author: hwu1225
Date: 2015-07-13 01:23:37 +0000 (Mon, 13 Jul 2015)
Log Message:
-----------
IntelFrameworkModulePkg BootMngr: Fix potential read over memory boundary
This commit will resolve the issue brought by r17737.
HelpString = AllocateCopyPool (HelpSize, L"Device Path : ");
The above using of AllocateCopyPool() will read contents out of the scope
of the constant string. Potential risk for the constant string allocated
at the boundary of memory region.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <[email protected]>
Reviewed-by: Qiu Shumin <[email protected]>
Reviewed-by: Jeff Fan <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/17737
Modified Paths:
--------------
trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
Modified:
trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
===================================================================
--- trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
2015-07-13 01:23:14 UTC (rev 17931)
+++ trunk/edk2/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
2015-07-13 01:23:37 UTC (rev 17932)
@@ -319,8 +319,9 @@
TempStr = DevicePathToStr (Option->DevicePath);
HelpSize = StrSize (TempStr) + StrSize (L"Device Path : ");
- HelpString = AllocateCopyPool (HelpSize, L"Device Path : ");
+ HelpString = AllocateZeroPool (HelpSize);
ASSERT (HelpString != NULL);
+ StrCatS (HelpString, HelpSize / sizeof (CHAR16), L"Device Path : ");
StrCatS (HelpString, HelpSize / sizeof (CHAR16), TempStr);
HelpToken = HiiSetString (HiiHandle, 0, HelpString, NULL);
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits