Tech News
← Home  ·  All topics

Tarball Extraction

1 GoKawiil brief on this topic · RSS for tarball extraction

Security researcher crafts tar file that extracts differently across 8 tools

A researcher built a single tar archive using GNU tar's pax format options that produces eight distinct results when unpacked, depending on which extraction tool is used. The trick exploits ambiguity in the POSIX specification over whether a hard-linked file entry in a pax archive can carry its own data size, letting the archive contain a crafted 512-byte size field equal to a tar header's length. Tools including GNU tar, BusyBox, Python, Go and Perl ignore this size and extract the files identically, while Apple's bsdtar instead writes those 512 bytes into the hard-linked file, altering its contents.