There is a temporary variable in SAS driver which was not initialized with SAS disk, so the value of this variable depends on the unknown stack content. Later it will be used as source buffer in gBS->CopyMem, and a translation fault exception would occur if the value is beyond valid memory address as a pointer. Details can be found in https://bugs.linaro.org/show_bug.cgi?id=3464
This patch is to fix this bug, avoiding to use uninitialized value when connecting SAS disks.
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo heyi.guo@linaro.org Cc: Leif Lindholm leif.lindholm@linaro.org Cc: Ard Biesheuvel ard.biesheuvel@linaro.org --- Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi | Bin 98144 -> 98112 bytes Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi | Bin 116288 -> 112832 bytes 2 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi b/Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi index c9b2ad6..c37b922 100644 Binary files a/Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi and b/Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi differ diff --git a/Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi b/Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi index 9a680c5..a57b8e1 100644 Binary files a/Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi and b/Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi differ