Bug 1128577

Summary: Crash while compiling recursion within a group quantified with an indefinite repeat
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: pcreAssignee: Petr Pisar <ppisar>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: c.david86, lkundrak, ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://bugs.exim.org/show_bug.cgi?id=1515
Whiteboard:
Fixed In Version: pcre-8.35-6.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-11 12:26:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1285399    

Description Petr Pisar 2014-08-11 07:01:21 UTC
$ printf '%s\n%s\n' '/((?(R)a|(?1)))*/' ''  | pcretest
PCRE version 8.33 2013-05-28

  re> Neoprávněný přístup do paměti (SIGSEGV)

This is fixed with upstream commit:

commit fd411b0b71fc1d0bd1977d0a86e5711599f875d8
Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date:   Fri Aug 8 15:22:51 2014 +0000

    Fix compile-time loop for recursive reference within a group with an indefinite
    repeat.
    
    
    git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1498 2f5784b3-3f2a-0410-8824-cb99058d5e15

Probably all Fedoras are affected (pcre-8.33-6.fc20.x86_64).

Comment 1 Petr Pisar 2014-08-11 08:16:47 UTC
All Fedoras are affected.

Comment 2 Petr Pisar 2014-08-11 12:03:55 UTC
Fixed as pcre-8.35-6.fc21 in F21.

Comment 3 Petr Pisar 2014-08-11 12:26:11 UTC
This fix requires for F20 (pcre-8.33) larger changes including:

commit 74d96caf6251eff2f6c6a3e879268ce2d2a6c9be
Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date:   Fri Jul 5 10:38:37 2013 +0000

    Implement PCRE_INFO_MATCH_EMPTY and fix 2 bugs concerned with scanning for
    empty string matching.
    
    
    git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1348 2f5784b3-3f2a-0410-8824-cb99058d5e15

which fixes some undefined behavior (including a crash) in case of "checking whether a group could match an empty string (which is used for indefinitely repeated groups to allow for breaking an infinite loop".

Therefore this bug will no be fixed in F20 and F19.

Comment 4 Petr Pisar 2015-11-25 16:12:37 UTC
*** Bug 1285401 has been marked as a duplicate of this bug. ***