Red Hat Bugzilla – Bug 1623022
CVE-2018-15857 libxkbcommon: Invalid free in ExprAppendMultiKeysymList resulting in a crash
Last modified: 2018-10-25 11:30:41 EDT
An invalid free in ExprAppendMultiKeysymList in xkbcomp/ast-build.c in xkbcommon before 0.8.1 could be used by local attackers to crash xkbcommon keymap parsers or possibly have unspecified other impact by supplying a crafted keymap file. Upstream patch: https://github.com/xkbcommon/libxkbcommon/commit/c1e5ac16e77a21f87bdf3bc4dea61b037a17dddb References: https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html
ExprAppendMultiKeysymList() in xkbcomp/ast-build.c appends a list of KeySymbols to an existing one and frees it after doing so. However, the address of the pointer to the KeySyms expression is passed to the FreeStmt() function, instead of the pointer itself, causing a free on an invalid area. An attacker, by creating a special xkb keymap file, may be able to use this flaw to crash the program or execute code.