Skip to content

[2502] NetworkPkg/UefiPxeBcDxe: Add missing Token.Context initialization#1656

Merged
makubacki merged 1 commit intomicrosoft:release/202502from
makubacki:uefipxebcdxe_pxebcmtfp_init
Feb 26, 2026
Merged

[2502] NetworkPkg/UefiPxeBcDxe: Add missing Token.Context initialization#1656
makubacki merged 1 commit intomicrosoft:release/202502from
makubacki:uefipxebcdxe_pxebcmtfp_init

Conversation

@makubacki
Copy link
Member

Description

Adds missing Token.Context = Private initialization in two MTFTP write-file functions. Without this, the Context field passed to the MTFTP WriteFile callback was uninitialized, which could lead to a page fault when the callback attempted to access the Private driver context. The corresponding read-file functions already set this field correctly.

This has been an issue since the initial implementation of NetworkPkg (2010).

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Test file write to TFTP server with memory protections enabled.

Integration Instructions

  • N/A

@makubacki makubacki requested review from apop5, kuqin12 and os-d February 25, 2026 17:14
@makubacki makubacki self-assigned this Feb 25, 2026
@makubacki makubacki added the type:bug Something isn't working label Feb 25, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/202502@d62bad3). Learn more about missing BASE report.

Files with missing lines Patch % Lines
NetworkPkg/UefiPxeBcDxe/PxeBcMtftp.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##             release/202502   #1656   +/-   ##
================================================
  Coverage                  ?   0.55%           
================================================
  Files                     ?     165           
  Lines                     ?   72030           
  Branches                  ?    1788           
================================================
  Hits                      ?     402           
  Misses                    ?   71621           
  Partials                  ?       7           
Flag Coverage Δ
NetworkPkg 0.55% <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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Adds missing `Token.Context = Private` initialization in two MTFTP
write-file functions. Without this, the `Context` field passed to the
MTFTP `WriteFile` callback was uninitialized, which could lead to
a page fault when the callback attempted to access the `Private`
driver context. The corresponding read-file functions already set this
field correctly.

This has been an issue since the initial implementation of
NetworkPkg (2010).

Co-authored-by: Wenbo Hou <wenbhou@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@makubacki makubacki force-pushed the uefipxebcdxe_pxebcmtfp_init branch from 03afeb8 to 827e68e Compare February 26, 2026 02:17
@makubacki makubacki enabled auto-merge (squash) February 26, 2026 02:19
@makubacki makubacki merged commit 6c3581e into microsoft:release/202502 Feb 26, 2026
30 checks passed
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.

5 participants