summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam <Sam_Tsai@wiwynn.com>2024-05-29 07:46:03 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-05-30 21:06:38 +0000
commitced13b93afea87a8a1fe6ddbb67240a84cb2e3d3 (patch)
tree1a1698f9661d816ec86657c2ad8a2adb0e35a823
parente7848481160b270ebc59d68ecbc8d2722e3aed8c (diff)
downloadedk2-ced13b93afea87a8a1fe6ddbb67240a84cb2e3d3.zip
edk2-ced13b93afea87a8a1fe6ddbb67240a84cb2e3d3.tar.gz
edk2-ced13b93afea87a8a1fe6ddbb67240a84cb2e3d3.tar.bz2
NetworkPkg TcpDxe: Fixed system stuck on PXE boot flow in iPXE environment
This bug fix is based on the following commit "NetworkPkg TcpDxe: SECURITY PATCH" REF: 1904a64 Issue Description: An "Invalid handle" error was detected during runtime when attempting to destroy a child instance of the hashing protocol. The problematic code segment was: NetworkPkg\TcpDxe\TcpDriver.c Status = Hash2ServiceBinding->DestroyChild(Hash2ServiceBinding, ​&mHash2ServiceHandle); Root Cause Analysis: The root cause of the error was the passing of an incorrect parameter type, a pointer to an EFI_HANDLE instead of an EFI_HANDLE itself, to the DestroyChild function. This mismatch resulted in the function receiving an invalid handle. Implemented Solution: To resolve this issue, the function call was corrected to pass mHash2ServiceHandle directly: NetworkPkg\TcpDxe\TcpDriver.c Status = Hash2ServiceBinding->DestroyChild(Hash2ServiceBinding, mHash2ServiceHandle); This modification ensures the correct handle type is used, effectively rectifying the "Invalid handle" error. Verification: Testing has been conducted, confirming the efficacy of the fix. Additionally, the BIOS can boot into the OS in an iPXE environment. Cc: Doug Flick [MSFT] <doug.edk2@gmail.com> Signed-off-by: Sam Tsai [Wiwynn] <sam_tsai@wiwynn.com> Reviewed-by: Saloni Kasbekar <saloni.kasbekar@intel.com>
-rw-r--r--NetworkPkg/TcpDxe/TcpDriver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/NetworkPkg/TcpDxe/TcpDriver.c b/NetworkPkg/TcpDxe/TcpDriver.c
index 40bba40..c6e7c0d 100644
--- a/NetworkPkg/TcpDxe/TcpDriver.c
+++ b/NetworkPkg/TcpDxe/TcpDriver.c
@@ -509,7 +509,7 @@ TcpDestroyService (
//
// Destroy the instance of the hashing protocol for this controller.
//
- Status = Hash2ServiceBinding->DestroyChild (Hash2ServiceBinding, &mHash2ServiceHandle);
+ Status = Hash2ServiceBinding->DestroyChild (Hash2ServiceBinding, mHash2ServiceHandle);
if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
}