audk/MdeModulePkg/Bus/Pci/NvmExpressDxe
Hao Wu b7f82a3a0f MdeModulePkg NvmExpressDxe: Add check for command packet in PassThru
This commit adds serveral checks for the 'Packet' parameter passed to the
EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL.PassThru() API:

The check for the 'TransferLength' field in
EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET to make sure the value will not
exceed the maximum data transfer size allowed by a controller.

The check for the 'TransferBuffer' and 'TransferLength' fields in
EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET when the Opcode of an NVME
command indicates a data transfer between controller and host.

The check for the 'MetadataLength' field in
EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET to make sure the value is not 0
when the corresponding 'MetadataBuffer' field has a non-NULL value.

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-09-06 15:31:37 +08:00
..
ComponentName.c MdeModulePkg/NvmExpressDxe: Fix wrong logic in GetControllerName() 2015-12-01 00:40:37 +00:00
NvmExpress.c MdeModulePkg NvmExpressDxe: Avoid crashing 'Mode' during OpenProtocol 2016-09-06 15:31:12 +08:00
NvmExpress.h MdeModulePkg: Move/Replace NvmExpressHci.h definitions to Nvme.h. 2016-05-27 13:31:35 +08:00
NvmExpressBlockIo.c MdeModulePkg NvmExpressDxe: Add BlockIo2 support 2016-05-19 12:37:59 +08:00
NvmExpressBlockIo.h MdeModulePkg NvmExpressDxe: Add BlockIo2 support 2016-05-19 12:37:59 +08:00
NvmExpressDiskInfo.c
NvmExpressDiskInfo.h
NvmExpressDxe.inf MdeModulePkg NvmExpressDxe: Add BlockIo2 support 2016-05-19 12:37:59 +08:00
NvmExpressDxe.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
NvmExpressDxeExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00
NvmExpressHci.c MdeModulePkg NvmExpressDxe: Fix invalid queue size when creating IO queues 2016-06-02 16:40:17 +08:00
NvmExpressHci.h MdeModulePkg: Move/Replace NvmExpressHci.h definitions to Nvme.h. 2016-05-27 13:31:35 +08:00
NvmExpressPassthru.c MdeModulePkg NvmExpressDxe: Add check for command packet in PassThru 2016-09-06 15:31:37 +08:00