Update Rust crate tar to v0.4.46 [SECURITY]#2378
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
52e454a to
8b7ef50
Compare
8b7ef50 to
5affd7a
Compare
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.
This PR contains the following updates:
0.4.45→0.4.46tar has a PAX header desynchronization issue
GHSA-3pv8-6f4r-ffg2
More information
Details
Summary
When a tar stream contains multiple "header" entries prior to a file entry, tar-rs applies the PAX header (
x) to the next entry in the stream, regardless of type. For example, a stream ofx -> L -> file(PAX, GNU longname, file) would result inx's extensions being applied toLrather than tofile.Per POSIX pax, this is incorrect: a PAX header always applies to a file entry, not any intermediary entries. See the "pax Header Block" section for the specific prescription there.
As a result of this, an attacker can contrive a tar containing a sequence of tar headers such that tar-rs applies the PAX header's
sizeextension to the next header in sequence, effectively desynchronizing the stream and enabling tar-rs specific skippage/extraction of members. In other words, a file can be contrived to extract differently on tar-rs than on other tar parsers.PoC
This tar (zipped for size) demonstrates the desynchronization: with
tar tvf:with
tar-rs:In the above case, the PoC is not weaponized, so it jumps into the middle of an entry and subsequently fails the checksum test rather than silently continuing with attacker-controlled archive state.
Impact
This is very similar to GHSA-j5gw-2vrg-8fgx and GHSA-fp55-jw48-c537 in impact -- an attacker can use this to extract (or not extract) files from a tar stream depending on the tar parser used, which in turn can be used to obscure the presence of malicious files.
Severity
Medium
References
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
tar has a PAX header desynchronization issue
GHSA-3pv8-6f4r-ffg2
More information
Details
Summary
When a tar stream contains multiple "header" entries prior to a file entry, tar-rs applies the PAX header (
x) to the next entry in the stream, regardless of type. For example, a stream ofx -> L -> file(PAX, GNU longname, file) would result inx's extensions being applied toLrather than tofile.Per POSIX pax, this is incorrect: a PAX header always applies to a file entry, not any intermediary entries. See the "pax Header Block" section for the specific prescription there.
As a result of this, an attacker can contrive a tar containing a sequence of tar headers such that tar-rs applies the PAX header's
sizeextension to the next header in sequence, effectively desynchronizing the stream and enabling tar-rs specific skippage/extraction of members. In other words, a file can be contrived to extract differently on tar-rs than on other tar parsers.PoC
This tar (zipped for size) demonstrates the desynchronization: with
tar tvf:with
tar-rs:In the above case, the PoC is not weaponized, so it jumps into the middle of an entry and subsequently fails the checksum test rather than silently continuing with attacker-controlled archive state.
Impact
This is very similar to GHSA-j5gw-2vrg-8fgx and GHSA-fp55-jw48-c537 in impact -- an attacker can use this to extract (or not extract) files from a tar stream depending on the tar parser used, which in turn can be used to obscure the presence of malicious files.
Severity
Moderate
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
composefs/tar-rs (tar)
v0.4.46Compare Source
Security
See also GHSA-3cv2-h65g-fgmm
Other changes
New Contributors
Full Changelog: composefs/tar-rs@0.4.45...0.4.46
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
This change is