validate Linkname for insecure paths in Reader.Next#79130
validate Linkname for insecure paths in Reader.Next#79130metsw24-max wants to merge 1 commit intogolang:masterfrom
Conversation
|
This PR (HEAD: b021885) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/772900. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/772900. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/772900. |
The archive/tar.Reader currently validates Header.Name for insecure paths when GODEBUG=tarinsecurepath=0, but does not apply the same validation to Header.Linkname.
This creates an inconsistency where a tar entry can:
Since Header.Linkname is used when processing symlinks and hardlinks it is equally security-sensitive and can influence filesystem
resolution during extraction in common usage patterns.
Additionally: