Repository navigation
Test failure: System.Formats.Tar TarFile_ExtractToDirectory_File_Tests.ExtractToDirectory_RejectsChainedSymlinkDirectoryTraversal_WithNestedFile (Windows, release/9.0) #131053
Description
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1516764
Build error leg or test failing: System.Formats.Tar.Tests (Windows)
On release/9.0, ExtractToDirectory_RejectsChainedSymlinkDirectoryTraversal_WithNestedFile fails on Windows with:
Assert.Throws() Failure: Exception type was not an exact match
Expected: typeof(System.UnauthorizedAccessException)
---- System.IO.IOException : Cannot create '...\dest\a\b' because a file or directory with the same name already exists.
The product behavior is correct — the traversal is rejected and nothing escapes the destination. Only the test's assertion is too strict: some Windows OS builds surface IOException instead of UnauthorizedAccessException. This was already fixed on main by #130290 (fixes #130177), which accepts IOException or UnauthorizedAccessException; it needs to be backported to release/9.0. The failure is deterministic on Windows and is currently blocking unrelated codeflow PRs (e.g. #131044).
Error Message
{
"ErrorMessage": "ExtractToDirectory_RejectsChainedSymlinkDirectoryTraversal_WithNestedFile",
"BuildRetry": false,
"ExcludeConsoleLog": false
}Note
This issue was authored with the assistance of GitHub Copilot.
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 9 | 16 | 16 |
Activity
dotnet-policy-service commentedon Jul 21, 2026
Tagging subscribers to this area: @dotnet/area-system-formats-tar
See info in area-owners.md if you want to be subscribed.
Fix exception check (#131078)
Fix exception check .NET 9 (#131079)
rzikm commentedon Jul 22, 2026
Fixed by #131079 I assume, @alinpahontu2912. If so, can you close this?
alinpahontu2912 commentedon Jul 22, 2026
Fixed by #131079