Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHERRY-PICK] [Release/202311] NetworkPkg TcpDxe: Fixed system stuck on PXE boot flow in iPXE environment #879

Conversation

Flickdm
Copy link
Member

@Flickdm Flickdm commented May 30, 2024

Description

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] [email protected]

Reviewed-by: Saloni Kasbekar [email protected]

  • [ X] Impacts functionality?
    • Corrects handle passed to DestroyChild(..)
  • Impacts security?
    • N/A
  • Breaking change?
    • N/A
  • Includes tests?
    • N/A
  • Includes documentation?
    • N/A

How This Was Tested

"Testing has been conducted, confirming the efficacy of the fix. Additionally, the BIOS can boot into the OS in an iPXE environment."

iPXE booted successfully

Integration Instructions

N/A

@Flickdm Flickdm force-pushed the fix/release/202311/tcpdriver/hash2/invalid_handle branch from bcdb348 to 64b64b3 Compare May 30, 2024 23:54
…nment

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] <[email protected]>

Signed-off-by: Sam Tsai [Wiwynn] <[email protected]>
Reviewed-by: Saloni Kasbekar <[email protected]>
@Flickdm Flickdm force-pushed the fix/release/202311/tcpdriver/hash2/invalid_handle branch from 64b64b3 to 590d452 Compare May 30, 2024 23:55
@Flickdm Flickdm enabled auto-merge (squash) May 31, 2024 00:06
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 1.22%. Comparing base (15c8d24) to head (590d452).

Files Patch % Lines
NetworkPkg/TcpDxe/TcpDriver.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           release/202311     #879   +/-   ##
===============================================
  Coverage            1.22%    1.22%           
===============================================
  Files                1303     1303           
  Lines              335691   335691           
  Branches             3189     3189           
===============================================
  Hits                 4118     4118           
  Misses             331497   331497           
  Partials               76       76           
Flag Coverage Δ
NetworkPkg 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Flickdm Flickdm merged commit ad553d0 into microsoft:release/202311 May 31, 2024
33 checks passed
@makubacki
Copy link
Member

Should have been marked [CHERRY-PICK] in case it goes to other branches as well.

@makubacki
Copy link
Member

Should have been marked [CHERRY-PICK] in case it goes to other branches as well.

Also type:bug label.

@makubacki makubacki added the type:bug Something isn't working label May 31, 2024
@Flickdm
Copy link
Member Author

Flickdm commented May 31, 2024

Should have been marked [CHERRY-PICK] in case it goes to other branches as well.

You're right - I thought that I made that change and somehow it got dropped

I'll make sure it's on the other ones

