Skip to content

archive: Unconditionally honor PAX size#441

Merged
alexcrichton merged 1 commit intomainfrom
pax-size
Mar 19, 2026
Merged

archive: Unconditionally honor PAX size#441
alexcrichton merged 1 commit intomainfrom
pax-size

Conversation

@alexcrichton
Copy link
Copy Markdown
Owner

This synchronizes our behavior with most other tar parsers (including astral-tokio-tar and Go archive/tar) ensuring that we don't parse things differently.

The problem with parsing size in particular differently is it's easy to craft a tar archive that appears completely differently between two parsers. This is the case with e.g. crates.io where astral-tokio-tar is used for validation server side, but cargo uses the tar crate to upload.

With this, the two projects agree.

Note: this change was made for GHSA-gchp-q4r4-x4ff and is authored by @cgwalters

This synchronizes our behavior with most other tar parsers
(including astral-tokio-tar and Go archive/tar) ensuring
that we don't parse things differently.

The problem with parsing size in particular differently is
it's easy to craft a tar archive that appears completely differently
between two parsers. This is the case with e.g. crates.io where
astral-tokio-tar is used for validation server side, but cargo uses
the `tar` crate to upload.

With this, the two projects agree.

Signed-off-by: Colin Walters <walters@verbum.org>
@alexcrichton alexcrichton merged commit de1a587 into main Mar 19, 2026
20 checks passed
@alexcrichton alexcrichton deleted the pax-size branch March 19, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants