Bug 1005483 - (CVE-2016-8859) VUL-0: CVE-2016-8859: tre: regex integer overflows in buffer size computations
VUL-0: CVE-2016-8859: tre: regex integer overflows in buffer size computations
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: Security
Leap 42.1
Other Other
: P3 - Medium : Normal (vote)
: ---
Assigned To: Security Team bot
E-mail List
Depends on:
  Show dependency treegraph
Reported: 2016-10-19 07:19 UTC by Mikhail Kasimov
Modified: 2018-01-25 23:37 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---

0001-fix-missing-integer-overflow-checks-in-regexec-buffer-patch (2.62 KB, patch)
2016-10-19 07:19 UTC, Mikhail Kasimov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Kasimov 2016-10-19 07:19:30 UTC
Created attachment 698015 [details]

Reference: http://seclists.org/oss-sec/2016/q4/183
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.

All versions of the TRE library and musl libc are affected. The
attached patch fixes the issue in musl and should be easy to adapt for
use with original TRE. musl git master is fixed as of commit

Comment 2 Swamp Workflow Management 2016-10-20 22:00:26 UTC
bugbot adjusting priority
Comment 3 Karol Babioch 2018-01-16 16:15:07 UTC
Possible fix in request 566468: https://build.opensuse.org/request/show/566468
Comment 4 Andreas Stieger 2018-01-25 19:19:09 UTC
Comment 5 Swamp Workflow Management 2018-01-25 23:07:50 UTC
openSUSE-SU-2018:0222-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 1005483
CVE References: CVE-2016-8859
Sources used:
openSUSE Leap 42.3 (src):    tre-0.8.0_git201402282055-10.1
openSUSE Leap 42.2 (src):    tre-0.8.0_git201402282055-7.3.1