Bug 156399

Summary: CAN-1999-1572 cpio insecure file creation
Product: Red Hat Enterprise Linux 4 Reporter: Josh Bressers <bressers>
Component: cpioAssignee: Peter Vrabec <pvrabec>
Status: CLOSED CURRENTRELEASE QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: 4.0CC: menscher
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=19960716
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-05 10:02:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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:

http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/1391

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

http://groups-beta.google.com/group/gnu.utils.bug/msg/4db088ee6031c9ec

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
RHSA-2005:080-06
RHSA-2005:073-07


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

You're right, thanks for the catch.