Uh oh!
There was an error while loading. Please reload this page.
Update Rust crate tar to v0.4.46 [SECURITY] - #159394
Conversation
rustbot
commented
Jul 16, 2026
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
rustbot
commented
Jul 16, 2026
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
There was a problem hiding this comment.
Looks fine, but this will conflict with other lockfile bumps
r? me @bors r+ rollup=iffy (conflicts with other lockfile bump PRs)
…lnerability, r=jieyouxu Update Rust crate tar to v0.4.46 [SECURITY] This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [tar](https://redirect.github.com/composefs/tar-rs) | dependencies | patch | `0.4.45` → `0.4.46` | --- ### tar has a PAX header desynchronization issue [GHSA-3pv8-6f4r-ffg2](https://redirect.github.com/advisories/GHSA-3pv8-6f4r-ffg2) <details> <summary>More information</summary> #### 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 of `x -> L -> file` (PAX, GNU longname, file) would result in `x`'s extensions being applied to `L` rather than to `file`. [Per POSIX pax](https://pubs.opengroup.org/onlinepubs/9799919799/utilities/pax.html), 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 `size` extension 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](https://redirect.github.com/user-attachments/files/27141941/pax-overrides-extension-header.tar.zip) (zipped for size) demonstrates the desynchronization: with `tar tvf`: ``` % tar tvf tests/archives/pax-overrides-extension-header.tar ---------- 0 0 0 2048 Dec 31 1969 longname.txt ---------- 0 0 0 0 Dec 31 1969 file_b ``` with `tar-rs`: ``` ---- pax_size_does_not_apply_to_extension_headers stdout ---- thread 'pax_size_does_not_apply_to_extension_headers' (250476889) panicked at tests/all.rs:2121:27: called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "numeric field was not a number: AAAAAAAA when getting cksum for AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` 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 - [https://github.com/composefs/tar-rs/security/advisories/GHSA-3pv8-6f4r-ffg2](https://redirect.github.com/composefs/tar-rs/security/advisories/GHSA-3pv8-6f4r-ffg2) - [https://github.com/composefs/tar-rs/pull/454](https://redirect.github.com/composefs/tar-rs/pull/454) - [https://github.com/composefs/tar-rs/commit/bab14dd84b411ac16ecb56d4f2d2f7bfb88a9838](https://redirect.github.com/composefs/tar-rs/commit/bab14dd84b411ac16ecb56d4f2d2f7bfb88a9838) - [https://github.com/composefs/tar-rs/releases/tag/0.4.46](https://redirect.github.com/composefs/tar-rs/releases/tag/0.4.46) - [https://github.com/advisories/GHSA-3pv8-6f4r-ffg2](https://redirect.github.com/advisories/GHSA-3pv8-6f4r-ffg2) This data is provided by the [GitHub Advisory Database](https://redirect.github.com/advisories/GHSA-3pv8-6f4r-ffg2) ([CC-BY 4.0](https://redirect.github.com/github/advisory-database/blob/main/LICENSE.md)). </details> --- ### Release Notes <details> <summary>composefs/tar-rs (tar)</summary> ### [`v0.4.46`](https://redirect.github.com/composefs/tar-rs/releases/tag/0.4.46) [Compare Source](https://redirect.github.com/composefs/tar-rs/compare/0.4.45...0.4.46) #### Security - archive: Fix another PAX header desync (GHSA-3cv2-h65g-fgmm) by [@&rust-lang#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&rust-lang#8203;454](https://redirect.github.com/composefs/tar-rs/pull/454) See also <GHSA-3cv2-h65g-fgmm> #### Other changes - ci: Fix and re-enable reverse dependency testing by [@&rust-lang#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&rust-lang#8203;444](https://redirect.github.com/composefs/tar-rs/pull/444) - Update astral-tokio-tar requirement from 0.5 to 0.6 by [@&rust-lang#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in [#&rust-lang#8203;446](https://redirect.github.com/composefs/tar-rs/pull/446) - Update some links by [@&rust-lang#8203;atouchet](https://redirect.github.com/atouchet) in [#&rust-lang#8203;445](https://redirect.github.com/composefs/tar-rs/pull/445) - Add support of absolute paths by [@&rust-lang#8203;zxvfc](https://redirect.github.com/zxvfc) in [#&rust-lang#8203;426](https://redirect.github.com/composefs/tar-rs/pull/426) - docs: Expand notes on concurrent mutations and following symlinks by [@&rust-lang#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&rust-lang#8203;453](https://redirect.github.com/composefs/tar-rs/pull/453) - Update repo links by [@&rust-lang#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&rust-lang#8203;451](https://redirect.github.com/composefs/tar-rs/pull/451) - ci: Add crates.io trusted publishing workflow by [@&rust-lang#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&rust-lang#8203;456](https://redirect.github.com/composefs/tar-rs/pull/456) - Release 0.4.46 by [@&rust-lang#8203;cgwalters](https://redirect.github.com/cgwalters) in [#&rust-lang#8203;455](https://redirect.github.com/composefs/tar-rs/pull/455) #### New Contributors - [@&rust-lang#8203;dependabot](https://redirect.github.com/dependabot)\[bot] made their first contribution in [#&rust-lang#8203;446](https://redirect.github.com/composefs/tar-rs/pull/446) - [@&rust-lang#8203;atouchet](https://redirect.github.com/atouchet) made their first contribution in [#&rust-lang#8203;445](https://redirect.github.com/composefs/tar-rs/pull/445) - [@&rust-lang#8203;zxvfc](https://redirect.github.com/zxvfc) made their first contribution in [#&rust-lang#8203;426](https://redirect.github.com/composefs/tar-rs/pull/426) **Full Changelog**: <composefs/tar-rs@0.4.45...0.4.46> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rust-lang/rust). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjUuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI2NS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
…uwer Rollup of 18 pull requests Successful merges: - #150679 (dirfd file operations (2/4)) - #158758 (Rename `lazy_type_alias` feature gate to `checked_type_aliases` ) - #159177 (Explicitly materialize debuginfo tests for all debuggers) - #159392 (Update Rust crate rand to v0.9.3 [SECURITY]) - #159393 (Update Rust crate rkyv to v0.8.16 [SECURITY]) - #159394 (Update Rust crate tar to v0.4.46 [SECURITY]) - #159395 (Update Rust crate tracing-subscriber [SECURITY]) - #159193 (Port compiletest's CLI to clap) - #158992 (Shorten types more when only interesting part is lifetimes) - #159226 (Track extra_lifetime_params_map per-owner) - #159273 (tidy: document u64 limit for numeric sort keys) - #159322 (Fix safety doc in intrinsics::simd) - #159329 (Fix the stale metrics directory warning) - #159357 (Add regression tests for two fixed issues) - #159360 (Remove FIXMEs referencing #44232) - #159375 (make a couple codegen-llvm tests compatible with 2021 edition) - #159381 (emit `(lldb)` prefix to make commands more distinct) - #159396 (Update actions/checkout action to v7)
Uh oh!
There was an error while loading. Please reload this page.
…uwer Rollup of 18 pull requests Successful merges: - rust-lang/rust#150679 (dirfd file operations (2/4)) - rust-lang/rust#158758 (Rename `lazy_type_alias` feature gate to `checked_type_aliases` ) - rust-lang/rust#159177 (Explicitly materialize debuginfo tests for all debuggers) - rust-lang/rust#159392 (Update Rust crate rand to v0.9.3 [SECURITY]) - rust-lang/rust#159393 (Update Rust crate rkyv to v0.8.16 [SECURITY]) - rust-lang/rust#159394 (Update Rust crate tar to v0.4.46 [SECURITY]) - rust-lang/rust#159395 (Update Rust crate tracing-subscriber [SECURITY]) - rust-lang/rust#159193 (Port compiletest's CLI to clap) - rust-lang/rust#158992 (Shorten types more when only interesting part is lifetimes) - rust-lang/rust#159226 (Track extra_lifetime_params_map per-owner) - rust-lang/rust#159273 (tidy: document u64 limit for numeric sort keys) - rust-lang/rust#159322 (Fix safety doc in intrinsics::simd) - rust-lang/rust#159329 (Fix the stale metrics directory warning) - rust-lang/rust#159357 (Add regression tests for two fixed issues) - rust-lang/rust#159360 (Remove FIXMEs referencing rust-lang/rust#44232) - rust-lang/rust#159375 (make a couple codegen-llvm tests compatible with 2021 edition) - rust-lang/rust#159381 (emit `(lldb)` prefix to make commands more distinct) - rust-lang/rust#159396 (Update actions/checkout action to v7)
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).
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: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.