#1152028 Regression: 3.8.10-1 is unable to read empty tarballs and breaks mmdebstrap ext2 and ext4 formats

Package:
libarchive-tools
Source:
libarchive-tools
Description:
FreeBSD implementations of 'tar' and 'cpio' and other archive tools
Submitter:
Johannes Schauer Marin Rodrigues
Date:
2026-10-26 11:29:02 UTC
Severity:
normal
Tags:
#1152028#5
Date:
2026-10-25 16:44:06 UTC
From:
To:
Hi,

the ext2 and ext4 format output of mmdebstrap is broken since the upload of
3.8.10-1 because mmdebstrap verifies whether mke2fs works with tarballs by
attempting to send an empty tarball to mke2fs. This is supposed to create an
empty 16384 block filesystem using mke2fs's ability to use libarchive for
reading tarballs on standard input. Instead what happens since 3.8.10-1 is this
error message:

    E: __populate_fs_from_tar: Unknown code ____ 226 cannot read archive header: "Truncated tar archive detected while reading next header"
    E: mke2fs: Unknown code ____ 226 while populating file system
    E: E: mke2fs failed with exit status: 256

Steps to reproduce (without mke2fs):

    $ dd if=/dev/zero bs=10240 count=1 status=none | bsdtar tv
    bsdtar: Truncated tar archive detected while reading next header
    bsdtar: Error exit delayed from previous errors

This is a regression in upstream commit b610fdfdd4b0 and not present in their
master branch. I'm making this bug RC severity because it makes my package
mmdebstrap unusable when creating bootable disk images, which is one of its
main use-cases, for example in the machinery we use for the MNT open hardware
computers.

Thanks!

cheers, josch

#1152028#12
Date:
2026-10-25 18:46:39 UTC
From:
To:
Quoting Johannes Schauer Marin Rodrigues (2026-10-25 17:44:06)

The bug was confirmed and a fix provided by upstream here:

https://github.com/libarchive/libarchive/pull/3768

Evidence that this bug indeed breaks mmdebstrap can be found here:

jenkins: https://jenkins.debian.net/job/mmdebstrap-jenkins-worker/1566/console
salsaci: https://salsa.debian.org/debian/mmdebstrap/-/jobs/10539392

I cherry-picked the same patch upstream indicated from the upstream's master
branch and backported it as a quilt patch and put my work into this MR on
salsaci:

https://salsa.debian.org/debian/libarchive/-/merge_requests/16

Thus, tagging this bug with "patch".

Thanks!

cheers, josch

#1152028#17
Date:
2026-10-26 11:28:07 UTC
From:
To:
Hello,

Bug #1152028 in libarchive reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/debian/libarchive/-/commit/aba784e9dc778e0793dd65dc086e7224df39a88a
------------------------------------------------------------------------
cherry-pick upstream patch from master branch, a fixup for a cherry-picked fix for a use-after-free bug

Without this fix, empty tar archives as well as zip archives cannot be
read. Reproducers:

    $ dd if=/dev/zero bs=10240 count=1 status=none | bsdtar tf -
    bsdtar: Truncated tar archive detected while reading next header
    bsdtar: Error exit delayed from previous errors

    $ cat test.zip | bsdtar tf -
    bsdtar: (null)
    bsdtar: Error exit delayed from previous errors

Origin: https://github.com/libarchive/libarchive/pull/3650
Link: https://github.com/libarchive/libarchive/pull/3394
Link: https://github.com/libarchive/libarchive/pull/3768
Bug: https://github.com/libarchive/libarchive/issues/3767
Closes: #1152028
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1152028