audk/MdeModulePkg/Core
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
..
Dxe MdeModulePkg/DxeCore: Add ASSERT to ensure no subtract underflow 2017-04-14 13:13:51 +08:00
DxeIplPeim MdeModulePkg: Remove unsupported PcdExpression usage in module INF 2017-04-06 12:54:49 +08:00
Pei MdeModulePkg/PeiCore: avoid EFI_IMAGE_MACHINE_TYPE_SUPPORTED to check arch 2017-03-29 11:54:07 +01:00
PiSmmCore MdeModulePkg PiSmmCore: Enhance SMM FreePool to catch buffer overflow 2017-04-20 14:10:04 +08:00
RuntimeDxe MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00