audk/MdeModulePkg
Kun Qin 17702186b5 MdeModulePkg: PiSmmCore: Inspect memory guarded with pool headers
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3488

Current free pool routine from PiSmmCore will inspect memory guard status
for target buffer without considering pool headers. This could lead to
`IsMemoryGuarded` function to return incorrect results.

In that sense, allocating a 0 sized pool could cause an allocated buffer
directly points into a guard page, which is legal. However, trying to
free this pool will cause the routine changed in this commit to read XP
pages, which leads to page fault.

This change will inspect memory guarded with pool headers. This can avoid
errors when a pool content happens to be on a page boundary.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Kun Qin <kuqin12@gmail.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-05-13 00:51:41 +00:00
..
Application MdeModulePkg/UiApp: Fix spelling of 'FRONTPAGE' 2022-02-07 08:03:32 +00:00
Bus MdeModulePkg: Update PciEnumeratorSupport to ignore OptionRom if needed 2022-04-02 10:09:47 +00:00
Core MdeModulePkg: PiSmmCore: Inspect memory guarded with pool headers 2022-05-13 00:51:41 +00:00
Include MdeModulePkg: Add bRefClkFreq card attribute programming support 2022-03-10 01:45:14 +00:00
Library edk2/MdeModulePkg/Debuglib: Add Standalone MM support 2022-03-02 02:34:00 +00:00
Logo MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Test MdeModulePkg/UefiSortLib:Add UefiSortLib unit test 2021-08-12 08:34:04 +00:00
Universal MdeModulePkg/PCD: Pcd initialize DXE have assert 2022-05-09 11:10:56 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: Update YAML to ignore specific ECC files/errors 2021-11-30 14:19:07 +00:00
MdeModulePkg.dec MdeModulePkg: Add PcdTdxSharedBitMask 2022-04-02 08:15:12 +00:00
MdeModulePkg.dsc MdeModulePkg: Add BootDiscoveryPolicyUiLib. 2021-08-03 04:59:12 +00:00
MdeModulePkg.uni MdeModulePkg/SdMmcPciHcDxe: Make timeout for SD card configurable 2022-03-17 16:13:22 +00:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00