Bug 1623022 (CVE-2018-15857) - CVE-2018-15857 libxkbcommon: Invalid free in ExprAppendMultiKeysymList resulting in a crash
Summary: CVE-2018-15857 libxkbcommon: Invalid free in ExprAppendMultiKeysymList result...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2018-15857
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1623038 1643153
Blocks: 1623044
TreeView+ depends on / blocked
 
Reported: 2018-08-28 11:54 UTC by Andrej Nemec
Modified: 2019-09-29 14:57 UTC (History)
3 users (show)

Fixed In Version: libxkbcommon 0.8.1
Clone Of:
Environment:
Last Closed: 2019-08-06 19:19:29 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:2079 0 None None None 2019-08-06 12:11:17 UTC

Description Andrej Nemec 2018-08-28 11:54:06 UTC
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

Comment 3 Riccardo Schirone 2018-10-25 15:30:25 UTC
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.

Comment 5 errata-xmlrpc 2019-08-06 12:11:16 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:2079 https://access.redhat.com/errata/RHSA-2019:2079

Comment 6 Product Security DevOps Team 2019-08-06 19:19:29 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2018-15857


Note You need to log in before you can comment on or make changes to this bug.