cpio segfaults with "-E" on a non-existing file

Bug #186366 reported by Anderson Lizardo on 2008-01-27
2
Affects Status Importance Assigned to Milestone
GNU cpio
Unknown
Unknown
cpio (Ubuntu)
Low
Unassigned
Nominated for Gutsy by Anderson Lizardo
Nominated for Hardy by Anderson Lizardo
Nominated for Intrepid by Anderson Lizardo

Bug Description

Binary package hint: cpio

Ubuntu release information (lsb_release -a):

Distributor ID: Ubuntu
Description: Ubuntu 7.10
Release: 7.10Codename: gutsy

Package version: 2.8-1ubuntu2

Problem: cpio segfaults when -E option is used on a non-existing file. Eg:

$ cpio -E no_such_file -t
cpio: no_such_file: Cannot open: No such file or directory
Segmentation fault (core dumped)

GDB backtrace (after recompiling the package with "DEB_BUILD_OPTIONS=nostrip,debug"):

#0 0xb7e1f46d in getc () from /lib/tls/i686/cmov/libc.so.6
#1 0x0804f983 in ds_fgetstr (f=0x0, s=0xbfe533c0, eos=10 '\n') at dstring.c:74
#2 0x0804b8c8 in process_copy_in () at copyin.c:947
#3 0x08050cc0 in main (argc=128, argv=0x806b6f8) at main.c:794

LAST TESTED VERSION: Maverick

Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 or 9.04?

Changed in cpio:
status: New → Incomplete
Anderson Lizardo (lizardo) wrote :

I don't know yet about 8.10 or 9.04, but on 8.04 (which is LTS, right?) it still happens:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.1
Release: 8.04
Codename: hardy
$ cpio -E no_such_file -t
cpio: no_such_file: Cannot open: No such file or directory
Segmentation fault

Anderson Lizardo (lizardo) wrote :

Just asked a friend to run this command on 8.10, it is still reproducible on it too.

Ralph Janke (txwikinger) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Anderson Lizardo (lizardo) wrote :

Still happens on hardy (LTS):

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.3 LTS
Release: 8.04
Codename: hardy
$ cpio -E no_such_file -t
cpio: no_such_file: Cannot open: No such file or directory
Segmentation fault

Also happens on karmic (with latest updates):

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu karmic (development branch)
Release: 9.10
Codename: karmic
# cpio -E no_such_file -t
cpio: no_such_file: Cannot open: No such file or directory
Segmentation fault

And finally, also happens on jaunty:

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty
# cpio -E no_such_file -t
cpio: no_such_file: Cannot open: No such file or directory
Segmentation fault

Steve Langasek (vorlon) wrote :

still trivially reproducible in lucid and maverick.

Changed in cpio (Ubuntu):
importance: Undecided → Low
status: Incomplete → Triaged

Er, folks? This is a really simple one! Who maintains cpio?

Problem is with ../../lib/error.c

Function with the issue is:

void
open_fatal (char const *name)
{
  call_arg_error ("open", name);
}

That should be calling on call_arg_fatal I believe.

I've tried to use debians reportbug, but don't know if the bug has been logged yet. I'll wait for an hour and try again!

Oo-er... that was a bad move! Misread the maintainers line.

I've reported this to <email address hidden>

Ignore that last comment... it's a problem around this area, but that ain't the issue.

C de-Avillez (hggdh2) on 2010-09-01
description: updated
Changed in cpio:
importance: Undecided → Unknown
status: New → Unknown
David Edwards (se014a0001) wrote :

I came across this whilst searching for help with a (likely different) segmentation fault with cpio in 12.04. And this bug still exists in 12.04!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.