Bug 1287659 (CVE-2015-8389) - CVE-2015-8389 pcre: infinite recursion in JIT compiler when processing certain patterns (8.38/21)
Summary: CVE-2015-8389 pcre: infinite recursion in JIT compiler when processing certai...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2015-8389
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: 1287660 1287661 1287662 1287663
Blocks: 1287727
TreeView+ depends on / blocked
 
Reported: 2015-12-02 13:37 UTC by Adam Mariš
Modified: 2019-10-10 10:36 UTC (History)
16 users (show)

Fixed In Version: pcre 8.38
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-23 22:25:06 UTC
Embargoed:


Attachments (Terms of Use)

Description Adam Mariš 2015-12-02 13:37:36 UTC
It was found that PCRE before 8.38 mishandles the /(?:|a|){100}x/ pattern and related
patterns, causing infinite recursion in the JIT compiler and allowing remote attackers to cause a denial of service (infinite recursion) or possibly have unspecified other impact via a crafted regular expression.

Comment 1 Adam Mariš 2015-12-02 13:38:32 UTC
Created pcre tracking bugs for this issue:

Affects: fedora-all [bug 1287660]

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

Affects: fedora-all [bug 1287662]

Comment 3 Adam Mariš 2015-12-02 13:38:52 UTC
Created mingw-pcre tracking bugs for this issue:

Affects: fedora-all [bug 1287661]
Affects: epel-7 [bug 1287663]

Comment 4 Adam Mariš 2015-12-02 15:24:00 UTC
Corresponds to item 21 in http://vcs.pcre.org/pcre/code/trunk/ChangeLog?view=markup

Comment 5 Petr Pisar 2015-12-02 16:02:41 UTC
Fixed in upstream with:

commit 32c5e4cd1777e53d0da4e5e7bbd227725d12fc14
Author: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date:   Mon Jul 20 07:53:12 2015 +0000

    Fix infinite recursion in the JIT compiler when certain patterns when certai
n patterns are analysed.
    
    git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1577 2f5784b3-3f2a-0410-8824-
cb99058d5e15

Comment 6 Petr Pisar 2015-12-03 14:16:23 UTC
Reproducer is to pass /(?:|a|){100}x/S++ expression to pcretest.

Comment 7 Fedora Update System 2016-01-04 19:54:31 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-23 22:25:06 UTC
(In reply to Petr Pisar from comment #5)
> commit 32c5e4cd1777e53d0da4e5e7bbd227725d12fc14
> Author: zherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>
> Date:   Mon Jul 20 07:53:12 2015 +0000
> 
> Fix infinite recursion in the JIT compiler when certain patterns when
> certain patterns are analysed.

Upstream commit link:

http://vcs.pcre.org/pcre?view=revision&revision=1577

This problem was introduced in version 8.35.  While PHP and MariaDB versions embed recent PCRE versions, they do not enable JIT and hence are not affected.


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