postgresql/src/backend/commands
Tom Lane eedb068c0a 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:23:15 +00:00
..
Makefile Tsearch2 functionality migrates to core. The bulk of this work is by 2007-08-21 01:11:32 +00:00
aggregatecmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
alter.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
analyze.c Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:23:15 +00:00
async.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
cluster.c Forbid ALTER TABLE and CLUSTER when there are pending AFTER-trigger events 2008-01-02 23:34:42 +00:00
comment.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
conversioncmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
copy.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
dbcommands.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
define.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
discard.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
explain.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
functioncmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
indexcmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
lockcmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
opclasscmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
operatorcmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
portalcmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
prepare.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
proclang.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
schemacmds.c Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:23:15 +00:00
sequence.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
tablecmds.c Forbid ALTER TABLE and CLUSTER when there are pending AFTER-trigger events 2008-01-02 23:34:42 +00:00
tablespace.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
trigger.c Forbid ALTER TABLE and CLUSTER when there are pending AFTER-trigger events 2008-01-02 23:34:42 +00:00
tsearchcmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
typecmds.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
user.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
vacuum.c Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:23:15 +00:00
vacuumlazy.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
variable.c Make standard maintenance operations (including VACUUM, ANALYZE, REINDEX, 2008-01-03 21:23:15 +00:00
view.c Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00