audk/MdeModulePkg/Core/PiSmmCore
Star Zeng 861c8dff2f MdeModulePkg PiSmmCore: Enhance SMM FreePool to catch buffer overflow
This solution is equivalent to DXE core.

AllocatePool() allocates POOL_TAIL after the buffer.
This POOL_TAIL is checked at FreePool().
If the there is buffer overflow, the issue can be caught at FreePool().

This patch could also handle the eight-byte aligned allocation
requirement. The discussion related to the eight-byte aligned
allocation requirement is at
https://lists.01.org/pipermail/edk2-devel/2017-April/009995.html.

According to the PI spec (Vol 4, Section 3.2 SmmAllocatePool()):
The SmmAllocatePool() function ... All allocations are eight-byte aligned.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2017-04-20 14:10:04 +08:00
..
Dependency.c MdeModulePkg/Core: Fix typos in comments 2016-10-27 09:11:17 +08:00
Dispatcher.c MdeModulePkg: Refine casting expression result to bigger size 2017-03-06 14:33:20 +08:00
Handle.c
InstallConfigurationTable.c
Locate.c MdeModulePkg/Core: Fix typos in comments 2016-10-27 09:11:17 +08:00
MemoryAttributesTable.c MdeModulePkg/PiSmmCore: switch to MdePkg allocation granularity macros 2017-03-06 11:29:25 +01:00
Notify.c
Page.c MdeModulePkg/PiSmmCore: switch to MdePkg allocation granularity macros 2017-03-06 11:29:25 +01:00
PiSmmCore.c MdeModulePkg/PiSmmCore: Add SmiHandlerProfile support. 2017-02-22 15:28:18 +08:00
PiSmmCore.h MdeModulePkg PiSmmCore: Enhance SMM FreePool to catch buffer overflow 2017-04-20 14:10:04 +08:00
PiSmmCore.inf MdeModulePkg/PiSmmCore: Add SmiHandlerProfile support. 2017-02-22 15:28:18 +08:00
PiSmmCore.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PiSmmCoreExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PiSmmCorePrivateData.h
PiSmmIpl.c MdeModulePkg: Refine casting expression result to bigger size 2017-03-06 14:33:20 +08:00
PiSmmIpl.inf MdeModulePkg/PiSmmIpl: Check order of EndOfDxe and DxeSmmReadyToLock 2016-05-30 09:41:02 +08:00
PiSmmIpl.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
PiSmmIplExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
Pool.c MdeModulePkg PiSmmCore: Enhance SMM FreePool to catch buffer overflow 2017-04-20 14:10:04 +08:00
Smi.c MdeModulePkg/PiSmmCore: Add SmiHandlerProfile support. 2017-02-22 15:28:18 +08:00
SmiHandlerProfile.c MdeModulePkg/SmmCore: Fix memory leak on Profile unregistered. 2017-03-31 08:22:53 +08:00
SmramProfileRecord.c MdeModulePkg PiSmmCore: Remove unreferenced symbol for SMRAM profile 2017-03-15 16:47:10 +08:00