RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1155814 - cpio creates zero-size hardlinks when original file's inode is too large
Summary: cpio creates zero-size hardlinks when original file's inode is too large
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cpio
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Pavel Raiskup
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: 1269194 1359256
TreeView+ depends on / blocked
 
Reported: 2014-10-22 22:12 UTC by Nathan Crawford
Modified: 2020-07-16 08:30 UTC (History)
6 users (show)

Fixed In Version: cpio-2.10-13.el6
Doc Type: Bug Fix
Doc Text:
Cause: Cpio used improper integer type for inode representation. Consequence: File with large inode number was improperly archived in 'newc' archives. Fix: Using proper integer type inode_t for inode number representation. Result: The cpio utility is able archive such files correctly in 'newc' archive.
Clone Of:
Environment:
Last Closed: 2017-03-21 09:32:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0611 0 normal SHIPPED_LIVE cpio bug fix update 2017-03-21 12:27:30 UTC

Description Nathan Crawford 2014-10-22 22:12:18 UTC
Description of problem:
When the inode of a file with hardlinks is too large (e.g. on XFS), cpio creates an archive that unpacks to zero-length files

Version-Release number of selected component (if applicable):
cpio 2.10-12.el6_5


How reproducible:
Very, but I don't know the exact inode cutoff.


Steps to Reproduce:

mkdir cpiotest
echo foo > cpiotest/foo
ln cpiotest/foo cpiotest/bar
find cpiotest | cpio -o -H newc > test.cpio
mkdir unpack
cd unpack
cpio -i < ../test.cpio
ls -li cpiotest

Actual results:

If original bar and foo have inode 1257109924:
bar and foo, both 4 bytes and having the same inode

If original bar and foo have inode 2262282261:
bar and foo, both 0 bytes and having the same inode


Expected results:

If original bar and foo have any inode:
bar and foo, both 4 bytes and having the same inode


Additional info:

This looks to have been fixed by the cpio maintainers, see: 
http://lists.gnu.org/archive/html/bug-cpio/2010-02/msg00002.html

Comment 2 Pavel Raiskup 2014-10-23 07:55:07 UTC
Hello Nathan, thanks for the report.  Yes - ino 2262282261 is bigger than
INT_MAX so your case seems to match the upstream fix.  Consider using other
archiving tools or formats (e.g. ustar) if possible.

If this issue is critical or in any way time sensitive, please raise a ticket
through your regular Red Hat support channels to make certain  it receives the
proper attention and prioritization to assure a timely resolution.

For information on how to contact the Red Hat production support team, please
visit:

  https://www.redhat.com/support/process/production/#howto

Pavel

Comment 18 errata-xmlrpc 2017-03-21 09:32:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0611.html


Note You need to log in before you can comment on or make changes to this bug.