]> granicus.if.org Git - postgresql/commit
Disallow RESET ROLE and RESET SESSION AUTHORIZATION inside security-definer
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Sep 2009 22:08:14 +0000 (22:08 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 3 Sep 2009 22:08:14 +0000 (22:08 +0000)
commit4fd4bf4bd85ee1f6a64c0d0e087420e38a387257
treeca06f0a4006a9c31ba27f65ee706341824d99d39
parent3e2440970a00a57f66aaf72e38a35bfe53a07c29
Disallow RESET ROLE and RESET SESSION AUTHORIZATION inside security-definer
functions.

This extends the previous patch that forbade SETting these variables inside
security-definer functions.  RESET is equally a security hole, since it
would allow regaining privileges of the caller; furthermore it can trigger
Assert failures and perhaps other internal errors, since the code is not
expecting these variables to change in such contexts.  The previous patch
did not cover this case because assign hooks don't really have enough
information, so move the responsibility for preventing this into guc.c.

Problem discovered by Heikki Linnakangas.

Security: no CVE assigned yet, extends CVE-2007-6600
src/backend/commands/variable.c
src/backend/utils/misc/guc.c
src/include/utils/guc.h