audk/MdeModulePkg/Bus
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
..
Ata MdeModulePkg/Bus/Ata: Fix various typos 2020-02-10 22:30:07 +00:00
I2c/I2cDxe MdeModulePkg/Bus/I2c: Fix few typos 2020-02-10 22:30:07 +00:00
Isa MdeModulePkg/Bus/Isa: Fix various typos 2020-02-10 22:30:07 +00:00
Pci MdeModulePkg/SdMmcPciHcDxe: Fix double PciIo Unmap in TRB creation (CVE-2019-14587) 2020-02-18 05:03:49 +00:00
Scsi MdeModulePkg/Bus/Scsi: Fix various typos 2020-02-10 22:30:07 +00:00
Sd MdeModulePkg/Bus/Sd: Fix various typos 2020-02-10 22:30:07 +00:00
Ufs MdeModulePkg/Ufs: Fix UFS flag read from Query Resp UPIU 2019-10-15 09:54:37 +08:00
Usb MdeModulePkg/Usb: Fix various typos 2020-02-10 22:30:07 +00:00