Bug 853990

Summary: Wrong value in re_nsub due to a wrong cast
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: pcreAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: c.david86, lkundrak, ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://bugs.exim.org/show_bug.cgi?id=1287
Whiteboard:
Fixed In Version: pcre-8.31-2.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-17 23:33:34 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:
Attachments:
Description Flags
Test case, exhibits when linked to pcreposix
none
Upstream fix
none
Test case
none
Upstream fix none

Description Petr Pisar 2012-09-03 13:50:56 UTC
Created attachment 609394 [details]
Test case, exhibits when linked to pcreposix

Running regcomp() from pcreposix library on 64-bit architecture where size_t differs to int can write broken value into re_nsub member of first argument.

This has been reported to upstream <http://bugs.exim.org/show_bug.cgi?id=1287> and fixed with commit:

r1024 | ph10 | 2012-08-29 13:08:24 +0200 (St, 29 srp 2012) | 2 lines
Fix re_nsub bug in the POSIX wrapper.

All Fedoras are affected.

Comment 1 Petr Pisar 2012-09-03 13:51:32 UTC
Created attachment 609395 [details]
Upstream fix

Comment 2 Petr Pisar 2012-09-03 14:40:55 UTC
Created attachment 609404 [details]
Test case

Comment 3 Petr Pisar 2012-09-03 14:41:25 UTC
Created attachment 609405 [details]
Upstream fix

Comment 4 Petr Pisar 2012-09-03 16:10:47 UTC
pcre-8.21 is not affected, pcre-8.31 is affected. That means only Fedoras ≥ 18 are broken. The problem exhibits on PPC64. I cannot reproduce it on amd64.

Comment 5 Fedora Update System 2012-09-03 16:30:19 UTC
pcre-8.31-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/pcre-8.31-2.fc18

Comment 6 Fedora Update System 2012-09-03 17:20:47 UTC
Package pcre-8.31-2.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing pcre-8.31-2.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-13188/pcre-8.31-2.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-09-17 23:33:34 UTC
pcre-8.31-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.