@Flickdm Flickdm changed the title NetworkPkg TcpDxe: Fixed system stuck on PXE boot flow in iPXE enviro… [CHERRY-PICK] [Release/202311] NetworkPkg TcpDxe: Fixed system stuck on PXE boot flow in iPXE enviro… May 31, 2024
@Flickdm Flickdm changed the title [CHERRY-PICK] [Release/202311] NetworkPkg TcpDxe: Fixed system stuck on PXE boot flow in iPXE enviro… [CHERRY-PICK] [Release/202311] NetworkPkg TcpDxe: Fixed system stuck on PXE boot flow in iPXE environment May 31, 2024
ProjectMuBot referenced this pull request in microsoft/mu_tiano_platforms Jun 1, 2024
Introduces 21 new commits in [MU_BASECORE](https://github.com/microsoft/mu_basecore.git).

<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/microsoft/mu_basecore/commit/e0afbf07ed3c6f2e99b79eff8b68b56102bf1f78">e0afbf</a> BinToPcd.py: Remove xdrlib import (<a href="https://github.com/microsoft/mu_basecore/pull/852">#852</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/94c9ad0fd5bd3f09f5c7eace3470dd7ed0e45352">94c9ad</a> [CHERRY-PICK] UefiCpuPkg/MpInitLib: Update the comments of _CPU_MP_DATA.</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/20f68f46c492bd0f4ec3d44644abd602a97eb951">20f68f</a> [CHERRY-PICK] UefiCpuPkg/MpInitLib: Use AsmCpuidEx() for CPUID_EXTENDED_TOPOLOGY leaf</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/ed8bd2e54183320fef528308eaedbde6f0baa49f">ed8bd2</a> [CHERRY-PICK] UefiCpuPkg/MpInitLib: Copy SEV-ES save area pointer during APIC ID sorting</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/dbb8cf68c4c5ee6581a8e9266f2cf49f4cf3e353">dbb8cf</a> [CHERRY-PICK] UefiCpuPkg/PiSmmCpuDxeSmm: Use NonSmm BSP as default SMM BSP.</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/cd3ce1d2faaa2fdadafaabd9fc85a2bab6e73bdb">cd3ce1</a> [CHERRY-PICK] UefiCpuPkg/BaseXApicLib: Fix CPUID_V2_EXTENDED_TOPOLOGY detection</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/33820913d87906ddae9680a59b30581f1213e674">338209</a> [CHERRY-PICK] UefiCpuPkg/PiSmmCpuDxeSmm: Get processor extended information</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/8307ad7b1f7e3ad5592dcb70cf62d677c1793607">8307ad</a> [CHERRY-PICK] UefiCpuPkg: Create gMpInformationHobGuid2 in UefiCpuPkg</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/236d378ea337cef6eeeb77793fab3a047b7caaa6">236d37</a> [CHERRY-PICK] UefiCpuPkg: Build MpInfo2HOB in CpuMpPei</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/e3b9ca15de86fcb46e7e17a70cb78453e18fa16b">e3b9ca</a> [CHERRY-PICK] UefiCpuPkg: Consume MpInfo2Hob in PiSmmCpuDxe</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/84b4db3c2e86060ad45184c7a1841a01e03ae85f">84b4db</a> [CHERRY-PICK] UefiCpuPkg: Add a new field in MpInfo2 HOB</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/f380d9314efaf1cb8bf3ce7cdf0349be48998328">f380d9</a> [CHERRY-PICK] UefiCpuPkg: Cache core type in MpInfo2 HOB</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/68caaf8fdf854b59d5d73b28ce68cadd037d7e09">68caaf</a> [CHERRY-PICK] UefiCpuPkg: Avoid assuming only one smmbasehob</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/2b08534cb8874f73f321163fc411bfb9f7edcd27">2b0853</a> [CHERRY-PICK] MdeModulePkg: Support customized FV Migration Information</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/88c69a324151f03992a97c55066e75abd70a33af">88c69a</a> MdePkg/SmBios.h: Add New ProcessorUpgrade definitions for SMBIOS Type4</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/13dff4ff031a43c1941faeeb110194d61ad70821">13dff4</a> MdeModulePkg/HiiDatabaseDxe: Correcting a Codeql change (<a href="https://github.com/microsoft/mu_basecore/pull/860">#860</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/45cb26c60568b85395be1c3adf2ebcd040a0cfd6">45cb26</a> MdeModulePkg\DxeCore: BS memory allocated from SMM Entry points is still RP (<a href="https://github.com/microsoft/mu_basecore/pull/861">#861</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/7f9a27e0d7bcefd06e8d45fc06d5e906b6898911">7f9a27</a> [CHERRY-PICK] UefiCpuPkg: change name of gMpInformationHobGuid2 (<a href="https://github.com/microsoft/mu_basecore/pull/875">#875</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/ca0ae3c4a56c1eb0cd2c0c84c34bd5a09f58c3c3">ca0ae3</a> Fixing an edge case in AutoGen script where BUILDMODULE might fail (<a href="https://github.com/microsoft/mu_basecore/pull/878">#878</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/15c8d24582a300628d2c1736a443c39cabbb3c45">15c8d2</a> Repo File Sync: synced file(s) with microsoft/mu_devops (<a href="https://github.com/microsoft/mu_basecore/pull/874">#874</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/ad553d0853e98883e30442740626d820497d6918">ad553d</a> NetworkPkg TcpDxe: Fixed system stuck on PXE boot flow in iPXE enviro… (<a href="https://github.com/microsoft/mu_basecore/pull/879">#879</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <[email protected]>
makubacki referenced this pull request in microsoft/mu_tiano_platforms Jun 3, 2024
Introduces 21 new commits in [MU_BASECORE](https://github.com/microsoft/mu_basecore.git).

<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/microsoft/mu_basecore/commit/e0afbf07ed3c6f2e99b79eff8b68b56102bf1f78">e0afbf</a> BinToPcd.py: Remove xdrlib import (<a href="https://github.com/microsoft/mu_basecore/pull/852">#852</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/94c9ad0fd5bd3f09f5c7eace3470dd7ed0e45352">94c9ad</a> [CHERRY-PICK] UefiCpuPkg/MpInitLib: Update the comments of _CPU_MP_DATA.</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/20f68f46c492bd0f4ec3d44644abd602a97eb951">20f68f</a> [CHERRY-PICK] UefiCpuPkg/MpInitLib: Use AsmCpuidEx() for CPUID_EXTENDED_TOPOLOGY leaf</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/ed8bd2e54183320fef528308eaedbde6f0baa49f">ed8bd2</a> [CHERRY-PICK] UefiCpuPkg/MpInitLib: Copy SEV-ES save area pointer during APIC ID sorting</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/dbb8cf68c4c5ee6581a8e9266f2cf49f4cf3e353">dbb8cf</a> [CHERRY-PICK] UefiCpuPkg/PiSmmCpuDxeSmm: Use NonSmm BSP as default SMM BSP.</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/cd3ce1d2faaa2fdadafaabd9fc85a2bab6e73bdb">cd3ce1</a> [CHERRY-PICK] UefiCpuPkg/BaseXApicLib: Fix CPUID_V2_EXTENDED_TOPOLOGY detection</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/33820913d87906ddae9680a59b30581f1213e674">338209</a> [CHERRY-PICK] UefiCpuPkg/PiSmmCpuDxeSmm: Get processor extended information</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/8307ad7b1f7e3ad5592dcb70cf62d677c1793607">8307ad</a> [CHERRY-PICK] UefiCpuPkg: Create gMpInformationHobGuid2 in UefiCpuPkg</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/236d378ea337cef6eeeb77793fab3a047b7caaa6">236d37</a> [CHERRY-PICK] UefiCpuPkg: Build MpInfo2HOB in CpuMpPei</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/e3b9ca15de86fcb46e7e17a70cb78453e18fa16b">e3b9ca</a> [CHERRY-PICK] UefiCpuPkg: Consume MpInfo2Hob in PiSmmCpuDxe</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/84b4db3c2e86060ad45184c7a1841a01e03ae85f">84b4db</a> [CHERRY-PICK] UefiCpuPkg: Add a new field in MpInfo2 HOB</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/f380d9314efaf1cb8bf3ce7cdf0349be48998328">f380d9</a> [CHERRY-PICK] UefiCpuPkg: Cache core type in MpInfo2 HOB</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/68caaf8fdf854b59d5d73b28ce68cadd037d7e09">68caaf</a> [CHERRY-PICK] UefiCpuPkg: Avoid assuming only one smmbasehob</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/2b08534cb8874f73f321163fc411bfb9f7edcd27">2b0853</a> [CHERRY-PICK] MdeModulePkg: Support customized FV Migration Information</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/88c69a324151f03992a97c55066e75abd70a33af">88c69a</a> MdePkg/SmBios.h: Add New ProcessorUpgrade definitions for SMBIOS Type4</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/13dff4ff031a43c1941faeeb110194d61ad70821">13dff4</a> MdeModulePkg/HiiDatabaseDxe: Correcting a Codeql change (<a href="https://github.com/microsoft/mu_basecore/pull/860">#860</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/45cb26c60568b85395be1c3adf2ebcd040a0cfd6">45cb26</a> MdeModulePkg\DxeCore: BS memory allocated from SMM Entry points is still RP (<a href="https://github.com/microsoft/mu_basecore/pull/861">#861</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/7f9a27e0d7bcefd06e8d45fc06d5e906b6898911">7f9a27</a> [CHERRY-PICK] UefiCpuPkg: change name of gMpInformationHobGuid2 (<a href="https://github.com/microsoft/mu_basecore/pull/875">#875</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/ca0ae3c4a56c1eb0cd2c0c84c34bd5a09f58c3c3">ca0ae3</a> Fixing an edge case in AutoGen script where BUILDMODULE might fail (<a href="https://github.com/microsoft/mu_basecore/pull/878">#878</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/15c8d24582a300628d2c1736a443c39cabbb3c45">15c8d2</a> Repo File Sync: synced file(s) with microsoft/mu_devops (<a href="https://github.com/microsoft/mu_basecore/pull/874">#874</a>)</li>
<li><a href="https://github.com/microsoft/mu_basecore/commit/ad553d0853e98883e30442740626d820497d6918">ad553d</a> NetworkPkg TcpDxe: Fixed system stuck on PXE boot flow in iPXE enviro… (<a href="https://github.com/microsoft/mu_basecore/pull/879">#879</a>)</li>
</ul>
</details>

Signed-off-by: Project Mu Bot <[email protected]>
Flickdm added a commit to Flickdm/mu_basecore that referenced this pull request Jul 19, 2024
microsoft#879)

## Description

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] <[email protected]>


Reviewed-by: Saloni Kasbekar <[email protected]>

- [ X] Impacts functionality?
  - Corrects handle passed to DestroyChild(..)
- [ ] Impacts security?
  - N/A
- [ ] Breaking change?
  - N/A
- [ ] Includes tests?
  - N/A
- [ ] Includes documentation?
  - N/A

## How This Was Tested

"Testing has been conducted, confirming the efficacy of the fix.
Additionally, the BIOS can boot into the OS in an iPXE environment."

iPXE booted successfully

## Integration Instructions

N/A

Signed-off-by: Sam Tsai [Wiwynn] <[email protected]>
Co-authored-by: Sam <[email protected]>
Flickdm added a commit to Flickdm/mu_basecore that referenced this pull request Jul 19, 2024
microsoft#879)

## Description

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] <[email protected]>


Reviewed-by: Saloni Kasbekar <[email protected]>

- [ X] Impacts functionality?
  - Corrects handle passed to DestroyChild(..)
- [ ] Impacts security?
  - N/A
- [ ] Breaking change?
  - N/A
- [ ] Includes tests?
  - N/A
- [ ] Includes documentation?
  - N/A

## How This Was Tested

"Testing has been conducted, confirming the efficacy of the fix.
Additionally, the BIOS can boot into the OS in an iPXE environment."

iPXE booted successfully

## Integration Instructions

N/A

Signed-off-by: Sam Tsai [Wiwynn] <[email protected]>
Co-authored-by: Sam <[email protected]>
Flickdm added a commit to Flickdm/mu_basecore that referenced this pull request Jul 19, 2024
microsoft#879)

## Description

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] <[email protected]>


