Skip to content

[release/8.0] Validate archive entry paths during symbol package extraction - #17797

Closed
missymessa wants to merge 1 commit into
dotnet:release/8.0from
missymessa:dev/missymessa/symbol-extract-path-validation-8.0
Closed

missymessa wants to merge 1 commit into
dotnet:release/8.0from
missymessa:dev/missymessa/symbol-extract-path-validation-8.0

Conversation

@missymessa

Copy link
Copy Markdown
Member

Backport of #17794 to release/8.0.

Ensures entries extracted from packages by SymbolUploadHelper resolve within the temporary extraction directory, and fails the package otherwise.

Validation: Microsoft.DotNet.Internal.SymbolHelper builds. No unit tests are included because no test project on this branch references SymbolHelper.

Ensure entries extracted from packages by SymbolUploadHelper resolve
within the temporary extraction directory, and fail the package if an
entry would be written elsewhere.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 08592ccd-79d8-4bfe-86df-effc4ae76483
Copilot AI balanced review requested due to automatic review settings November 11, 2026 18:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the archive-entry path validation backport.

No open issues 🎉

What changed in this PR

Backports #17794 to release/8.0, adding path validation to SymbolHelper’s package extraction to prevent archive entries from being written outside the temporary extraction directory.

Changes:

  • Adds TryGetSafeExtractionPath to normalize entry paths and verify they remain within the extraction directory.
  • Integrates validation into extraction, logging an error and failing the package when a path is rejected.
File Description
src/​Microsoft.DotNet.Internal.SymbolHelper/​SymbolUploadHelper.cs Adds and enforces archive-entry path validation before extraction.

Review effort: Balanced

@missymessa

Copy link
Copy Markdown
Member Author

Closing this draft for now. The fix is not being actively driven, and the work is going back into the backlog under AB#14094 (internal). The branch is kept so the change can be reopened or recreated. CI was green when closed.

@missymessa missymessa closed this Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants