Bug 1287646 (CVE-2015-8387) - CVE-2015-8387 pcre: Integer overflow in subroutine calls (8.38/8)
Summary: CVE-2015-8387 pcre: Integer overflow in subroutine calls (8.38/8)
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2015-8387
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1287647 1287648 1287649 1287650
Blocks: 1287727
TreeView+ depends on / blocked
 
Reported: 2015-12-02 13:24 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-18 20:42:40 UTC
Embargoed:


Attachments (Terms of Use)

Description Adam Mariš 2015-12-02 13:24:26 UTC
It was found that there was no check for integer overflow in subroutine calls such as (?123) in pcre before 8.38, which allows remote attackers to cause a denial of service (integer overflow) or possibly have unspecified other impact via a crafted regular expression.

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

Affects: fedora-all [bug 1287647]

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

Affects: fedora-all [bug 1287649]

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

Affects: fedora-all [bug 1287648]
Affects: epel-7 [bug 1287650]

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

Comment 5 Petr Pisar 2015-12-02 15:55:50 UTC
Fixed in upstream with:

commit 2de04da37bc9ec8f3ec74378839e5bfa7283ea1c
Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date:   Mon Jun 8 17:55:54 2015 +0000

    Add integer overflow check to (?n) code.
    
    
    git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1563 2f5784b3-3f2a-0410-8824-
cb99058d5e15

Comment 6 Fedora Update System 2016-01-04 19:54:21 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 7 Tomas Hoger 2016-02-18 20:22:46 UTC
(In reply to Petr Pisar from comment #5)
> Fixed in upstream with:
> 
> commit 2de04da37bc9ec8f3ec74378839e5bfa7283ea1c
> Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
> Date:   Mon Jun 8 17:55:54 2015 +0000
> 
> Add integer overflow check to (?n) code.

Upstream commit link:

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

Comment 8 Tomas Hoger 2016-02-18 20:42:40 UTC
This is not a security issue.  There is an integer overflow in the code that parses subroutine reference numbers.  If such large reference number is provided, it may get parsed incorrectly, and may either reference "unexpected" sub-pattern, or refer to non-existent sub-pattern, leading to error as:

Failed: reference to non-existent subpattern at offset 17

or

Failed: internal error: previously-checked referenced subpattern not found at offset 18

So bad pattern may fail to compile or execute.


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