SecurityTracker.com
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 


Category:   Application (Generic)  >   X Vendors:   X.org
X.org libX11 Bugs Let Remote Users Deny Service and Potentially Execute Arbitrary Code
SecurityTracker Alert ID:  1041543
SecurityTracker URL:  http://securitytracker.com/id/1041543
CVE Reference:   CVE-2018-14598, CVE-2018-14599, CVE-2018-14600   (Links to External Site)
Date:  Aug 21 2018
Impact:   Denial of service via network, Execution of arbitrary code via network, User access via network
Fix Available:  Yes  Vendor Confirmed:  Yes  

Description:   Several vulnerabilities were reported in X.org libX11. A remote user can cause the target service to crash. A remote user can execute arbitrary code on the target system.

A remote X server can return a specially crafted response to trigger an off-by-one memory write error in the XGetFontPath(), XListExtensions(), and XListFonts() functions to potentially execute arbitrary code on the target X client [CVE-2018-14599].

A remote user can send specially crafted data to trigger an out-of-bounds memory write error and potentially execute arbitrary code on the target system [CVE-2018-14600].

A remote server can return a specially crafted reply to cause the target X client to crash [CVE-2018-14598].

Tobias Stoeckmann reported these vulnerabilities.

Impact:   A remote user can cause the target application to crash.

A remote user can execute arbitrary code on the target system.

Solution:   The vendor has issued source code fixes, available at:

https://gitlab.freedesktop.org/xorg/lib/libx11/commit/b469da1430cdcee06e31c6251b83aede072a1ff0

https://gitlab.freedesktop.org/xorg/lib/libx11/commit/dbf72805fd9d7b1846fe9a11b46f3994bfc27fea

https://gitlab.freedesktop.org/xorg/lib/libx11/commit/e83722768fd5c467ef61fa159e8c6278770b45c2

Vendor URL:  gitlab.freedesktop.org/xorg/lib/libx11 (Links to External Site)
Cause:   Access control error, Boundary error
Underlying OS:  Linux (Any), UNIX (Any)

Message History:   This archive entry has one or more follow-up message(s) listed below.
Aug 30 2018 (Ubuntu Issues Fix) X.org libX11 Bugs Let Remote Users Deny Service and Potentially Execute Arbitrary Code
Ubuntu has issued a fix for Ubuntu Linux 14.04 LTS, 16.04 LTS, and 18.04 LTS.
Aug 30 2018 (Ubuntu Issues Fix) X.org libX11 Bugs Let Remote Users Deny Service and Potentially Execute Arbitrary Code
Ubuntu has issued a fix for Ubuntu Linux 12.04 ESM.



 Source Message Contents

Subject:  [oss-security] X.Org security advisory: August 21, 2018


X.Org security advisory: August 21, 2018

Multiple issues in libX11
=========================

The functions XGetFontPath, XListExtensions and XListFonts from libX11
are vulnerable to three different issues:

Off-by-one writes (CVE-2018-14599).
-----------------------------------

The functions XGetFontPath, XListExtensions, and XListFonts are
vulnerable to an off-by-one override on malicious server responses.

The server replies consist of chunks consisting of a length byte
followed by actual string, which is not NUL-terminated.

While parsing the response, the length byte is overridden with '\0',
thus the memory area can be used as storage of C strings later on. To
be able to NUL-terminate the last string, the buffer is reserved with
an additional byte of space.

For a boundary check, the variable chend (end of ch) was introduced,
pointing at the end of the buffer which ch initially points to.
Unfortunately there is a difference in handling "the end of ch".

While chend points at the first byte that must not be written to,
the for-loop uses chend as the last byte that can be written to.

Therefore, an off-by-one can occur.


Out of boundary write (CVE-2018-14600).
---------------------------------------

The length value is interpreted as signed char on many systems
(depending on default signedness of char), which can lead to an out of
boundary write up to 128 bytes in front of the allocated storage, but
limited to NUL byte(s).

Casting the length value to unsigned char fixes the problem and allows
string values with up to 255 characters.

Crash on invalid reply (CVE-2018-14598).
----------------------------------------

If the server sends a reply in which even the first string would
overflow the transmitted bytes, list[0] (or flist[0]) will be set to
NULL and a count of 0 is returned.

If the resulting list is freed with XFreeExtensionList or
XFreeFontPath later on, the first Xfree call:

    Xfree (list[0]-1)
 turns into
    Xfree (NULL-1)

which will most likely trigger a segmentation fault.

Patches
=======

Patches for these issues have been commited to the libX11 git repository.
libX11 1.6.6 will be released shortly and will include those patches.

https://gitlab.freedesktop.org/xorg/lib/libx11

b469da1430cdcee06e31c6251b83aede072a1ff0  CVE-2018-14599
dbf72805fd9d7b1846fe9a11b46f3994bfc27fea  CVE-2018-14600
e83722768fd5c467ef61fa159e8c6278770b45c2  CVE-2018-14598

Thanks
======

X.Org thanks Tobias Stoeckmann for reporting these issues to our
security team and assisting them in understanding them and evaluating
our fixes.
 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2019, SecurityGlobal.net LLC