postgresql/src/include
Tom Lane 98f27aaef3 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:47:55 +00:00
..
access Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
bootstrap Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
catalog Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
commands Forbid ALTER TABLE and CLUSTER when there are pending AFTER-trigger events 2008-01-02 23:34:42 +00:00
executor Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
lib Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
libpq Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
mb Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
nodes Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
optimizer Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
parser Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
port Use _USE_32BIT_TIME_T when building with MSVC. Also, enforce that it's 2007-12-11 14:34:43 +00:00
postmaster Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
regex Fix assorted security-grade bugs in the regex engine. All of these problems 2008-01-03 20:47:55 +00:00
rewrite Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
snowball Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
storage Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
tcop Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
tsearch Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
utils Fix some missed copyright updates. 2008-01-01 20:31:21 +00:00
Makefile make install is supposed to install everything under src/include/, 2007-10-14 17:07:51 +00:00
c.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
fmgr.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
funcapi.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
getaddrinfo.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
getopt_long.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
miscadmin.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
pg_config.h.in Document that configure option only affects contrib: 2007-11-05 17:43:20 +00:00
pg_config.h.win32 Stamp 8.3beta4. 2007-12-03 00:11:01 +00:00
pg_config_manual.h Arrange for large sequential scans to synchronize with each other, so that 2007-06-08 18:23:53 +00:00
pg_trace.h Correct two more copyrights found by updated script. 2008-01-02 02:42:06 +00:00
pgstat.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
pgtime.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
port.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
postgres.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
postgres_ext.h Move NAMEDATALEN definition from postgres_ext.h to pg_config_manual.h. It 2007-02-06 09:16:08 +00:00
postgres_fe.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
rusagestub.h Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00