Bug 1161587 - Capturing group offsets before forced match are not initialized
Summary: Capturing group offsets before forced match are not initialized
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pcre
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: http://bugs.exim.org/show_bug.cgi?id=...
Whiteboard:
: 1249906 (view as bug list)
Depends On:
Blocks: CVE-2015-8382
TreeView+ depends on / blocked
 
Reported: 2014-11-07 11:57 UTC by Petr Pisar
Modified: 2015-08-04 09:16 UTC (History)
5 users (show)

Fixed In Version: pcre-8.33-7.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1161597 (view as bug list)
Environment:
Last Closed: 2014-11-17 06:29:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2014-11-07 11:57:39 UTC
As reported to upstream <http://bugs.exim.org/show_bug.cgi?id=1537>:

$ pcretest  
PCRE version 8.36 2014-09-26

  re> /(?:((abcd))|(((?:(?:(?:(?:abc|(?:abcdef))))b)abcdefghi)abc)|((*ACCEPT)))/
data> 1234abcd
 0:
 1:
 2:
 3:
 4:
 5:
data>

Which should return "unset" groups 1--4. The library forgets to set those offsets to -1.

Fixed by upstream:

commit e2eeaf85f1b5d6c4669b621d309ff904cbf96f4b
Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date:   Wed Nov 5 15:08:03 2014 +0000

    Fix bug when there are unset groups prior to (*ACCEPT) within a capturing
    group.
    
    
    git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1510 2f5784b3-3f2a-0410-8824-cb99058d5e15

Comment 1 Petr Pisar 2014-11-07 12:03:10 UTC
All Fedoras are affected (pcre-8.36-1.fc22---pcre-8.32-10.fc19).

Comment 2 Petr Pisar 2014-11-07 12:28:00 UTC
Simpler reproducer:

Was:

  re> /(x)|((*ACCEPT))/
data> abcd
 0: 
 1: 
 2: 

Should be:

  re> /(x)|((*ACCEPT))/
data> abcd
 0: 
 1: <unset>
 2: 
data>

Comment 3 Fedora Update System 2014-11-07 12:42:22 UTC
pcre-8.35-7.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/pcre-8.35-7.fc21

Comment 4 Fedora Update System 2014-11-07 12:45:20 UTC
pcre-8.33-7.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/pcre-8.33-7.fc20

Comment 5 Fedora Update System 2014-11-07 12:49:38 UTC
pcre-8.32-11.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/pcre-8.32-11.fc19

Comment 6 Fedora Update System 2014-11-09 15:46:28 UTC
Package pcre-8.32-11.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pcre-8.32-11.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-14516/pcre-8.32-11.fc19
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-11-17 06:29:15 UTC
pcre-8.35-7.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2014-11-25 15:29:40 UTC
pcre-8.32-11.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-11-25 15:31:47 UTC
pcre-8.33-7.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Petr Pisar 2015-08-04 09:16:11 UTC
*** Bug 1249906 has been marked as a duplicate of this bug. ***


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