FreeBSD VuXML: Documenting security issues in FreeBSD and the FreeBSD Ports Collection

pcre -- heap overflow vulnerability in '(?|' situations

Affected packages
pcre <= 8.37_2

Details

VuXML ID ff0acfb4-3efa-11e5-93ad-002590263bf5
Discovery 2015-08-05
Entry 2015-08-10

Venustech ADLAB reports:

PCRE library is prone to a vulnerability which leads to Heap Overflow. During the compilation of a malformed regular expression, more data is written on the malloced block than the expected size output by compile_regex. Exploits with advanced Heap Fengshui techniques may allow an attacker to execute arbitrary code in the context of the user running the affected application.

Latest version of PCRE is prone to a Heap Overflow vulnerability which could caused by the following regular expression.

/(?J:(?|(:(?|(?'R')(\k'R')|((?'R')))H'Rk'Rf)|s(?'R'))))/

References

FreeBSD PR ports/202209
URL https://bugs.exim.org/show_bug.cgi?id=1667