Bug 1287671 (CVE-2015-8391) - CVE-2015-8391 pcre: inefficient posix character class syntax check (8.38/16)
Summary: CVE-2015-8391 pcre: inefficient posix character class syntax check (8.38/16)
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2015-8391
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: 1287672 1287673 1287674 1287675 1330455 1330456 1330508 1330509
Blocks: 1287727
TreeView+ depends on / blocked
 
Reported: 2015-12-02 13:43 UTC by Adam Mariš
Modified: 2021-09-09 11:44 UTC (History)
18 users (show)

Fixed In Version: pcre 8.38
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-15 13:41:19 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1025 0 normal SHIPPED_LIVE Important: pcre security update 2016-05-11 17:07:01 UTC
Red Hat Product Errata RHSA-2016:1132 0 normal SHIPPED_LIVE Important: rh-mariadb100-mariadb security update 2016-05-26 12:35:06 UTC
Red Hat Product Errata RHSA-2016:2750 0 normal SHIPPED_LIVE Moderate: rh-php56 security, bug fix, and enhancement update 2016-11-15 16:40:02 UTC

Description Adam Mariš 2015-12-02 13:43:52 UTC
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 13:44:47 UTC
Created pcre tracking bugs for this issue:

Affects: fedora-all [bug 1287672]

Comment 2 Adam Mariš 2015-12-02 13:44:57 UTC
Created glib2 tracking bugs for this issue:

Affects: fedora-all [bug 1287674]

Comment 3 Adam Mariš 2015-12-02 13:45:06 UTC
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 15:24:19 UTC
Corresponds to item 23 in http://vcs.pcre.org/pcre/code/trunk/ChangeLog?view=markup

Comment 5 Petr Pisar 2015-12-02 16:07:25 UTC
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 14:20:12 UTC
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 19:54:54 UTC
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 09:13:26 UTC
(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 09:15:12 UTC
(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 09:21:57 UTC
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 13:08:11 UTC
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 08:42:21 UTC
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 11:48:31 UTC
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.