Bug 1623009 (CVE-2018-15853)

Summary: CVE-2018-15853 libxkbcommon: Endless recursion in xkbcomp/expr.c resulting in a crash
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: me, peter.hutterer, xgl-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libxkbcommon 0.8.1 Doc Type: If docs needed, set a value
Doc Text:
An uncontrolled recursion flaw was found in libxkbcommon in the way it parses boolean expressions. A specially crafted file provided to xkbcomp could crash the application.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 19:19:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1623038, 1642852, 1642853    
Bug Blocks: 1623044    

Description Andrej Nemec 2018-08-28 11:47:07 UTC
Endless recursion exists in xkbcomp/expr.c in xkbcommon and libxkbcommon before 0.8.1, which could be used by local attackers to crash xkbcommon users by supplying a crafted keymap file that triggers boolean negation.

Upstream patch:

https://github.com/xkbcommon/libxkbcommon/commit/1f9d1248c07cda8aaff762429c0dce146de8632a

References:

https://lists.freedesktop.org/archives/wayland-devel/2018-August/039232.html

Comment 2 Riccardo Schirone 2018-10-25 08:34:34 UTC
Created libxkbcommon tracking bugs for this issue:

Affects: fedora-all [bug 1642852]

Comment 3 Riccardo Schirone 2018-10-25 08:36:04 UTC
When parsing a boolean expression that is composed by another boolean expression, like a negated expression, the ExprResolveBoolean() function is recursively called, but on the same expression that was currently analyzed and not on the sub-expression, causing an infinite recursion.

Comment 6 errata-xmlrpc 2019-08-06 12:11:10 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 7 Product Security DevOps Team 2019-08-06 19:19:23 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-15853