pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Restrict access to reindex of shared catalogs for non-privileged 2+ messages / 1 participants [nested] [flat]
* pgsql: Restrict access to reindex of shared catalogs for non-privileged @ 2018-08-09 07:42 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2018-08-09 07:42 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Restrict access to reindex of shared catalogs for non-privileged users A database owner running a database-level REINDEX has the possibility to also do the operation on shared system catalogs without being an owner of them, which allows him to block resources it should not have access to. The same goes for a schema owner. For example, PostgreSQL would go unresponsive and even block authentication if a lock is waited for pg_authid. This commit makes sure that a user running a REINDEX SYSTEM, DATABASE or SCHEMA only works on the following relations: - The user is a superuser - The user is the table owner - The user is the database/schema owner, only if the relation worked on is not shared. Robert has worded most the documentation changes, and I have coded the core part. Reported-by: Lloyd Albin, Jeremy Schneider Author: Michael Paquier, Robert Haas Reviewed by: Nathan Bossart, Kyotaro Horiguchi Discussion: https://postgr.es/m/152512087100.19803.12733865831237526317@wrigleys.postgresql.org Discussion: https://postgr.es/m/20180805211059.GA2185@paquier.xyz Backpatch-through: 11- as the current behavior has been around for a very long time and could be disruptive for already released branches. Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/87330e21c32793237791756ddffae676775e3aaa Modified Files -------------- doc/src/sgml/ref/reindex.sgml | 13 +++++++++---- src/backend/commands/indexcmds.c | 12 ++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Restrict access to reindex of shared catalogs for non-privileged @ 2018-08-09 07:42 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2018-08-09 07:42 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Restrict access to reindex of shared catalogs for non-privileged users A database owner running a database-level REINDEX has the possibility to also do the operation on shared system catalogs without being an owner of them, which allows him to block resources it should not have access to. The same goes for a schema owner. For example, PostgreSQL would go unresponsive and even block authentication if a lock is waited for pg_authid. This commit makes sure that a user running a REINDEX SYSTEM, DATABASE or SCHEMA only works on the following relations: - The user is a superuser - The user is the table owner - The user is the database/schema owner, only if the relation worked on is not shared. Robert has worded most the documentation changes, and I have coded the core part. Reported-by: Lloyd Albin, Jeremy Schneider Author: Michael Paquier, Robert Haas Reviewed by: Nathan Bossart, Kyotaro Horiguchi Discussion: https://postgr.es/m/152512087100.19803.12733865831237526317@wrigleys.postgresql.org Discussion: https://postgr.es/m/20180805211059.GA2185@paquier.xyz Backpatch-through: 11- as the current behavior has been around for a very long time and could be disruptive for already released branches. Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/661dd23950f2e64646404605e99315d2379de0e5 Modified Files -------------- doc/src/sgml/ref/reindex.sgml | 13 +++++++++---- src/backend/commands/indexcmds.c | 12 ++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-08-09 07:42 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-08-09 07:42 pgsql: Restrict access to reindex of shared catalogs for non-privileged Michael Paquier <michael@paquier.xyz> 2018-08-09 07:42 pgsql: Restrict access to reindex of shared catalogs for non-privileged Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox