Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 988498 - (CVE-2013-4169) CVE-2013-4169 gdm: TOCTTOU race condition on /tmp/.X11-unix
CVE-2013-4169 gdm: TOCTTOU race condition on /tmp/.X11-unix
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 997619 997620 997622 997624
Blocks: 988499
  Show dependency treegraph
Reported: 2013-07-25 13:37 EDT by Vincent Danen
Modified: 2015-07-31 03:09 EDT (History)
7 users (show)

See Also:
Fixed In Version: gdm 2.21.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-05 17:52:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for gdm (2.90 KB, patch)
2013-09-06 14:38 EDT, Vincent Danen
no flags Details | Diff
patch for initscripts (550 bytes, patch)
2013-09-06 14:39 EDT, Vincent Danen
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1213 normal SHIPPED_LIVE Important: gdm security update 2013-09-05 18:54:55 EDT

  None (edit)
Description Vincent Danen 2013-07-25 13:37:47 EDT
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.


Red Hat would like to thank the researcher with the nickname vladz for reporting this issue.
Comment 1 Vincent Danen 2013-07-25 13:45:34 EDT
One possible solution is to prevent GDM from ever creating this directory by pre-creating it in /etc/rc.sysinit (like we do for /tmp/.ICE-unix).  That or simply don't remove it when we boot; in /etc/rc.sysinit we remove /tmp/.X*unix on line 882; we also remove /tmp/.ICE-unix but recreate it correctly later on (line 887).  That would involve patching initscripts rather than gdm though.

Comment 16 Vincent Danen 2013-09-05 14:47:11 EDT

This flaw only affected GDM in Red Hat Enterprise Linux 5 and does not affect Red Hat Enterprise Linux 6.
Comment 17 errata-xmlrpc 2013-09-05 14:56:02 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2013:1213 https://rhn.redhat.com/errata/RHSA-2013-1213.html
Comment 18 Vincent Danen 2013-09-06 14:38:58 EDT
Created attachment 794934 [details]
patch for gdm

This is the patch to remove the bits that created /tmp/.X11-unix.
Comment 19 Vincent Danen 2013-09-06 14:39:55 EDT
Created attachment 794935 [details]
patch for initscripts

This is the patch to create /tmp/.X11-unix at boot.

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