audk/MdeModulePkg
Hao A Wu e36d5ac7d1 MdeModulePkg/SdMmcPciHcDxe: Fix double PciIo Unmap in TRB creation (CVE-2019-14587)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1989

The commit will avoid unmapping the same resource in error handling logic
for function BuildAdmaDescTable() and SdMmcCreateTrb().

For the error handling in BuildAdmaDescTable():
The error is directly related with the corresponding Map() operation
(mapped address beyond 4G, which is not supported in ADMA), so the Unmap()
operation is done in the error handling logic, and then setting
'Trb->AdmaMap' to NULL to avoid double Unmap.

For the error handling in SdMmcCreateTrb():
The error is not directly related with the corresponding Map() operation,
so the commit will update the code to left SdMmcFreeTrb() for the Unmap
operation to avoid double Unmap.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2020-02-18 05:03:49 +00:00
..
Application MdeModulePkg/Application: Fix various typos 2020-02-10 22:30:07 +00:00
Bus MdeModulePkg/SdMmcPciHcDxe: Fix double PciIo Unmap in TRB creation (CVE-2019-14587) 2020-02-18 05:03:49 +00:00
Core MdeModulePkg/Core/PiSmmCore: Fix various typos 2020-02-10 22:30:07 +00:00
Include MdeModulePkg: remove EnterS3WithImmediateWake () from ResetSystemLib 2020-01-10 07:00:51 +00:00
Library MdeModulePkg: Add DxeResetSystemLib unit test 2020-02-07 19:18:53 +00:00
Logo MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
Test MdeModulePkg: Add DxeResetSystemLib unit test 2020-02-07 19:18:53 +00:00
Universal MdeModulePkg/DisplayEngine: Zero memory before free (CVE-2019-14558) 2020-02-14 08:18:47 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: Add DxeResetSystemLib unit test 2020-02-07 19:18:53 +00:00
MdeModulePkg.dec MdeModulePkg/Capsule: Remove RT restriction in UpdateCapsule service. 2020-02-07 07:43:00 +00:00
MdeModulePkg.dsc MdeModulePkg: LzmaCustomDecompressLib.inf don't support EBC anymore 2019-12-05 00:21:35 +00:00
MdeModulePkg.uni MdeModulePkg: Issues reported by ECC in EDK2. 2020-02-14 07:27:28 +00:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00