Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 498934 (CVE-2014-1624) - <dev-python/pyxdg-0.25-r1: TOCTOU race condition in get_runtime_dir() when strict=False (CVE-2014-1624)
Summary: <dev-python/pyxdg-0.25-r1: TOCTOU race condition in get_runtime_dir() when st...
Status: RESOLVED FIXED
Alias: CVE-2014-1624
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard: B4 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-22 14:40 UTC by Agostino Sarubbo
Modified: 2015-01-07 08:33 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 2014-01-22 14:40:48 UTC
From ${URL} :

It was reported [1],[2] that the Python XDG module (pyxdg) suffered from a TOCTOU race condition when the 
xdg.BaseDirectory.get_runtime_dir() function is called with the strict setting set to False (the default 
is True).  When the strict setting is set to True, the directory pointed to by the $XDG_RUNTIME_DIR is 
used (and returned).  However, if $XDG_RUNTIME_DIR is unset, it will attempt to use the 
/tmp/pyxdg-runtime-dir-fallback-[username] directory.  A local attacker could use this to conduct symbolic 
link attacks, possibly leading to their ability to modify permissions or security context of a path 
different than that originally intended or requested.

This flaw only affects pyxdg 0.25 as the ability to use the $XDG_RUNTIME_DIR (and thus the introduction of 
this function) was first introduced there based on this Debian request [3].

No patch is yet available and discussion on the fix is taking place in the upstream bug tracker [4].

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736247
[2] http://www.openwall.com/lists/oss-security/2014/01/21/3
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656338
[4] https://bugs.freedesktop.org/show_bug.cgi?id=73878


@maintainer(s): after the bump, in case we need to stabilize the package, please let us know if it is ready for the stabilization or not.
Comment 2 GLSAMaker/CVETool Bot gentoo-dev 2014-02-07 22:29:28 UTC
CVE-2014-1624 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2014-1624):
  Race condition in the xdg.BaseDirectory.get_runtime_dir function in
  python-xdg 0.25 allows local users to overwrite arbitrary files by
  pre-creating /tmp/pyxdg-runtime-dir-fallback-victim to point to a
  victim-owned location, then replacing it with a symlink to an
  attacker-controlled location once the get_runtime_dir function is called.
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2014-03-26 07:46:44 UTC
*pyxdg-0.25-r1 (26 Mar 2014)

  26 Mar 2014; Ian Delaney <idella4@gentoo.org>
  +files/sec-patch-CVE-2014-1624.patch, +pyxdg-0.25-r1.ebuild,
  -pyxdg-0.23.ebuild, -pyxdg-0.24.ebuild:
  add sec patch wrt Bug #498934, rm old
Comment 4 Mike Gilbert gentoo-dev 2014-10-15 16:17:07 UTC
Please stabilize.

=dev-python/pyxdg-0.25-r1
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-16 07:43:25 UTC
Stable for HPPA.
Comment 6 Agostino Sarubbo gentoo-dev 2014-10-16 10:22:56 UTC
amd64 stable
Comment 7 Agostino Sarubbo gentoo-dev 2014-10-16 10:23:49 UTC
x86 stable
Comment 8 Tobias Klausmann (RETIRED) gentoo-dev 2014-10-16 11:28:39 UTC
Are we to ignore bug 471984?
Comment 9 Tobias Klausmann (RETIRED) gentoo-dev 2014-10-16 12:05:51 UTC
Sicne the mentioned bug is also present in the current stable, I stabilized -r1 on alpha.
Comment 10 Agostino Sarubbo gentoo-dev 2014-10-16 15:32:36 UTC
(In reply to Tobias Klausmann from comment #9)
> Sicne the mentioned bug is also present in the current stable, I stabilized
> -r1 on alpha.

Also, test failures does not block security bugs..
Comment 11 Agostino Sarubbo gentoo-dev 2014-10-17 13:14:07 UTC
ppc stable
Comment 12 Agostino Sarubbo gentoo-dev 2014-10-17 13:27:43 UTC
ppc64 stable
Comment 13 Agostino Sarubbo gentoo-dev 2014-10-18 14:06:29 UTC
ia64 stable
Comment 14 Agostino Sarubbo gentoo-dev 2014-10-18 14:10:32 UTC
sparc stable
Comment 15 Markus Meier gentoo-dev 2014-10-21 18:19:27 UTC
arm stable, all arches done.
Comment 16 Kristian Fiskerstrand (RETIRED) gentoo-dev 2014-12-07 20:16:08 UTC
GLSA Vote: No
Comment 17 Yury German Gentoo Infrastructure gentoo-dev 2014-12-07 20:32:58 UTC
GLSA Vote: No

Maintainer(s), please drop the vulnerable version.
Comment 18 Yury German Gentoo Infrastructure gentoo-dev 2015-01-07 02:29:49 UTC
Maintainer(s), it has been 30 days since request for cleanup. 
Please drop the vulnerable versions.
Comment 19 Mike Gilbert gentoo-dev 2015-01-07 02:41:34 UTC
+  07 Jan 2015; Mike Gilbert <floppym@gentoo.org> -pyxdg-0.25.ebuild:
+  Remove old.
Comment 20 Yury German Gentoo Infrastructure gentoo-dev 2015-01-07 08:33:01 UTC
Maintainer(s), Thank you for cleanup!

Closing noglsa.