summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane2012-02-23 20:39:07 +0000
committerTom Lane2012-02-23 20:39:07 +0000
commitde323d534c8989bc713c1ac5313024cb6d7a4277 (patch)
tree9aba2dd7dccee620313dd1a0c3f4f248a70f7a23 /doc/src
parent144fcf754fc2615d1a4643adfce41b89ccf6ba68 (diff)
Require execute permission on the trigger function for CREATE TRIGGER.
This check was overlooked when we added function execute permissions to the system years ago. For an ordinary trigger function it's not a big deal, since trigger functions execute with the permissions of the table owner, so they couldn't do anything the user issuing the CREATE TRIGGER couldn't have done anyway. However, if a trigger function is SECURITY DEFINER, that is not the case. The lack of checking would allow another user to install it on his own table and then invoke it with, essentially, forged input data; which the trigger function is unlikely to realize, so it might do something undesirable, for instance insert false entries in an audit log table. Reported by Dinesh Kumar, patch by Robert Haas Security: CVE-2012-0866
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/create_trigger.sgml3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml
index 0fac156feee..b1d8d0046f9 100644
--- a/doc/src/sgml/ref/create_trigger.sgml
+++ b/doc/src/sgml/ref/create_trigger.sgml
@@ -229,7 +229,8 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
<para>
To create a trigger on a table, the user must have the
- <literal>TRIGGER</literal> privilege on the table.
+ <literal>TRIGGER</literal> privilege on the table. The user must
+ also have <literal>EXECUTE</literal> privilege on the trigger function.
</para>
<para>