pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Check table ownership when DROP OWNED BY changes policies.
4+ messages / 1 participants
[nested] [flat]

* pgsql: Check table ownership when DROP OWNED BY changes policies.
@ 2026-11-09 14:21 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Check table ownership when DROP OWNED BY changes policies.

DROP OWNED BY removes the given roles from any row-level security
policies that apply to them, but it does not check that the current
user owns the table.  This allows a role to remove itself from
restrictive policies on tables it does not own.  To fix, leave such
policies unchanged and issue a warning, as is already done for
privileges that the current user cannot revoke.

Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reported-by: Anthropic OSS program
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Co-authored-by: Anthropic OSS program
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Sami Imseih <samimseih.pg@gmail.com>
Security: CVE-2026-116311
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/05680d41cc972c36ccccaab146bf8b65d92cc792
Author: Nathan Bossart <nathan@postgresql.org>

Modified Files
--------------
src/backend/catalog/pg_shdepend.c         |  4 ++--
src/backend/commands/policy.c             | 21 +++++++++++++++++++++
src/test/regress/expected/rowsecurity.out |  7 +++++++
src/test/regress/sql/rowsecurity.sql      |  7 +++++++
4 files changed, 37 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Check table ownership when DROP OWNED BY changes policies.
@ 2026-11-09 14:21 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Check table ownership when DROP OWNED BY changes policies.

DROP OWNED BY removes the given roles from any row-level security
policies that apply to them, but it does not check that the current
user owns the table.  This allows a role to remove itself from
restrictive policies on tables it does not own.  To fix, leave such
policies unchanged and issue a warning, as is already done for
privileges that the current user cannot revoke.

Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reported-by: Anthropic OSS program
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Co-authored-by: Anthropic OSS program
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Sami Imseih <samimseih.pg@gmail.com>
Security: CVE-2026-116311
Backpatch-through: 14

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c98434b85018e05b767dda23b538bb5b7fbe1cc9
Author: Nathan Bossart <nathan@postgresql.org>

Modified Files
--------------
src/backend/catalog/pg_shdepend.c         |  4 ++--
src/backend/commands/policy.c             | 21 +++++++++++++++++++++
src/test/regress/expected/rowsecurity.out |  7 +++++++
src/test/regress/sql/rowsecurity.sql      |  7 +++++++
4 files changed, 37 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Check table ownership when DROP OWNED BY changes policies.
@ 2026-11-09 14:21 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Noah Misch @ 2026-11-09 14:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Check table ownership when DROP OWNED BY changes policies.

DROP OWNED BY removes the given roles from any row-level security
policies that apply to them, but it does not check that the current
user owns the table.  This allows a role to remove itself from
restrictive policies on tables it does not own.  To fix, leave such
policies unchanged and issue a warning, as is already done for
privileges that the current user cannot revoke.

Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reported-by: Anthropic OSS program
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Co-authored-by: Anthropic OSS program
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Sami Imseih <samimseih.pg@gmail.com>
Security: CVE-2026-116311
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7f30f607a2579ea90c0d3ca2739a4a83eb7316ed
Author: Nathan Bossart <nathan@postgresql.org>

Modified Files
--------------
src/backend/catalog/pg_shdepend.c         |  4 ++--
src/backend/commands/policy.c             | 21 +++++++++++++++++++++
src/test/regress/expected/rowsecurity.out |  7 +++++++
src/test/regress/sql/rowsecurity.sql      |  7 +++++++
4 files changed, 37 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Check table ownership when DROP OWNED BY changes policies.
@ 2026-11-09 14:22 Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Noah Misch @ 2026-11-09 14:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Check table ownership when DROP OWNED BY changes policies.

DROP OWNED BY removes the given roles from any row-level security
policies that apply to them, but it does not check that the current
user owns the table.  This allows a role to remove itself from
restrictive policies on tables it does not own.  To fix, leave such
policies unchanged and issue a warning, as is already done for
privileges that the current user cannot revoke.

Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reported-by: Anthropic OSS program
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Co-authored-by: Anthropic OSS program
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Sami Imseih <samimseih.pg@gmail.com>
Security: CVE-2026-116311
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d901599291b221bc0ed9a3dba749cfc13a4f4f5b
Author: Nathan Bossart <nathan@postgresql.org>

Modified Files
--------------
src/backend/catalog/pg_shdepend.c         |  4 ++--
src/backend/commands/policy.c             | 21 +++++++++++++++++++++
src/test/regress/expected/rowsecurity.out |  7 +++++++
src/test/regress/sql/rowsecurity.sql      |  7 +++++++
4 files changed, 37 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2026-11-09 14:22 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 14:21 pgsql: Check table ownership when DROP OWNED BY changes policies. Noah Misch <noah@leadboat.com>
2026-11-09 14:21 pgsql: Check table ownership when DROP OWNED BY changes policies. Noah Misch <noah@leadboat.com>
2026-11-09 14:21 pgsql: Check table ownership when DROP OWNED BY changes policies. Noah Misch <noah@leadboat.com>
2026-11-09 14:22 pgsql: Check table ownership when DROP OWNED BY changes policies. Noah Misch <noah@leadboat.com>

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