Bug 112516 - zip creates insecure temporary files
Summary: zip creates insecure temporary files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: zip
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Lon Hohberger
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-12-22 00:40 UTC by Need Real Name
Modified: 2007-04-18 17:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-04-19 14:21:57 UTC
Embargoed:


Attachments (Terms of Use)
Change umask prior to temporary file creation (856 bytes, patch)
2003-12-22 14:42 UTC, Lon Hohberger
no flags Details | Diff

Description Need Real Name 2003-12-22 00:40:19 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5)
Gecko/20031007 Firebird/0.7

Description of problem:

zip can be used with the -t switch to specify a location for the
temporary file it creates.

The man page gives the following example:
 -b path
   Use the specified path for the temporary zip archive. For  example:
     zip -b /tmp stuff *

Unfortunately, zip creates a temporary file with world readable
permissions:
 [not-root@host dir]$ ls -trlah /tmp/
 -rw-r--r--    1 root     root         219M Dec 22 00:40 ziK2Os4N

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. zip -b /tmp/ -r something.zip folder/
2. ls -trlah /tmp/

Additional info:

Comment 1 Lon Hohberger 2003-12-22 14:42:19 UTC
Created attachment 96665 [details]
Change umask prior to temporary file creation

The files are created with the umask from the user's environment.

e.g.  Typing "umask 0066" at the command line will alter this and all other
programs' file creation behavior.

I will include this fix for temporary file creation in the next build in
rawhide.

Comment 2 Lon Hohberger 2003-12-22 14:44:11 UTC
Package built; will appear in rawhide (zip-2.3-19) - waiting for
rawhide push prior to closing.

Comment 3 Need Real Name 2004-04-19 14:21:57 UTC
zip-2.3-20 is in rawhide. Closing.


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