Bug 1700392 (CVE-2017-16231) - CVE-2017-16231 pcre: self-recursive call in match() in pcre_exec.c leads to denial of service
Summary: CVE-2017-16231 pcre: self-recursive call in match() in pcre_exec.c leads to d...
Alias: CVE-2017-16231
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1700393 1700394 1700395
Blocks: 1700399
TreeView+ depends on / blocked
Reported: 2019-04-16 12:53 UTC by msiddiqu
Modified: 2021-02-16 22:05 UTC (History)
49 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-21 19:45:01 UTC

Attachments (Terms of Use)

Description msiddiqu 2019-04-16 12:53:08 UTC
** DISPUTED ** In PCRE 8.41, after compiling, a pcretest load test PoC produces a crash overflow in the function match() in pcre_exec.c because of a self-recursive call. NOTE: third parties dispute the relevance of this report, noting that there are options that can be used to limit the amount of stack that is used.





Comment 1 msiddiqu 2019-04-16 12:53:30 UTC
Created mingw-pcre tracking bugs for this issue:

Affects: epel-7 [bug 1700395]
Affects: fedora-28 [bug 1700393]
Affects: fedora-29 [bug 1700394]

Comment 2 Petr Pisar 2019-04-16 14:04:50 UTC
This is a known feature of any recursive algorithm that process an untrusted input. A user can limit a recursion limit or increase a stack size. Upstream always rejects these stack-exhausted bugs as this is a limitation of the architecture.

Comment 4 Joshua Padman 2019-05-15 23:04:49 UTC
This vulnerability is out of security support scope for the following products:
 * Red Hat Enterprise Application Platform 6
 * Red Hat Enterprise Application Platform 5

Please refer to https://access.redhat.com/support/policy/updates/jboss_notes for more details.

Comment 8 Marco Benatto 2019-05-21 19:40:17 UTC
Analyzing the pcre code it's possible to notice it have a few ways to control and limit the recursion
depth on match() function:

1) The caller from pcre_exec() can limit its stack usage via rlimit related calls;
2) There's a default built-in max recursion depth on pcre;
3) The caller can set the max recursion depth via pcre configuration calls from its API;

Although the default built-in max depth may not be enough to avoid stack overflow there's still other
two ways to avoid it.

Given the information above it doesn't seems a security issue on pcre.

Comment 9 Doran Moppert 2020-02-11 00:31:47 UTC

Red Hat Product Security determined that this flaw was not a security vulnerability. See the Bugzilla link for more details.

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