Repository navigation
[release/8.0] Validate archive entry paths during symbol package extraction - #17797
Closed
missymessa wants to merge 1 commit into
Closed
missymessa wants to merge 1 commit into
missymessa wants to merge 1 commit into
Conversation
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
Contributor
There was a problem hiding this comment.
🟢 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
TryGetSafeExtractionPathto 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
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #17794 to release/8.0.
Ensures entries extracted from packages by
SymbolUploadHelperresolve within the temporary extraction directory, and fails the package otherwise.Validation:
Microsoft.DotNet.Internal.SymbolHelperbuilds. No unit tests are included because no test project on this branch references SymbolHelper.