Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 457794 (CVE-2013-0296) - <app-arch/pigz-2.2.5: create temp file with insecure permissions (CVE-2013-0296)
Summary: <app-arch/pigz-2.2.5: create temp file with insecure permissions (CVE-2013-0296)
Status: RESOLVED FIXED
Alias: CVE-2013-0296
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Gentoo Security
URL: http://www.openwall.com/lists/oss-sec...
Whiteboard: B4 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-16 07:47 UTC by Agostino Sarubbo
Modified: 2014-01-03 14:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2013-02-16 07:47:24 UTC
From ${URL} :

When asked to compress a file with restricted permissions (like
mode 0600), the .gz file pigz creates while doing this has
usual mode derived from umask (like 0644).  If the file is
large enough (and why we would use pigz instead of gzip for
small files), this results in the original content being
readable for everyone until the compression finishes.

Here's the deal:

$ fallocate -l 1G foo
$ chmod 0600 foo
$ pigz foo &
$ ls -l foo foo.gz
-rw------- 1 mjt mjt 1073741824 Feb 15 12:27 foo
-rw-rw-r-- 1 mjt mjt     502516 Feb 15 12:27 foo.gz

When it finishes, it correctly applies original file permissions
to the newly created file, but it is already waaay too late.

Other one-file archivers (gzip, xz, bzip2, ...) usually create
the temp file with very strict permissions first, and change it
to the right perms only when done, so only the current user can
read it.
Comment 1 Samuel Damashek (RETIRED) gentoo-dev 2013-12-23 03:09:12 UTC
Issue fixed in >=app-arch/pigz-2.2.5.

@maintainers: Please cleanup.

@security: Please vote.
Comment 2 Yury German Gentoo Infrastructure gentoo-dev 2013-12-30 06:58:38 UTC
Ping!

Maintainer(s), please drop the vulnerable version.
Comment 3 Sergey Popov (RETIRED) gentoo-dev 2014-01-03 13:48:10 UTC
Cleanup is done.

GLSA vote: no
Comment 4 Chris Reffett (RETIRED) gentoo-dev Security 2014-01-03 14:30:12 UTC
GLSA vote: no, closing noglsa.