PCRE compile workspace overflow

From: Michael Santos <michael.santos@gmail.com>
To: bugtraq@securityfocus.com
Subject: PCRE compile workspace overflow

In versions of the PCRE regular expression library before 8.02, compiling
a very large regular expression will overflow the workspace buffer.

Although the code checks for the size of the compiled regular expression,
the check only returns true after the end of the buffer has been
overrun. The bug was fixed in PCRE 8.02 with this patch:


This example will cause a 2 byte overflow:

~$ perl -e 'print "/","("x819, ")"x819, "/"' | pcretest

Original Bug Report:


Copyright © 1995-2019 LinuxRocket.net. All rights reserved.