Bug 1287646 - (CVE-2015-8387) CVE-2015-8387 pcre: Integer overflow in subroutine calls (8.38/8)
CVE-2015-8387 pcre: Integer overflow in subroutine calls (8.38/8)
Status: CLOSED NOTABUG
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Red Hat Product Security
impact=none,public=20151123,reported=...
: Security
Depends On: 1287647 1287648 1287649 1287650
Blocks: 1287727
  Show dependency treegraph
 
Reported: 2015-12-02 08:24 EST by Adam Mariš
Modified: 2017-08-02 15:50 EDT (History)
16 users (show)

See Also:
Fixed In Version: pcre 8.38
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-18 15:42:40 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:24:26 EST
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 08:26:05 EST
Created pcre tracking bugs for this issue:

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

Affects: fedora-all [bug 1287649]
Comment 3 Adam Mariš 2015-12-02 08:26:21 EST
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 10:23:34 EST
Corresponds to item 8 in http://vcs.pcre.org/pcre/code/trunk/ChangeLog?view=markup
Comment 5 Petr Pisar 2015-12-02 10:55:50 EST
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 14:54:21 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 7 Tomas Hoger 2016-02-18 15:22:46 EST
(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 15:42:40 EST
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.