Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 483960 (CVE-2013-4169) - <gnome-base/gdm-3.8.4-r3: TOCTTOU race condition on /tmp/.X11-unix (CVE-2013-4169)
Summary: <gnome-base/gdm-3.8.4-r3: TOCTTOU race condition on /tmp/.X11-unix (CVE-2013-...
Status: RESOLVED FIXED
Alias: CVE-2013-4169
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: B3 [noglsa]
Keywords:
Depends on: gnome-3.10-stable gnome2-mask
Blocks:
  Show dependency tree
 
Reported: 2013-09-06 08:56 UTC by Agostino Sarubbo
Modified: 2014-06-29 21:01 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-09-06 08:56:59 UTC
From ${URL} :

Vladz reported that GDM versions < 2.21.1 were vulnerable to a TOCTTOU (time of check to time of use) flaw in the way that GDM checked for the existence of, and created if 
missing, the /tmp/.X11-unix/ special directory.  A local attacker could use this flaw to overwrite arbitrary file contents via symbolic link attacks or to manipulate the 
contents of arbitrary files, including those files owned by the root user that would normally be inaccessible.  This is because GDM will chown /tmp/.X11-unix to the user 
and group root, but also changes the permissions to 1777.

Newer versions of GDM no longer create the /tmp/.X11-unix/ directory and are thus not vulnerable to this flaw.



@maintainer(s): after the bump, in case we need to stabilize the package, please say explicitly if it is ready for the stabilization or not.
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-09-06 13:56:18 UTC
We can't stabilize gdm-3.8 without the rest of gnome-3.8. Alternatively, we can try to apply the same fix as in RHEL 5.

Does anyone have access to RHN? Please see what patches got applied in gdm-2.16.0-59.el5_9.1.src.rpm and initscripts-8.45.42-2.el5_9.1.src.rpm (see https://rhn.redhat.com/errata/RHSA-2013-1213.html)
Comment 2 Agostino Sarubbo gentoo-dev 2013-09-06 15:36:09 UTC
(In reply to Alexandre Rostovtsev from comment #1)
> Alternatively, we can try to apply the same fix as in RHEL 5.

As I can see: 

> We fixed the problem by having
> rc.sysinit pre-create /tmp/.X11-unix at boot, like it does for
> /tmp/.ICE-unix (and removing the offending code from GDM).
Comment 3 Agostino Sarubbo gentoo-dev 2013-09-06 18:51:40 UTC
https://bugzilla.redhat.com/attachment.cgi?id=794934

This patch deletes the wrong code, now, you should able to check the difference with the fixed version and the affected.
Comment 4 GLSAMaker/CVETool Bot gentoo-dev 2013-09-11 01:54:58 UTC
CVE-2013-4169 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2013-4169):
  GNOME Display Manager (gdm) before 2.21.1 allows local users to change
  permissions of arbitrary directories via a symlink attack on
  /tmp/.X11-unix/.
Comment 5 Pacho Ramos gentoo-dev 2014-05-30 19:36:01 UTC
we have all the updated ebuilds in the tree for a long time
Comment 6 Yury German Gentoo Infrastructure gentoo-dev 2014-05-30 21:27:50 UTC
Pacho,

In the comments we have "GDM versions < 2.21.1" is vulnerable. The only 2.x in tree is 2.20.11-r1. Please advise in what version this was fixed in so we can go ahead and go to the process of closing this bug.
Comment 7 Pacho Ramos gentoo-dev 2014-05-31 06:26:27 UTC
Well, we already have 3.10.x versions in the tree that solves this... but I guess this is blocked by gnome2 removal as we would need to remove vulnerable versions, right?
Comment 8 Pacho Ramos gentoo-dev 2014-06-01 13:29:30 UTC
3.8.4-r3 was stabilized in bug 478252 and fixes this
Comment 9 Yury German Gentoo Infrastructure gentoo-dev 2014-06-09 13:42:01 UTC
Maintainer(s), Thank you for cleanup!

Security please Vote!

GLSA Vote = yes
Comment 10 Sergey Popov gentoo-dev 2014-06-20 13:36:54 UTC
GLSA vote: no
Comment 11 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2014-06-29 21:01:47 UTC
GLSA vote: no.

Closing as [noglsa].