Bug 1295385 - (CVE-2016-1283) CVE-2016-1283 pcre: heap buffer overflow in handling of duplicate named groups (8.39/14)
CVE-2016-1283 pcre: heap buffer overflow in handling of duplicate named group...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
impact=important,public=20160104,repo...
: Security
Depends On: 1295386 1330490 1330491 1330494
Blocks: 1295388
  Show dependency treegraph
 
Reported: 2016-01-04 05:06 EST by Adam Mariš
Modified: 2016-10-31 08:12 EDT (History)
10 users (show)

See Also:
Fixed In Version: pcre 8.39
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-26 08:03:56 EDT
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š 2016-01-04 05:06:59 EST
It was found that pcre_compile2 function in pcre_compile.c in PCRE 8.38 mishandles the 
/((?:F?+(?:^(?(R)a+\"){99}-))(?J)(?'R'(?'R'<((?'RR'(?'R'\){97)?J)?J)(?'R'(?'R'\){99|(:(?|(?'R')(\k'R')|((?'R')))H'R'R)(H'R))))))/
pattern and related patterns with named subgroups, which allows remote attackers to cause a denial of service via heap-based buffer overflow.

Upstream bug:

https://bugs.exim.org/show_bug.cgi?id=1767
Comment 1 Adam Mariš 2016-01-04 05:07:40 EST
Created pcre tracking bugs for this issue:

Affects: fedora-all [bug 1295386]
Comment 2 Tomas Hoger 2016-02-17 11:50:27 EST
As noted in the upstream bug, I would reduce the pattern triggering the issue down to:

  /((?J)(?'R'(?'R'(?'R'(?'R'(?'R'(?|(\k'R'))))))))/

This issue was introduced in version 8.34, which refactored named group handling code and apparently several bugs were introduced in the process.
Comment 3 Tomas Hoger 2016-02-29 04:15:02 EST
Upstream fix:

http://vcs.pcre.org/pcre?view=revision&revision=1636
Comment 4 Fedora Update System 2016-03-01 20:50:09 EST
pcre-8.38-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2016-03-15 21:49:57 EDT
pcre-8.38-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 8 errata-xmlrpc 2016-05-26 04:42:49 EDT
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS

Via RHSA-2016:1132 https://access.redhat.com/errata/RHSA-2016:1132

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