SecurityPkg: DxeTpm2MeasureBootLib: SECURITY PATCH 4118 - CVE 2022-36764
This commit contains the patch files and tests for DxeTpm2MeasureBootLib CVE 2022-36764. Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Doug Flick [MSFT] <doug.edk2@gmail.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
1ddcb9fc6b
commit
c7b2794421
@@ -9,6 +9,9 @@
|
||||
Tcg2MeasureGptTable() function will receive untrusted GPT partition table, and parse
|
||||
partition data carefully.
|
||||
|
||||
Tcg2MeasurePeImage() function will accept untrusted PE/COFF image and validate its
|
||||
data structure within this image buffer before use.
|
||||
|
||||
Copyright (c) Microsoft Corporation.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
@@ -110,4 +113,27 @@ SanitizePrimaryHeaderGptEventSize (
|
||||
OUT UINT32 *EventSize
|
||||
);
|
||||
|
||||
#endif // DXE_TPM2_MEASURE_BOOT_LIB_SANITATION_
|
||||
/**
|
||||
This function will validate that the PeImage Event Size from the loaded image is sane
|
||||
It will check the following:
|
||||
- EventSize does not overflow
|
||||
|
||||
@param[in] FilePathSize - Size of the file path.
|
||||
@param[out] EventSize - Pointer to the event size.
|
||||
|
||||
@retval EFI_SUCCESS
|
||||
The event size is valid.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES
|
||||
Overflow would have occurred.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER
|
||||
One of the passed parameters was invalid.
|
||||
**/
|
||||
EFI_STATUS
|
||||
SanitizePeImageEventSize (
|
||||
IN UINT32 FilePathSize,
|
||||
OUT UINT32 *EventSize
|
||||
);
|
||||
|
||||
#endif // DXE_TPM2_MEASURE_BOOT_LIB_VALIDATION_
|
||||
|
Reference in New Issue
Block a user