Reviewed-by: Saloni Kasbekar <[email protected]>

- [ X] Impacts functionality?
  - Corrects handle passed to DestroyChild(..)
- [ ] Impacts security?
  - N/A
- [ ] Breaking change?
  - N/A
- [ ] Includes tests?
  - N/A
- [ ] Includes documentation?
  - N/A

## How This Was Tested

"Testing has been conducted, confirming the efficacy of the fix.
Additionally, the BIOS can boot into the OS in an iPXE environment."

iPXE booted successfully

## Integration Instructions

N/A

Signed-off-by: Sam Tsai [Wiwynn] <[email protected]>
Co-authored-by: Sam <[email protected]>
Flickdm added a commit to Flickdm/mu_basecore that referenced this pull request Jul 19, 2024
microsoft#879)

## Description

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] <[email protected]>


Reviewed-by: Saloni Kasbekar <[email protected]>

- [ X] Impacts functionality?
  - Corrects handle passed to DestroyChild(..)
- [ ] Impacts security?
  - N/A
- [ ] Breaking change?
  - N/A
- [ ] Includes tests?
  - N/A
- [ ] Includes documentation?
  - N/A

## How This Was Tested

"Testing has been conducted, confirming the efficacy of the fix.
Additionally, the BIOS can boot into the OS in an iPXE environment."

