Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 156399 - CAN-1999-1572 cpio insecure file creation
Summary: CAN-1999-1572 cpio insecure file creation
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: cpio
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Peter Vrabec
QA Contact: Brock Organ
Whiteboard: impact=low,public=19960716
Depends On:
TreeView+ depends on / blocked
Reported: 2005-04-29 19:07 UTC by Josh Bressers
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-05-05 10:02:36 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Josh Bressers 2005-04-29 19:07:11 UTC
+++ This bug was initially created as a clone of Bug #145720 +++

This is a very old issue.  This message was posted to vendor-sec.

GNU cpio -oO appears to generate files with 0666 regardless of
the user's umask.  This is true for both cpio 2.5 (RH, SuSE) and
and the (surprisingly 3x) larger cpio 2.6, but I haven't had the
chance to dig into the code yet or sync with the developers yet.
(If anyone else can gets to it before me, by all means...)  cpio
has a  need to toggle between a "0" umask and the original umask
depending on what it is doing, and gets it wrong in this case.

It's a long-known public issue in general -- earliest I can find
a record of it goes back to 1996, when the BSD folks fixed it:

and fixes against older GNU cpio were posted to gnu.utils.bugs
by The Written Word folks:

but it never seems to have gotten into newer GNU cpio versions.

Comment 1 Peter Vrabec 2005-05-05 10:02:36 UTC
I think this is already fixed in

Comment 2 Josh Bressers 2005-05-05 12:46:58 UTC

You're right, thanks for the catch.

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