postgresql/src
Tom Lane 0776cb2116 Fix assorted security-grade bugs in the regex engine. All of these problems
are shared with Tcl, since it's their code to begin with, and the patches
have been copied from Tcl 8.5.0.  Problems:

CVE-2007-4769: Inadequate check on the range of backref numbers allows
crash due to out-of-bounds read.
CVE-2007-4772: Infinite loop in regex optimizer for pattern '($|^)*'.
CVE-2007-6067: Very slow optimizer cleanup for regex with a large NFA
representation, as well as crash if we encounter an out-of-memory condition
during NFA construction.

Part of the response to CVE-2007-6067 is to put a limit on the number of
states in the NFA representation of a regex.  This seems needed even though
the within-the-code problems have been corrected, since otherwise the code
could try to use very large amounts of memory for a suitably-crafted regex,
leading to potential DOS by driving the system into swap, activating a kernel
OOM killer, etc.

Although there are certainly plenty of ways to drive the system into effective
DOS with poorly-written SQL queries, these problems seem worth treating as
security issues because many applications might accept regex search patterns
from untrustworthy sources.

Thanks to Will Drewry of Google for reporting these problems.  Patches by Will
Drewry and Tom Lane.

Security: CVE-2007-4769, CVE-2007-4772, CVE-2007-6067
2008-01-03 20:49:15 +00:00
..
backend Fix assorted security-grade bugs in the regex engine. All of these problems 2008-01-03 20:49:15 +00:00
bin Translation updates 2007-09-13 20:56:32 +00:00
corba Convert files from DOS format to normal text. 2000-12-03 14:43:59 +00:00
include Fix assorted security-grade bugs in the regex engine. All of these problems 2008-01-03 20:49:15 +00:00
interfaces Added missing clause to parser. 2007-11-06 08:33:32 +00:00
makefiles Use -Wl for linker switches on freebsd --- back-port of an 8.0 change. 2007-02-03 17:27:11 +00:00
pl Fix buggy usage of vsnprintf in PL/Python by removing it altogether, instead 2007-11-23 01:48:08 +00:00
port Add port support for unsetenv() in back branches. Needed for locale 2006-01-05 00:51:25 +00:00
template OK, another try at Darwin threads. 2004-07-08 18:25:22 +00:00
test Fix a bug in the original implementation of redundant-join-clause removal: 2007-07-31 19:54:27 +00:00
tools Update release checklist to reflect that HISTORY and INSTALL don't 2005-05-08 23:34:32 +00:00
tutorial Change \' to '', for SQL standards compliance. Backpatch to 7.3, 7.4, 2006-05-21 19:57:07 +00:00
utils Re-add Win32 missing files, I think. 2002-11-02 02:00:35 +00:00
bcc32.mak Attached is a patch to provide makefiles, etc. to allow the compilation 2002-12-30 21:07:26 +00:00
DEVELOPERS just testing a script... 1999-07-30 03:45:57 +00:00
Makefile Assorted fixes for Cygwin: 2002-09-05 18:28:46 +00:00
Makefile.global.in Supress ecpg thread test if configure didn't enable threads. Fix 2003-12-19 23:29:29 +00:00
Makefile.shlib Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX. 2005-12-03 20:17:00 +00:00
nls-global.mk Run distprep target before creating list of files that contain translatable 2003-09-14 22:40:38 +00:00
win32.mak Remove all traces of multibyte and locale options. Clean up comments 2002-09-03 21:45:44 +00:00