audk/MdeModulePkg/Bus/Pci
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
..
EhciDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
EhciPei MdeModulePkg/EhciPei: Initialize the variable Map 2019-11-04 08:56:12 +08:00
IdeBusPei MdeModulePkg: Remove BootInRecoveryMode PPI 2019-05-09 20:52:41 +08:00
IncompatiblePciDeviceSupportDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
NonDiscoverablePciDeviceDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
NvmExpressDxe MdeModulePkg/NvmExpressDxe: Fix wrong queue size for async IO queues 2019-11-20 02:47:19 +00:00
NvmExpressPei MdeModulePkg/NvmExpressPei: Fix Opal S3 unlock issue 2019-10-30 08:17:49 +08:00
PciBusDxe MdeModulePkg: Issues reported by ECC in EDK2. 2020-02-14 07:27:28 +00:00
PciHostBridgeDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
PciSioSerialDxe MdeModulePkg: fix UninstallMultipleProtocolInterfaces() calls 2019-10-09 09:40:10 +02:00
SataControllerDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
SdMmcPciHcDxe MdeModulePkg/SdMmcPciHcDxe: Fix double PciIo Unmap in TRB creation (CVE-2019-14587) 2020-02-18 05:03:49 +00:00
SdMmcPciHcPei MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
UfsPciHcDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
UfsPciHcPei MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
UhciDxe MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00
UhciPei MdeModulePkg/UhciPei: Initialize the variable RequestMap 2019-11-04 08:56:12 +08:00
XhciDxe MdeModulePkg/XhciDxe: Fix Aligned Page Allocation 2019-10-21 08:59:25 +08:00
XhciPei MdeModulePkg/XhciPei: Fix Aligned Page Allocation 2019-10-21 08:59:36 +08:00