helpGNU cpio - Support: sr #106470, "Malformed number"...


sr #106470: "Malformed number" errors reading valid ustar archives

Submitted by:  None
Submitted on:  Wed 20 Aug 2008 05:12:07 PM UTC  
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Email: -unavailable-Open/Closed: Open
Operating System: *BSD

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 20 Aug 2008 05:12:07 PM UTC, original submission:

Sometime between GNU cpio 2.6 and GNU cpio 2.8, the
code to read tar headers was rewritten. After this,
the parsing of numbers in tar headers now rejects
perfectly valid archives.

In particular, the traditional storage for the
"mode" field terminated the number with a space
followed by a NULL (see, for example, the 2.10 BSD
tar.5 manual page in the manpage browser at The subsequent POSIX specs
for ustar permit numeric fields to be terminated
with any combination of spaces or nulls.

The key culprit is the from_ascii() routine in
copyin.c, which returns an error unless the number
completely fills the field or has null termination.
For cpio formats, of course, the field should be filled;
tar formats have different requirements. It was probably
a mistake to try to use the same number-parsing
routine for both.

This was first noticed on FreeBSD but has since been
verified on other platforms with both GNU cpio 2.8 and
GNU cpio 2.9. There's further discussion in the
mailing list thread that starts at:



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup1