X.Org security advisory: DoS/info leak in xfs prior to X11R6.7/XFree86 3.3.3

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jul 24 08:31:04 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

X.Org security advisory, July 24, 2012
Denial of Service & Information leak in xfs prior to X11R6.7/XFree86 3.3.3
CVE IDs: CVE-2012-1699

Description
- -----------

A vulnerability has been found in the X11R6 font server code in the
handling of the SetEventMask request in xfs - if an invalid mask is
specified, it passes that bad mask to the SendErrToClient() function
for returning to the client in the error message.  Unfortunately,
SendErrToClient() expects a pointer, but was being passed the raw
mask value, causing it to use the mask as a pointer, either segfaulting
(if that happened to be an invalid pointer), or returning whatever data
happened to be accessible in the 4 bytes at the address specified by
the mask value.

Affected Versions
- -----------------

X11R6 through X11R6.6 appear to be vulnerable.   The fix shown below was
introduced by XFree86 in their 3.3.3 release as part of the commit for:
   Prototype/ansification cleanup for Xserver/XIE, xfs, fontlib, mkfontdir,
   and fix some bugs found along the way (#2103, Thomas Dickey).

X11R6.7 incorporated the XFree86 changes, and thus X11R6.7 and later releases
from X.Org are not vulnerable.

Workaround
- ----------

Disable the xfs font server on machines where it is not required and only
older versions of the software are available.

Fix
- ---

Vendors still supporting xfs from a release prior to either X11R6.7
or XFree86 3.3.3 should upgrade to a non-vulnerable release if possible.
If upgrade is not possible, the fix is trivial, pass an address where one
is expected in difs/events.c:

 int
 ProcSetEventMask(ClientPtr client)
 {
     REQUEST(fsSetEventMaskReq);
     REQUEST_AT_LEAST_SIZE(fsSetEventMaskReq);

     if (stuff->event_mask & ~AllEventMasks) {
- -       SendErrToClient(client, FSBadEventMask, (pointer) stuff->event_mask);
+       SendErrToClient(client, FSBadEventMask, (pointer) &stuff->event_mask);
        return FSBadEventMask;
     }
     client->eventmask = stuff->event_mask;
     return client->noClientException;
 }


Credits
- -------

The X.Org Foundation thanks Rodrigo Rubira Branco (http://twitter.com/bsdaemon)
from the Qualys Vulnerability & Malware Research Labs (VMRL) for bringing
this issue to Oracle's attention, and Oracle for notifying X.Org once the
issue was found to be in the common (though older) code base.

The X.Org Foundation also thanks Thomas Dickey & the XFree86 Project for
providing a fix that has protected our users since the integration of the
XFree86 code base into X11R6.7.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (SunOS)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAOv7gACgkQovueCB8tEw6u2ACfYdfAiWer1f5jQgbBLng0dlsS
PfgAnRonl83+fySIFLu3utrIe59tOs6P
=5woP
-----END PGP SIGNATURE-----


More information about the xorg-announce mailing list