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:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is 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 Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5