Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1285413 - (CVE-2015-8380) CVE-2015-8380 pcre: OOB write when pcre_exec() is called with ovecsize of 1 (8.38/10)
CVE-2015-8380 pcre: OOB write when pcre_exec() is called with ovecsize of 1 (...
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=20150601,reported=...
: Security
Depends On: 1285415
Blocks: 1287727
  Show dependency treegraph
 
Reported: 2015-11-25 09:44 EST by Adam Mariš
Modified: 2017-08-02 15:51 EDT (History)
10 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 06:14:54 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)
Upstream fix (2.26 KB, patch)
2015-11-26 02:09 EST, Petr Pisar
no flags Details | Diff
Fix ported to Fedora 22's 8.37 version (1.85 KB, patch)
2015-11-26 02:24 EST, Petr Pisar
no flags Details | Diff

  None (edit)
Description Adam Mariš 2015-11-25 09:44:22 EST
A heap-based buffer overflow vulnerability was found in pcre_exec causing crash.

Upstream bug (contains reproducer):

https://bugs.exim.org/show_bug.cgi?id=1637

Upstream patch:

http://vcs.pcre.org/pcre?view=revision&revision=1565

CVE request:

http://seclists.org/oss-sec/2015/q4/363
Comment 1 Adam Mariš 2015-11-25 09:45:05 EST
Created pcre tracking bugs for this issue:

Affects: fedora-all [bug 1285415]
Comment 2 Petr Pisar 2015-11-25 11:53:22 EST
Upstream fixed it in 8.38 version.

Reproducer is passing "printf '//\n\\O1\n'" output to pcretest under valgrind.
Comment 3 Petr Pisar 2015-11-26 02:09 EST
Created attachment 1099151 [details]
Upstream fix
Comment 4 Petr Pisar 2015-11-26 02:24 EST
Created attachment 1099152 [details]
Fix ported to Fedora 22's 8.37 version
Comment 5 Fedora Update System 2015-11-26 15:55:46 EST
pcre-8.38-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 6 Fedora Update System 2015-12-11 20:55:06 EST
pcre-8.37-7.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 06:14:54 EST
I can reproduce OOB write starting with upstream version 8.31.  The actual problematic code was introduced earlier, in version 8.13, in this commit:

http://vcs.pcre.org/pcre?view=revision&revision=615

I have not tried to investigate why OOB write is not reproducible in version 8.13 - 8.30.

I do not think this should be considered a security flaw.  This problem is not triggered by a malicious pattern or malicious input, but by incorrect arguments passed to pcre_exec().  The function accepts the following arguments among others:

   ovector      Points to a vector of ints for result offsets
   ovecsize     Number of elements in the vector (a multiple of 3)

The pcretest tool allows specifying ovecsize using \O used on the data line.  It does not ensure the value specified is actually multiple of 3, and allows ovecsize 1, which triggers this problem.  So the fix applied in r1565 seems to add safeguard against incorrect use of PCRE API.

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