8e51a8153a
- edk2-MdeModulePkg-Change-use-of-EFI_D_-to-DEBUG_.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-MdeModulePkg-Potential-UINT32-overflow-in-S3-ResumeC.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-MdePkg-Apply-uncrustify-changes.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-NetworkPkg-Apply-uncrustify-changes.p2.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Rename-RdRandGenerateEntropy-to-g.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Remove-ArchGetSupportedRngAlgorit.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Documentation-include-parameter-c.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Check-before-advertising-Cpu-Rng-.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Add-AArch64-RawAlgorithm-support-.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Add-debug-warning-for-NULL-PcdCpu.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Rename-AArch64-RngDxe.c.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Add-Arm-support-of-RngDxe.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Correctly-update-mAvailableAlgoAr.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Conditionally-install-EFI_RNG_PRO.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-MdeModulePkg-Duplicate-BaseRngLibTimerLib-to-MdeModu.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-MdePkg-Add-deprecated-warning-to-BaseRngLibTimer.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-SecurityPkg.dec-Move-PcdCpuRngSupportedA.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-MdePkg-DxeRngLib-Request-raw-algorithm-instead-of-de.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-MdePkg-Rng-Add-GUID-to-describe-Arm-Rndr-Rng-algorit.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-MdeModulePkg-Rng-Add-GUID-to-describe-unsafe-Rng-alg.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-MdePkg-Rng-Add-GetRngGuid-to-RngLib.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Use-GetRngGuid-when-probing-RngLi.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-Simplify-Rng-algorithm-selection-.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-NetworkPkg-SECURITY-PATCH-CVE-2023-45237.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-MdePkg-BaseRngLib-Add-a-smoketest-for-RDRAND-and-che.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-SecurityPkg-RngDxe-add-rng-test.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-OvmfPkg-wire-up-RngDxe.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-CryptoPkg-Test-call-ProcessLibraryConstructorList.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-MdePkg-X86UnitTestHost-set-rdrand-cpuid-bit.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-NetworkPkg-TcpDxe-SECURITY-PATCH-CVE-2023-45236.patch [RHEL-21854 RHEL-21856 RHEL-40099] - edk2-NetworkPkg-TcpDxe-Fixed-system-stuck-on-PXE-boot-flo.patch [RHEL-21854 RHEL-21856 RHEL-40099] - Resolves: RHEL-21854 (CVE-2023-45236 edk2: Predictable TCP Initial Sequence Numbers [rhel-8]) - Resolves: RHEL-21856 (CVE-2023-45237 edk2: Use of a Weak PseudoRandom Number Generator [rhel-8]) - Resolves: RHEL-40099 (CVE-2024-1298 edk2: Temporary DoS vulnerability [rhel-8.10.z])
90 lines
3.0 KiB
Diff
90 lines
3.0 KiB
Diff
From 3800b9ee5d6d4c05c7e27f949c3b32c422c78f2d Mon Sep 17 00:00:00 2001
|
|
From: Jon Maloy <jmaloy@redhat.com>
|
|
Date: Thu, 20 Jun 2024 16:02:31 -0400
|
|
Subject: [PATCH 16/31] MdePkg: Add deprecated warning to BaseRngLibTimer
|
|
|
|
RH-Author: Jon Maloy <jmaloy@redhat.com>
|
|
RH-MergeRequest: 77: UINT32 overflow in S3 ResumeCount and Pixiefail fixes
|
|
RH-Jira: RHEL-21854 RHEL-21856 RHEL-40099
|
|
RH-Acked-by: Gerd Hoffmann <None>
|
|
RH-Commit: [16/31] 6e199344d083e90f60cbe01dfb3c2a3719e3177d
|
|
|
|
JIRA: https://issues.redhat.com/browse/RHEL-21856
|
|
Upstream: Merged
|
|
CVE: CVE-2023-45237
|
|
|
|
commit e93468442b7da7bc80e00014e854c0c8a0a7184b
|
|
Author: Pierre Gondois <pierre.gondois@arm.com>
|
|
Date: Fri Aug 11 16:33:03 2023 +0200
|
|
|
|
MdePkg: Add deprecated warning to BaseRngLibTimer
|
|
|
|
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4504
|
|
|
|
To keep the MdePkg self-contained and avoid dependencies on GUIDs
|
|
defined in other packages, the BaseRngLibTimer was moved to the
|
|
MdePkg.
|
|
Add a constructor to warn and request to use the MdeModulePkg
|
|
implementation.
|
|
|
|
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
|
|
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
|
|
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
|
|
Acked-by: Ard Biesheuvel <ardb@kernel.org>
|
|
Tested-by: Kun Qin <kun.qin@microsoft.com>
|
|
|
|
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
|
|
---
|
|
.../BaseRngLibTimerLib/BaseRngLibTimerLib.inf | 1 +
|
|
.../Library/BaseRngLibTimerLib/RngLibTimer.c | 22 +++++++++++++++++++
|
|
2 files changed, 23 insertions(+)
|
|
|
|
diff --git a/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf b/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
|
|
index f857290e82..96c90db63f 100644
|
|
--- a/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
|
|
+++ b/MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf
|
|
@@ -23,6 +23,7 @@
|
|
MODULE_TYPE = BASE
|
|
VERSION_STRING = 1.0
|
|
LIBRARY_CLASS = RngLib
|
|
+ CONSTRUCTOR = BaseRngLibTimerConstructor
|
|
|
|
[Sources]
|
|
RngLibTimer.c
|
|
diff --git a/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c b/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c
|
|
index 54d29d96f3..6b8392162b 100644
|
|
--- a/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c
|
|
+++ b/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c
|
|
@@ -13,6 +13,28 @@
|
|
|
|
#define DEFAULT_DELAY_TIME_IN_MICROSECONDS 10
|
|
|
|
+/**
|
|
+ This implementation is to be replaced by its MdeModulePkg copy.
|
|
+ The cause being that some GUIDs (gEdkiiRngAlgorithmUnSafe) cannot
|
|
+ be defined in the MdePkg.
|
|
+
|
|
+ @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
|
|
+**/
|
|
+RETURN_STATUS
|
|
+EFIAPI
|
|
+BaseRngLibTimerConstructor (
|
|
+ VOID
|
|
+ )
|
|
+{
|
|
+ DEBUG ((
|
|
+ DEBUG_WARN,
|
|
+ "Warning: This BaseRngTimerLib implementation will be deprecated. "
|
|
+ "Please use the MdeModulePkg implementation equivalent.\n"
|
|
+ ));
|
|
+
|
|
+ return RETURN_SUCCESS;
|
|
+}
|
|
+
|
|
/**
|
|
Using the TimerLib GetPerformanceCounterProperties() we delay
|
|
for enough time for the PerformanceCounter to increment.
|
|
--
|
|
2.39.3
|
|
|