iPXE booted successfully

## Integration Instructions

N/A

Signed-off-by: Sam Tsai [Wiwynn] <[email protected]>
Co-authored-by: Sam <[email protected]>
Flickdm added a commit to Flickdm/mu_basecore that referenced this pull request Jul 19, 2024
microsoft#879)

## Description

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] <[email protected]>


Reviewed-by: Saloni Kasbekar <[email protected]>

- [ X] Impacts functionality?
  - Corrects handle passed to DestroyChild(..)
- [ ] Impacts security?
  - N/A
- [ ] Breaking change?
  - N/A
- [ ] Includes tests?
  - N/A
- [ ] Includes documentation?
  - N/A

## How This Was Tested

"Testing has been conducted, confirming the efficacy of the fix.
Additionally, the BIOS can boot into the OS in an iPXE environment."

iPXE booted successfully

## Integration Instructions

N/A

Signed-off-by: Sam Tsai [Wiwynn] <[email protected]>
Co-authored-by: Sam <[email protected]>
Flickdm added a commit that referenced this pull request Jul 19, 2024
#879)

## Description

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] <[email protected]>


Reviewed-by: Saloni Kasbekar <[email protected]>

- [ X] Impacts functionality?
  - Corrects handle passed to DestroyChild(..)
- [ ] Impacts security?
  - N/A
- [ ] Breaking change?
  - N/A
- [ ] Includes tests?
  - N/A
- [ ] Includes documentation?
  - N/A

## How This Was Tested

"Testing has been conducted, confirming the efficacy of the fix.
Additionally, the BIOS can boot into the OS in an iPXE environment."

iPXE booted successfully

## Integration Instructions

N/A

Signed-off-by: Sam Tsai [Wiwynn] <[email protected]>
Co-authored-by: Sam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants