Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 536574 - app-arch/pxz: race condition in setting permissions on output file (CVE-2015-1200)
Summary: app-arch/pxz: race condition in setting permissions on output file (CVE-2015-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal trivial (vote)
Assignee: Gentoo Security
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard: ~4 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-14 10:42 UTC by Agostino Sarubbo
Modified: 2022-10-28 08:26 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 2015-01-14 10:42:58 UTC
From ${URL} :

It was reported [1] that pxz sets the mode of an output file to be the same as the one of an input 
file but does it only after compression is over. This leaves the output file with the wrong mode 
during all the time of the compression process.

Illustration:

$ truncate -s 1G foo
$ chmod 600 foo
$ pxz foo &
[1] 9240
$ ls -l foo.xz
-rw-r--r-- 1 user user 0 Jan 14 00:33 foo.xz
$ wait %
[1]+  Done                    pxz foo
$ ls -l foo.xz
-rw------- 1 user user 161976 Jan 14 00:33 foo.xz

The issue is similar to 
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0296

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775306


@maintainer(s): since the package or the affected version has never been marked as stable, we don't need to stabilize it. After the bump, please remove the affected versions from the tree.
Comment 1 GLSAMaker/CVETool Bot gentoo-dev 2015-02-13 18:08:35 UTC
CVE-2015-1200 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2015-1200):
  Race condition in pxz 4.999.99 Beta 3 uses weak file permissions for the
  output file when compressing a file before changing the permission to match
  the original file, which allows local users to bypass the intended access
  restrictions.
Comment 2 Aaron Bauman (RETIRED) gentoo-dev 2016-02-26 13:39:10 UTC
app-arch/pxz-5.0_pre20110811 is in tree which mitigates this vulnerability. All vulnerable versions removed.  GLSA Vote: No