edk2/SecurityPkg/Library
Mingjie Shen 65cacd6fcd SecurityPkg/DxeTpmMeasureBootLib: Check GPT event size sanitization
TcgMeasureGptTable() ignored the return status of
TpmSanitizePrimaryHeaderGptEventSize(). On failure the EventSize output
is unreliable and was passed straight into AllocateZeroPool() and the
subsequent CopyMem() operations, which can result in an incorrectly
sized allocation and out-of-bounds access when parsing an untrusted GPT.

Check the status and, on error, free the already-allocated PrimaryHeader
and EntryPtr buffers and return EFI_DEVICE_ERROR, matching the handling
already used in DxeTpm2MeasureBootLib's TcgMeasureGptTable().

Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2026-07-07 19:20:07 +00:00
..
AuthVariableLib SecurityPkg/AuthVariableLib: harden signature list filtering 2026-06-30 02:35:17 +00:00
DxeImageAuthenticationStatusLib SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeImageVerificationLib SecurityPkg: Add sanity check for File and FileBuffer inputs 2026-06-24 17:51:16 +00:00
DxeRsa2048Sha256GuidedSectionExtractLib SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeTcg2PhysicalPresenceLib SecurityPkg: align UNI file headers with UNI Spec standard 2026-03-02 19:32:17 +00:00
DxeTcgPhysicalPresenceLib SecurityPkg: align UNI file headers with UNI Spec standard 2026-03-02 19:32:17 +00:00
DxeTpm2MeasureBootLib MdePkg, SecurityPkg, OvmfPkg: Move CCEL table defs to ACPI header 2026-07-03 09:26:33 +00:00
DxeTpmMeasureBootLib SecurityPkg/DxeTpmMeasureBootLib: Check GPT event size sanitization 2026-07-07 19:20:07 +00:00
DxeTpmMeasurementLib SecurityPkg: Support CcMeasurementProtocol in DxeTpmMeasurementLib 2021-12-11 17:00:53 +00:00
FmpAuthenticationLibPkcs7 SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
FmpAuthenticationLibRsa2048Sha256 SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HashInstanceLibSha1 Revert "SecurityPkg: CodeQL Fixes." 2025-08-12 03:50:30 +00:00
HashInstanceLibSha256 SecurityPkg/HashInstanceLibSha256: Remove unused Tpm2CommandLib dependency 2026-06-25 16:53:36 +00:00
HashInstanceLibSha384 SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HashInstanceLibSha512 SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HashInstanceLibSm3 SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
HashLibBaseCryptoRouter SecurityPkg: Update HashLibBaseCryptoRouter 2026-06-17 19:16:45 +00:00
HashLibTpm2 SecurityPkg/HashLibTpm2: Fix unused variable usage 2025-11-29 18:21:50 +01:00
PeiDxeTpmPlatformHierarchyLib SecurityPkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
PeiDxeTpmPlatformHierarchyLibNull ArmVirtPkg/TPM: Add a NULL implementation of TpmPlatformHierarchyLib 2021-10-05 09:54:11 +00:00
PeilessSecMeasureLib SecurityPkg: Integrate Tpm2HelpLib 2026-06-17 19:16:45 +00:00
PeiRsa2048Sha256GuidedSectionExtractLib SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiTcg2PhysicalPresenceLib SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PeiTpmMeasurementLib SecurityPkg/PeiTpmMeasurementLib: Support CC Measurement 2024-12-10 02:09:29 +00:00
PlatformPKProtectionLibVarPolicy SecurityPkg: Update code to be more C11 compliant by using __func__ 2023-04-10 14:19:57 +00:00
PlatformSecureLibNull SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
SecTpmMeasurementLib SecurityPkg/SecTpmMeasurementLib: Fix OverFlow Coverity issue 2025-07-02 07:41:33 +00:00
SecureBootVariableLib SecurityPkg/SecureBootVariableLib: Cleanup debug print readability 2026-05-06 10:43:05 +00:00
SecureBootVariableProvisionLib Revert "SecurityPkg: CodeQL Fixes." 2025-08-12 03:50:30 +00:00
SmmTcg2PhysicalPresenceLib SecurityPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Tcg2PpVendorLibNull SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TcgEventLogRecordLib Revert "SecurityPkg: CodeQL Fixes." 2025-08-12 03:50:30 +00:00
TcgPpVendorLibNull SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TcgStorageCoreLib SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TcgStorageOpalLib MdePkg,SecurityPkg: Fix Spelling Errors in TCG/TPM Definitions 2026-05-08 02:15:34 +00:00
Tpm2CommandLib SecurityPkg: Update Tpm2Help.c Functions 2026-06-17 19:16:45 +00:00
Tpm2DeviceLibDTpm SecurityPkg: Update Tpm2Ptp.h to follow pragma once coding convention 2026-06-25 19:40:31 +00:00
Tpm2DeviceLibFfa SecurityPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Tpm2DeviceLibRouter SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Tpm2DeviceLibTcg2 SecurityPkg/Tpm2DeviceLibTcg2: Make mTcg2Protocol static 2023-08-30 00:05:52 +00:00
Tpm2HelpLib SecurityPkg: Introduce Tpm2HelpLib 2026-06-17 19:16:45 +00:00
Tpm12CommandLib SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Tpm12DeviceLibDTpm Revert "SecurityPkg: CodeQL Fixes." 2025-08-12 03:50:30 +00:00
Tpm12DeviceLibTcg SecurityPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
TpmCommLib SecurityPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00