Bug 1287671 - (CVE-2015-8391) CVE-2015-8391 pcre: inefficient posix character class syntax check (8.38/16)
CVE-2015-8391 pcre: inefficient posix character class syntax check (8.38/16)
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20151123,repor...
: Security
Depends On: 1287672 1287673 1287674 1287675 1330455 1330456 1330508 1330509
Blocks: 1287727
  Show dependency treegraph
 
Reported: 2015-12-02 08:43 EST by Adam Mariš
Modified: 2018-06-20 20:53 EDT (History)
18 users (show)

See Also:
Fixed In Version: pcre 8.38
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-15 08:41:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2015-12-02 08:43:52 EST
It was discovered that pcre_compile function in pcre_compile.c in PCRE before 8.38 mishandles certain [: nesting, which allows remote attackers to cause a denial of service (CPU consumption) or possibly have unspecified other impact via a crafted regular expression.
Comment 1 Adam Mariš 2015-12-02 08:44:47 EST
Created pcre tracking bugs for this issue:

Affects: fedora-all [bug 1287672]
Comment 2 Adam Mariš 2015-12-02 08:44:57 EST
Created glib2 tracking bugs for this issue:

Affects: fedora-all [bug 1287674]
Comment 3 Adam Mariš 2015-12-02 08:45:06 EST
Created mingw-pcre tracking bugs for this issue:

Affects: fedora-all [bug 1287673]
Affects: epel-7 [bug 1287675]
Comment 4 Adam Mariš 2015-12-02 10:24:19 EST
Corresponds to item 23 in http://vcs.pcre.org/pcre/code/trunk/ChangeLog?view=markup
Comment 5 Petr Pisar 2015-12-02 11:07:25 EST
Fixed in upstream with:

commit 485a930d11bfd1ba8c292fe14976f0a3e12c2b93
Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date:   Tue Jul 21 13:47:22 2015 +0000

    Fix "run for ever" bug for deeply nested [: sequences.
    
    
    git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1579 2f5784b3-3f2a-0410-8824-
cb99058d5e15
Comment 6 Petr Pisar 2015-12-03 09:20:12 EST
Reproducer is to pass "[[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[:::::::::::::::::[[.\xe8Nq\xffq\xff\xe0\x2|||::Nq\xffq\xff\xe0\x6\x2|||::[[[:[::::::[[[[[::::::::[:[[[:[:::[[[[[[[[[[[[[[:::E[[[:[:[[:[:::[[:::E[[[:[:[[:'[:::::E[[[:[::::::[[[:[[[[[[[::E[[[:[::::::[[[:[[[[[[[[:[[::[::::[[:::::::[[:[[[[[[[:[[::[:[[:[~" to pcretest.
Comment 7 Fedora Update System 2016-01-04 14:54:54 EST
pcre-8.38-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 8 Tomas Hoger 2016-02-19 04:13:26 EST
(In reply to Petr Pisar from comment #5)
> Fixed in upstream with:
> 
> commit 485a930d11bfd1ba8c292fe14976f0a3e12c2b93
> Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
> Date:   Tue Jul 21 13:47:22 2015 +0000
> 
> Fix "run for ever" bug for deeply nested [: sequences.

Upstream commit link:

http://vcs.pcre.org/pcre?view=revision&revision=1579
Comment 9 Tomas Hoger 2016-02-19 04:15:12 EST
(In reply to Petr Pisar from comment #6)
> Reproducer is to pass

A cleaner test case is this pattern:

/[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:[:/

It should run long enough to make problem visible and still not too long.  Add or remove few '[:' to make it run longer or shorter.
Comment 10 Tomas Hoger 2016-02-19 04:21:57 EST
This problem was introduced in version 8.13, when check_posix_syntax() function was modified to call itself recursively:

http://vcs.pcre.org/pcre?view=revision&revision=640
https://bugs.exim.org/show_bug.cgi?id=1123
Comment 13 errata-xmlrpc 2016-05-11 09:08:11 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:1025 https://rhn.redhat.com/errata/RHSA-2016-1025.html
Comment 14 errata-xmlrpc 2016-05-26 04:42:21 EDT
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS

Via RHSA-2016:1132 https://access.redhat.com/errata/RHSA-2016:1132
Comment 15 errata-xmlrpc 2016-11-15 06:48:31 EST
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS

Via RHSA-2016:2750 https://rhn.redhat.com/errata/RHSA-2016-2750.html

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