Date: Tue, 18 Oct 2016 19:06:13 -0400 From: Rich Felker <dalias@...c.org> To: oss-security@...ts.openwall.com Cc: musl@...ts.openwall.com, Ville Laurikari <ville@...rikari.net> Subject: CVE Request - TRE & musl libc regex integer overflows in buffer size computations 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 c3edc06d1e1360f3570db9155d6b318ae0d0f0f7. Rich View attachment "0001-fix-missing-integer-overflow-checks-in-regexec-buffe.patch" of type "text/plain" (2685 bytes)
Powered by blists - more mailing lists
Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.
Powered by Openwall GNU/*/Linux - Powered by OpenVZ