From f8ced3e097680c17e19953d2618143d46c295c4e Mon Sep 17 00:00:00 2001 From: Taylor Beebe <31827475+TaylorBeebe@users.noreply.github.com> Date: Thu, 29 Feb 2024 09:44:50 -0800 Subject: [PATCH] Add StackCheckLib Instances to Platform DSC Files (#446) ## Description An instance of StackCheckLib must be in each DSC to accommodate -fstack-protector and /GS flags. - [x] Impacts functionality? - **Functionality** - Does the change ultimately impact how firmware functions? - Examples: Add a new library, publish a new PPI, update an algorithm, ... - [ ] Impacts security? - **Security** - Does the change have a direct security impact on an application, flow, or firmware? - Examples: Crypto algorithm change, buffer overflow fix, parameter validation improvement, ... - [ ] Breaking change? - **Breaking change** - Will anyone consuming this change experience a break in build or boot behavior? - Examples: Add a new library class, move a module to a different repo, call a function in a new library class in a pre-existing module, ... - [ ] Includes tests? - **Tests** - Does the change include any explicit test code? - Examples: Unit tests, integration tests, robot tests, ... - [ ] Includes documentation? - **Documentation** - Does the change contain explicit documentation additions outside direct code modifications (and comments)? - Examples: Update readme file, add feature readme file, link to documentation on an a separate Web page, ... ## How This Was Tested Tested in pipelines ## Integration Instructions N/A --- AdvLoggerPkg/AdvLoggerPkg.dsc | 2 +- HidPkg/HidPkg.dsc | 1 + MfciPkg/MfciPkg.dsc | 1 + MsApplicationPkg/MsApplicationPkg.dsc | 4 +--- MsCorePkg/MsCorePkg.dsc | 1 + MsGraphicsPkg/MsGraphicsPkg.dsc | 1 + MsWheaPkg/MsWheaPkg.dsc | 1 + PcBdsPkg/PcBdsPkg.dsc | 1 + TpmTestingPkg/TpmTestingPkg.dsc | 3 +-- UefiTestingPkg/UefiTestingPkg.dsc | 2 +- XmlSupportPkg/XmlSupportPkg.dsc | 1 + 11 files changed, 11 insertions(+), 7 deletions(-) diff --git a/AdvLoggerPkg/AdvLoggerPkg.dsc b/AdvLoggerPkg/AdvLoggerPkg.dsc index 668707567f..a3b4601850 100644 --- a/AdvLoggerPkg/AdvLoggerPkg.dsc +++ b/AdvLoggerPkg/AdvLoggerPkg.dsc @@ -60,7 +60,7 @@ UnitTestLib|UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.inf MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf - + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf [LibraryClasses.common.UEFI_APPLICATION] UnitTestPersistenceLib|UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.inf diff --git a/HidPkg/HidPkg.dsc b/HidPkg/HidPkg.dsc index 9974cb7e4d..047c53d44a 100644 --- a/HidPkg/HidPkg.dsc +++ b/HidPkg/HidPkg.dsc @@ -39,6 +39,7 @@ HiiLib |MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf UefiHiiServicesLib |MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf SafeIntLib |MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf # MU_CHANGE - CodeQL change + NULL |MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf [Components.X64] HidPkg/HidKeyboardDxe/HidKeyboardDxe.inf diff --git a/MfciPkg/MfciPkg.dsc b/MfciPkg/MfciPkg.dsc index ae4abd0e67..953fcf8864 100644 --- a/MfciPkg/MfciPkg.dsc +++ b/MfciPkg/MfciPkg.dsc @@ -46,6 +46,7 @@ BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf [LibraryClasses.X64] RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf diff --git a/MsApplicationPkg/MsApplicationPkg.dsc b/MsApplicationPkg/MsApplicationPkg.dsc index 00d4b89016..9249a6b92a 100644 --- a/MsApplicationPkg/MsApplicationPkg.dsc +++ b/MsApplicationPkg/MsApplicationPkg.dsc @@ -30,11 +30,9 @@ UefiLib|MdePkg/Library/UefiLib/UefiLib.inf UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf [LibraryClasses.AARCH64] - # Add support for GCC stack protector - NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf - ################################################################################################### # diff --git a/MsCorePkg/MsCorePkg.dsc b/MsCorePkg/MsCorePkg.dsc index 5e155a244e..a62223fee3 100644 --- a/MsCorePkg/MsCorePkg.dsc +++ b/MsCorePkg/MsCorePkg.dsc @@ -44,6 +44,7 @@ MuTelemetryHelperLib|MsWheaPkg/Library/MuTelemetryHelperLib/MuTelemetryHelperLib.inf DeviceSpecificBusInfoLib|MsCorePkg/Library/DeviceSpecificBusInfoLibNull/DeviceSpecificBusInfoLibNull.inf ExceptionPersistenceLib|MdeModulePkg/Library/BaseExceptionPersistenceLibNull/BaseExceptionPersistenceLibNull.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf diff --git a/MsGraphicsPkg/MsGraphicsPkg.dsc b/MsGraphicsPkg/MsGraphicsPkg.dsc index e0b5880ac5..5438edfe12 100644 --- a/MsGraphicsPkg/MsGraphicsPkg.dsc +++ b/MsGraphicsPkg/MsGraphicsPkg.dsc @@ -44,6 +44,7 @@ UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf diff --git a/MsWheaPkg/MsWheaPkg.dsc b/MsWheaPkg/MsWheaPkg.dsc index a94b363390..c271e56e59 100644 --- a/MsWheaPkg/MsWheaPkg.dsc +++ b/MsWheaPkg/MsWheaPkg.dsc @@ -34,6 +34,7 @@ # BaseLib|MdePkg/Library/BaseLib/BaseLib.inf BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf [LibraryClasses] UefiLib|MdePkg/Library/UefiLib/UefiLib.inf diff --git a/PcBdsPkg/PcBdsPkg.dsc b/PcBdsPkg/PcBdsPkg.dsc index 2cbf9fc103..c9f632edd2 100644 --- a/PcBdsPkg/PcBdsPkg.dsc +++ b/PcBdsPkg/PcBdsPkg.dsc @@ -32,6 +32,7 @@ PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf diff --git a/TpmTestingPkg/TpmTestingPkg.dsc b/TpmTestingPkg/TpmTestingPkg.dsc index 6f75d2136b..2e322ae714 100644 --- a/TpmTestingPkg/TpmTestingPkg.dsc +++ b/TpmTestingPkg/TpmTestingPkg.dsc @@ -38,6 +38,7 @@ Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf Tpm2DebugLib|SecurityPkg/Library/Tpm2DebugLib/Tpm2DebugLibNull.inf Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf [LibraryClasses.common.PEIM] HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf @@ -77,8 +78,6 @@ # [LibraryClasses.X64] RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf - NULL|MdePkg/Library/StackCheckLib/StackCheckLib.inf - StackCheckFailureLib|MdePkg/Library/StackCheckFailureLibNull/StackCheckFailureLibNull.inf [Components] TpmTestingPkg/Library/BaseFvMeasurementExclusionLibNull/BaseFvMeasurementExclusionLibNull.inf diff --git a/UefiTestingPkg/UefiTestingPkg.dsc b/UefiTestingPkg/UefiTestingPkg.dsc index 55a99db70c..d100710a1c 100644 --- a/UefiTestingPkg/UefiTestingPkg.dsc +++ b/UefiTestingPkg/UefiTestingPkg.dsc @@ -69,6 +69,7 @@ CpuPageTableLib|UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableLib.inf DxeMemoryProtectionHobLib|MdeModulePkg/Library/MemoryProtectionHobLibNull/DxeMemoryProtectionHobLibNull.inf FlatPageTableLib|UefiTestingPkg/Library/FlatPageTableLib/FlatPageTableLib.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf [LibraryClasses.ARM, LibraryClasses.AARCH64] ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf @@ -79,7 +80,6 @@ ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf CpuExceptionHandlerLib|ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.inf DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf - NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf NULL|MdePkg/Library/CompilerIntrinsicsLib/ArmCompilerIntrinsicsLib.inf [LibraryClasses.common.DXE_SMM_DRIVER] diff --git a/XmlSupportPkg/XmlSupportPkg.dsc b/XmlSupportPkg/XmlSupportPkg.dsc index f32b5e0356..c0f2c2b9c3 100644 --- a/XmlSupportPkg/XmlSupportPkg.dsc +++ b/XmlSupportPkg/XmlSupportPkg.dsc @@ -29,6 +29,7 @@ UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf XmlTreeLib|XmlSupportPkg/Library/XmlTreeLib/XmlTreeLib.inf XmlTreeQueryLib|XmlSupportPkg/Library/XmlTreeQueryLib/XmlTreeQueryLib.inf + NULL|MdePkg/Library/StackCheckLibNull/StackCheckLibNull.inf [Components] XmlSupportPkg/Library/XmlTreeLib/XmlTreeLib.inf