Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1387112 (CVE-2016-8859) - CVE-2016-8859 tre: Regex integer overflow in buffer size computations
Summary: CVE-2016-8859 tre: Regex integer overflow in buffer size computations
Alias: CVE-2016-8859
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1387113 1387114
TreeView+ depends on / blocked
Reported: 2016-10-20 07:12 UTC by Andrej Nemec
Modified: 2019-09-29 13:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-03-28 19:57:08 UTC

Attachments (Terms of Use)

Description Andrej Nemec 2016-10-20 07:12:24 UTC
Due to incorrect use of integer types and missing overflow checks in
the tre_tnfa_run_parallel function's buffer overflow logic, the TRE
regex implementation (both original version and the one used in musl
libc) are subject to integer overflows in buffer size computation.

If the caller passes to regcomp a regular expression whose internal
representation requires a large number of states and/or a large number
of tags, too little space will be allocated during regexec, resulting
in out-of-bound memory writes.

An attacker who controls the regular expression and/or the string
being searched can potentially exploit these writes to achieve
controlled heap corruption.


Comment 1 Andrej Nemec 2016-10-20 07:12:57 UTC
Created tre tracking bugs for this issue:

Affects: fedora-all [bug 1387113]
Affects: epel-all [bug 1387114]

Comment 2 Fedora Update System 2016-11-19 12:49:18 UTC
tre-0.8.0-18.20140228gitc2f5d13.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

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