Bug 1771026 (CVE-2019-16707)

Summary: CVE-2019-16707 hunspell: out-of-bounds read in SuggestMgr::leftcommonsubstring in suggestmgr.cxx
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: caillon+fedoraproject, caolanm, erik-fedora, gnome-sig, john.j5live, manisandro, mclasen, rhughes, rjones, rstrode, sandmann
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 21:58:51 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: 1771027, 1771028, 1771029, 1775556    
Bug Blocks: 1771030    

Description Guilherme de Almeida Suckevicz 2019-11-11 18:28:38 UTC
Hunspell 1.7.0 has an invalid read operation in SuggestMgr::leftcommonsubstring in suggestmgr.cxx.

Reference:
https://github.com/butterflyhack/hunspell-crash

Comment 1 Guilherme de Almeida Suckevicz 2019-11-11 18:28:57 UTC
Created hunspell tracking bugs for this issue:

Affects: fedora-all [bug 1771027]


Created mingw-hunspell tracking bugs for this issue:

Affects: epel-7 [bug 1771029]
Affects: fedora-all [bug 1771028]

Comment 2 Caolan McNamara 2019-11-12 09:14:24 UTC
Can't reproduce this yet, but I feel this can only happen with an empty .dic or near-empty .dic

Comment 3 Caolan McNamara 2019-11-12 17:33:24 UTC
See https://github.com/hunspell/hunspell/issues/624 for how to reproduce

Comment 6 Stefan Cornelius 2019-11-21 18:43:02 UTC
RHEL8 is compiled with -D_GLIBCXX_ASSERTIONS. The assertions always catch this case before we reach the out-of-bounds read and abort() the application.

Comment 8 Stefan Cornelius 2019-11-22 12:25:41 UTC
Statement:

This is unlikely to be an issue in a real world scenario, as it requires specially crafted Hunspell dictionaries, which are not shipped with Red Hat Enterprise Linux. Additionally, applications using Hunspell will likely filter out invalid input before passing it on, which further limits the impact.

Comment 9 errata-xmlrpc 2020-09-29 20:13:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2020:3971 https://access.redhat.com/errata/RHSA-2020:3971

Comment 10 Product Security DevOps Team 2020-09-29 21:58:51 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-2019-16707