pgsql: Require execute permission on the trigger function for CREATE TR

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Require execute permission on the trigger function for CREATE TR
Дата
Msg-id E1S0hiQ-00088Q-Lx@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/993b3e50845134e863968bcdaf148ff3e576c74a

Modified Files
--------------
doc/src/sgml/ref/create_trigger.sgml |    3 ++-
src/backend/commands/trigger.c       |    4 ++++
2 files changed, 6 insertions(+), 1 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Remove arbitrary limitation on length of common name in SSL cert
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Convert newlines to spaces in names written in pg_dump comments.