postgresql/src/backend
Tom Lane 218cf59b60 Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX,
and CLUSTER) execute as the table owner rather than the calling user, using
the same privilege-switching mechanism already used for SECURITY DEFINER
functions.  The purpose of this change is to ensure that user-defined
functions used in index definitions cannot acquire the privileges of a
superuser account that is performing routine maintenance.  While a function
used in an index is supposed to be IMMUTABLE and thus not able to do anything
very interesting, there are several easy ways around that restriction; and
even if we could plug them all, there would remain a risk of reading sensitive
information and broadcasting it through a covert channel such as CPU usage.

To prevent bypassing this security measure, execution of SET SESSION
AUTHORIZATION and SET ROLE is now forbidden within a SECURITY DEFINER context.

Thanks to Itagaki Takahiro for reporting this vulnerability.

Security: CVE-2007-6600
2008-01-03 21:25:58 +00:00
..
access Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:25:58 +00:00
bootstrap Remove no-longer-needed inclusion of bootstrap_tokens.h, per patch 2002-11-04 14:22:32 +00:00
catalog Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:25:58 +00:00
commands Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:25:58 +00:00
executor Repair insufficiently careful type checking for SQL-language functions: 2007-02-02 00:04:16 +00:00
lib pgindent run. 2002-09-04 20:31:48 +00:00
libpq Back-patch 7.4-era fix for memory leak with SSL connections due to 2006-06-23 14:42:52 +00:00
main Arrange to set the LC_XXX environment variables to match our locale setup. 2006-01-05 00:55:36 +00:00
nodes Fix outfuncs.c to dump A_Const nodes representing NULLs correctly. This has 2007-07-17 01:22:25 +00:00
optimizer Ensure that the result of evaluating a function during constant-expression 2007-10-11 21:28:39 +00:00
parser transformColumnDefinition failed to complain about 2007-06-20 18:21:51 +00:00
po Translation updates 2007-09-13 20:49:39 +00:00
port Fix failure to restart Postgres when Linux kernel returns EIDRM for shmctl(). 2007-07-02 20:12:26 +00:00
postmaster Back-patch fix to cause stats processes to detach from shared memory, 2003-11-30 21:56:36 +00:00
regex Fix char-vs-pg_wchar confusion in p_ere(), per failure report from 2003-04-20 17:37:22 +00:00
rewrite Fix markQueryForLocking() to work correctly in the presence of nested views. 2007-03-01 18:51:03 +00:00
storage Fix aboriginal bug in BufFileDumpBuffer that would cause it to write the 2007-06-01 23:43:39 +00:00
tcop Push enable/disable of notify and catchup interrupts all the way down 2005-06-02 21:04:30 +00:00
utils Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:25:58 +00:00
Makefile > > > > and mb conversions (pg_ascii2mic and pg_mic2ascii not 2002-10-09 16:21:54 +00:00
nls.mk Translation updates 2002-12-10 20:00:27 +00:00