Bug 1434504 (CVE-2017-7186)

Summary: CVE-2017-7186 pcre: Invalid Unicode property lookup (8.41/7, 10.24/2)
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: adam.stokes, andrew, csutherl, databases-maint, dmoppert, erik-fedora, fedora-mingw, fedora, fidencio, gzaronik, hhorak, jclere, jdoyle, jgrulich, jorton, klember, lgao, lkundrak, marcandre.lureau, mbabacek, mclasen, mmuzila, mschorm, mturk, myarboro, pmyers, ppisar, pslavice, rcollet, rjones, rsvoboda, sardella, slawomir, twalsh, walters, webstack-team, weli, yozone
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: pcre 8.41, pcre2 10.24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-08 03:41:05 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: 1434511, 1434512, 1434513, 1434514, 1434515, 1434516, 1434517    
Bug Blocks: 1434510, 1439436    

Description Andrej Nemec 2017-03-21 15:59:22 UTC
A vulnerability was found in pcre caused by trying to find a Unicode property for a code value greater than 0x10ffff, the Unicode maximum, when running in non-UTF mode (where character values can be up to 0xffffffff).

Upstream bug:

https://bugs.exim.org/show_bug.cgi?id=2052

References:

https://blogs.gentoo.org/ago/2017/03/14/libpcre-invalid-memory-read-in-match-pcre_exec-c/

Upstream patches (pcre):

https://vcs.pcre.org/pcre?view=revision&revision=1688

Upstream patches (pcre2):

https://vcs.pcre.org/pcre2?view=revision&revision=670

Comment 1 Andrej Nemec 2017-03-21 16:04:00 UTC
Created glib2 tracking bugs for this issue:

Affects: fedora-all [bug 1434517]


Created mingw-glib2 tracking bugs for this issue:

Affects: epel-7 [bug 1434515]
Affects: fedora-all [bug 1434514]


Created mingw-pcre tracking bugs for this issue:

Affects: epel-7 [bug 1434516]
Affects: fedora-all [bug 1434513]


Created pcre2 tracking bugs for this issue:

Affects: epel-6 [bug 1434511]
Affects: epel-7 [bug 1434512]

Comment 3 Petr Pisar 2017-04-18 12:38:04 UTC
The same issue exists in JIT code and it was fixed separately with SVN r720 commit:

From 749c2eb6994ee26c1fcf1eb7b57faf5c84e9878b Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>
Date: Fri, 31 Mar 2017 05:40:37 +0000
Subject: [PATCH] Fix character type detection when 32-bit and UCP are enabled
 but UTF is not in JIT.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@720 6239d852-aaf2-0410-a92c-79f79f948069

Comment 4 Petr Pisar 2017-04-21 08:18:57 UTC
And the same issue in JIT code in PCRE1 was fixed with SVN r1693 commit:

From 3b8f1ab07fb1744c57f5d04c872e81d8d669de87 Mon Sep 17 00:00:00 2001
From: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Fri, 31 Mar 2017 05:41:17 +0000
Subject: [PATCH] Fix character type detection when 32-bit and UCP are enabled
 but UTF is not in JIT.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1693 2f5784b3-3f2a-0410-8824-cb99058d5e15

Comment 5 Doran Moppert 2017-06-07 01:51:08 UTC
This issue is specific to PCRE32 (utf-32) mode, which is not available in the pcre-7.8 (shipped in 6.x) and not enabled in the various bundling components (glib, virtuoso, php, mariadb).

Comment 6 Doran Moppert 2017-06-08 03:41:31 UTC
Statement:

Red Hat Product Security has rated this issue as having Moderate security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 7 errata-xmlrpc 2018-08-16 16:08:25 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Core Services

Via RHSA-2018:2486 https://access.redhat.com/errata/RHSA-2018:2486