Olivier Fourdan from Red Hat has discovered a protocol handling issue in the way the X server code base handles the XkbSetGeometry request.
The issue stems from the server trusting the client to send valid string lengths in the request data. A malicious client with string lengths exceeding the request length can cause the server to copy adjacent memory data into the XKB structs. This data is then available to the client via the XkbGetGeometry request.
The data length is at least up to 64k, it is possible to obtain more data by chaining strings, each string length is then determined by whatever happens to be in that 16-bit region of memory.
A similarly crafted request can likely cause the X server to crash.
This issue has been assigned CVE-2015-0255
This bug appears to have been introduced in X11R6.1 (March 1996) and is thus believed to be present in every X server release since, including the current stable release 1.16.3
A fix is available via the attached patch which is intended to be included in xorg-server-1.16.4 and 1.17.1
Note that this patch requires another, currently unmerged patch to apply without conflicts:
This issue was discovered by Olivier Fourdan of Red Hat.
Created attachment 988018 [details]
Red Hat Enterprise Linux 5 is now in Production 3 Phase of the support and maintenance life cycle. This has been rated as having Moderate security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.
Fixed in upstream versions 1.16.4 and 1.17.1:
which depends on this additional commit:
Created xorg-x11-server tracking bugs for this issue:
Affects: fedora-all [bug 1193332]
There is a tigervnc-1.4.3 release also referencing this CVE name:
This issue has been addressed in the following products:
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 7
Via RHSA-2015:0797 https://rhn.redhat.com/errata/RHSA-2015-0797.html