CVE-2018-15859 in xkbcommoninfo

Summary

by MITRE

Unchecked NULL pointer usage when parsing invalid atoms in ExprResolveLhs in xkbcomp/expr.c in xkbcommon before 0.8.2 could be used by local attackers to crash (NULL pointer dereference) the xkbcommon parser by supplying a crafted keymap file, because lookup failures are mishandled.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 05/31/2026

The vulnerability described in CVE-2018-15859 represents a critical null pointer dereference flaw within the xkbcommon library's xkbcomp component. This issue affects versions prior to 0.8.2 and stems from improper handling of lookup failures during atom parsing operations. The vulnerability specifically manifests in the ExprResolveLhs function located in xkbcomp/expr.c, where the parser fails to properly validate pointer references when processing malformed keymap files. When an attacker supplies a crafted keymap file containing invalid atoms, the parser encounters a null pointer dereference condition that leads to application crash. This represents a classic case of inadequate error handling where the software does not properly check for null return values from lookup operations before attempting to dereference them.

The technical exploitation of this vulnerability occurs through the manipulation of xkb keymap files that contain malformed atom structures. During the parsing process, when the ExprResolveLhs function attempts to resolve left-hand side expressions in keymap definitions, it performs lookups that may return null pointers when atoms are invalid or improperly formatted. The flaw lies in the assumption that all lookup operations will succeed, without proper null pointer validation. This type of vulnerability falls under CWE-476 which specifically addresses NULL pointer dereference conditions, and it demonstrates poor defensive programming practices where error conditions are not adequately checked. The vulnerability is particularly concerning because it allows local attackers to achieve denial of service through controlled application crashes, potentially disrupting keyboard input handling on affected systems.

The operational impact of this vulnerability extends beyond simple service disruption, as it affects the fundamental keyboard input processing capabilities of systems relying on xkbcommon. When exploited, the null pointer dereference causes the xkbcomp parser to terminate unexpectedly, which can affect applications that depend on proper keyboard mapping functionality. This includes desktop environments, window managers, and any system components that utilize xkb keymap files for input device configuration. The vulnerability affects systems using xkbcommon versions before 0.8.2, which were widely deployed across various linux distributions and desktop environments. From an attack perspective, this vulnerability aligns with ATT&CK technique T1499.004 which covers network denial of service attacks, though in this case the attack vector is local file manipulation rather than network-based. The vulnerability represents a privilege escalation risk for local attackers who can craft malicious keymap files to crash processes that utilize xkbcommon.

Mitigation strategies for CVE-2018-15859 focus primarily on upgrading to xkbcommon version 0.8.2 or later, which includes proper null pointer validation in the ExprResolveLhs function. System administrators should ensure that all affected systems receive timely updates to eliminate the vulnerability. Additionally, implementing proper input validation for keymap files and restricting write permissions on system keymap directories can provide additional defense-in-depth measures. The fix implemented in version 0.8.2 addresses the root cause by adding proper null pointer checks before dereferencing lookup results, ensuring that the parser gracefully handles invalid atom structures rather than crashing. Organizations should also consider monitoring for unauthorized modifications to keyboard mapping files and implementing automated patch management processes to ensure all systems remain protected against this and similar vulnerabilities.

Reservation

08/24/2018

Disclosure

08/25/2018

Moderation

accepted

CPE

ready

EPSS

0.00080

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!