Bug 996150 - Segmentation fault (core dumped) when cpio compress /sys directory
Segmentation fault (core dumped) when cpio compress /sys directory
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cpio (Show other bugs)
Unspecified Unspecified
urgent Severity medium
: rc
: ---
Assigned To: Pavel Raiskup
: ZStream
Depends On:
Blocks: 1070830 1099875 1135423 1138148 1145039
  Show dependency treegraph
Reported: 2013-08-12 10:11 EDT by sunshineway
Modified: 2014-10-22 03:15 EDT (History)
10 users (show)

See Also:
Fixed In Version: cpio-2.10-12.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1135423 1145039 (view as bug list)
Last Closed: 2014-10-22 03:15:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Check that read() did not fail (2.63 KB, patch)
2014-05-22 09:10 EDT, Pavel Raiskup
no flags Details | Diff

  None (edit)
Description sunshineway 2013-08-12 10:11:39 EDT
Description of problem:
Segmentation fault (core dumped) when cpio compress /sys directory.

Version-Release number of selected component (if applicable):
[root@localhost tmp]# rpm -qi cpio
Name        : cpio                         Relocations: (not relocatable)
Version     : 2.10                              Vendor: CentOS
Release     : 9.el6                         Build Date: Wed 10 Nov 2010 10:43:45 PM EST
Install Date: Sun 23 Jun 2013 03:23:13 AM EDT      Build Host: c6b6.bsys.dev.centos.org
Group       : Applications/Archiving        Source RPM: cpio-2.10-9.el6.src.rpm
Size        : 650610                           License: GPLv3+
Signature   : RSA/8, Sun 03 Jul 2011 12:08:07 AM EDT, Key ID 0946fca2c105b9de
Packager    : CentOS BuildSystem <http://bugs.centos.org>
URL         : http://www.gnu.org/software/cpio/
Summary     : A GNU archiving program

How reproducible:

Steps to Reproduce:
1.run :
[root@localhost tmp]# find /sys |cpio -ocvB > a.cpio 
cpio: /sys/devices/virtual/dmi/id/subsystem: Warning: Cannot readlink: Invalid argument
Segmentation fault (core dumped)

Actual results:
compress failed.

Expected results:
compress success.

Additional info:
Comment 1 Pavel Raiskup 2013-08-12 10:20:48 EDT
Thank you for taking the time to enter a bug report with us. We appreciate the
feedback and look to use reports such as this to guide our efforts at
improving our products. That being said, this bug tracking system is not a
mechanism for requesting support, and we are not able to  guarantee the
timeliness or suitability of a resolution.

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:

Comment 4 Pavel Raiskup 2013-09-20 16:00:20 EDT
Ups, bad bug.  Sorry for previous comment.
Comment 6 RHEL Product and Program Management 2013-10-13 19:16:30 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 11 Pavel Raiskup 2014-05-22 09:10:00 EDT
Created attachment 898389 [details]
Check that read() did not fail

Attaching another fix which checks return values for SAFE_READ_ERROR.  This is
principally better approach.

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