FreeBSD : libX11 -- Multiple vulnerabilities (fe99d3ca-a63a-11e8-a7c6-54e1ad3d6335)

critical Nessus Plugin ID 112074

Language:

Synopsis

The remote FreeBSD host is missing a security-related update.

Description

The freedesktop.org project reports :

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.

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).

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 is turned into Xfree (NULL-1) which will most likely trigger a segmentation fault. Casting the length value to unsigned char fixes the problem and allows string values with up to 255 characters.

Solution

Update the affected package.

See Also

https://lists.x.org/archives/xorg-announce/2018-August/002915.html

http://www.nessus.org/u?3d7f3a46

Plugin Details

Severity: Critical

ID: 112074

File Name: freebsd_pkg_fe99d3caa63a11e8a7c654e1ad3d6335.nasl

Version: 1.3

Type: local

Published: 8/23/2018

Updated: 11/10/2018

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 7.5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Vulnerability Information

CPE: p-cpe:/a:freebsd:freebsd:libx11, cpe:/o:freebsd:freebsd

Required KB Items: Host/local_checks_enabled, Host/FreeBSD/release, Host/FreeBSD/pkg_info

Patch Publication Date: 8/22/2018

Vulnerability Publication Date: 8/21/2018

Reference Information

CVE: CVE-2018-14598, CVE-2018-14599, CVE-2018-14600