Repository navigation
archive: Reject members with both a PAX path and a GNU long name - #488
Open
darshan-mog wants to merge 1 commit into
Open
darshan-mog wants to merge 1 commit into
darshan-mog wants to merge 1 commit into
Conversation
A member can be described by both a PAX `path` record and a GNU LongName entry (likewise `linkpath` and LongLink). tar-rs always preferred the GNU value, while libarchive and Python's tarfile apply whichever extension comes last. With the PAX header first, bsdtar and Python extract the PAX name and tar-rs extracts the GNU one, so a scanner and an extractor can disagree on where a file lands. This is the same parser-differential family as GHSA-3cv2-h65g-fgmm. Neither GNU tar nor our Builder emits both for one member, so error out as astral-tokio-tar already does rather than pick one. Assisted-by: AI
This branch has not been deployed
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.
A member can be described by both a PAX
pathrecord and a GNU LongName entry (likewiselinkpathand LongLink). tar-rs always preferred the GNU value, while libarchive and Python's tarfile apply whichever extension comes last. With the PAX header first (x path=paxname,L gnuname, file), bsdtar and Python extractpaxnameand tar-rs extractsgnuname, so a scanner and an extractor can disagree on where a file lands. This is the same parser-differential family as GHSA-3cv2-h65g-fgmm.Neither GNU tar nor our Builder emits both for one member, so error out as astral-tokio-tar already does rather than pick one. The new test covers both orders for
path/LongName andlinkpath/LongLink and checks that astral-tokio-tar rejects the same archives; it fails without the change.