pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make relation-enumerating operations be security-restricted oper
6+ messages / 1 participants
[nested] [flat]

* pgsql: Make relation-enumerating operations be security-restricted oper
@ 2022-05-09 15:37  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2022-05-09 15:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make relation-enumerating operations be security-restricted operations.

When a feature enumerates relations and runs functions associated with
all found relations, the feature's user shall not need to trust every
user having permission to create objects.  BRIN-specific functionality
in autovacuum neglected to account for this, as did pg_amcheck and
CLUSTER.  An attacker having permission to create non-temp objects in at
least one schema could execute arbitrary SQL functions under the
identity of the bootstrap superuser.  CREATE INDEX (not a
relation-enumerating operation) and REINDEX protected themselves too
late.  This change extends to the non-enumerating amcheck interface.
Back-patch to v10 (all supported versions).

Sergey Shinderuk, reviewed (in earlier versions) by Alexander Lakhin.
Reported by Alexander Lakhin.

Security: CVE-2022-1552

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ef792f7856dea2576dcd9cab92b2b05fe955696b

Modified Files
--------------
contrib/amcheck/expected/check_btree.out | 23 ++++++++++++
contrib/amcheck/sql/check_btree.sql      | 21 +++++++++++
contrib/amcheck/verify_nbtree.c          | 28 ++++++++++++++
src/backend/access/brin/brin.c           | 30 ++++++++++++++-
src/backend/catalog/index.c              | 41 +++++++++++++++------
src/backend/commands/cluster.c           | 35 ++++++++++++++----
src/backend/commands/indexcmds.c         | 53 ++++++++++++++++++++++++++-
src/backend/utils/init/miscinit.c        | 24 +++++++-----
src/test/regress/expected/privileges.out | 63 ++++++++++++++++++++++++++++++++
src/test/regress/sql/privileges.sql      | 47 ++++++++++++++++++++++++
10 files changed, 335 insertions(+), 30 deletions(-)



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

* pgsql: Make relation-enumerating operations be security-restricted oper
@ 2022-05-09 15:37  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2022-05-09 15:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make relation-enumerating operations be security-restricted operations.

When a feature enumerates relations and runs functions associated with
all found relations, the feature's user shall not need to trust every
user having permission to create objects.  BRIN-specific functionality
in autovacuum neglected to account for this, as did pg_amcheck and
CLUSTER.  An attacker having permission to create non-temp objects in at
least one schema could execute arbitrary SQL functions under the
identity of the bootstrap superuser.  CREATE INDEX (not a
relation-enumerating operation) and REINDEX protected themselves too
late.  This change extends to the non-enumerating amcheck interface.
Back-patch to v10 (all supported versions).

Sergey Shinderuk, reviewed (in earlier versions) by Alexander Lakhin.
Reported by Alexander Lakhin.

Security: CVE-2022-1552

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/48ca2904c11d4293ec0bed1625259b2e4ef550cc

Modified Files
--------------
contrib/amcheck/expected/check_btree.out | 23 ++++++++++
contrib/amcheck/sql/check_btree.sql      | 21 +++++++++
contrib/amcheck/verify_nbtree.c          | 28 +++++++++++
src/backend/access/brin/brin.c           | 30 +++++++++++-
src/backend/catalog/index.c              | 41 ++++++++++++-----
src/backend/commands/cluster.c           | 35 +++++++++++---
src/backend/commands/indexcmds.c         | 79 +++++++++++++++++++++++++++++++-
src/backend/utils/init/miscinit.c        | 24 ++++++----
src/test/regress/expected/privileges.out | 63 +++++++++++++++++++++++++
src/test/regress/sql/privileges.sql      | 47 +++++++++++++++++++
10 files changed, 361 insertions(+), 30 deletions(-)



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

* pgsql: Make relation-enumerating operations be security-restricted oper
@ 2022-05-09 15:37  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2022-05-09 15:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make relation-enumerating operations be security-restricted operations.

When a feature enumerates relations and runs functions associated with
all found relations, the feature's user shall not need to trust every
user having permission to create objects.  BRIN-specific functionality
in autovacuum neglected to account for this, as did pg_amcheck and
CLUSTER.  An attacker having permission to create non-temp objects in at
least one schema could execute arbitrary SQL functions under the
identity of the bootstrap superuser.  CREATE INDEX (not a
relation-enumerating operation) and REINDEX protected themselves too
late.  This change extends to the non-enumerating amcheck interface.
Back-patch to v10 (all supported versions).

Sergey Shinderuk, reviewed (in earlier versions) by Alexander Lakhin.
Reported by Alexander Lakhin.

Security: CVE-2022-1552

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ab49ce7c3414ac19e4afb386d7843ce2d2fb8bda

Modified Files
--------------
contrib/amcheck/expected/check_btree.out | 23 ++++++++
contrib/amcheck/sql/check_btree.sql      | 21 +++++++
contrib/amcheck/verify_nbtree.c          | 27 +++++++++
src/backend/access/brin/brin.c           | 29 +++++++++-
src/backend/catalog/index.c              | 65 ++++++++++++++++-----
src/backend/commands/cluster.c           | 37 ++++++++----
src/backend/commands/indexcmds.c         | 98 +++++++++++++++++++++++++++-----
src/backend/utils/init/miscinit.c        | 24 +++++---
src/test/regress/expected/privileges.out | 55 ++++++++++++++++++
src/test/regress/sql/privileges.sql      | 47 +++++++++++++++
10 files changed, 378 insertions(+), 48 deletions(-)



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

* pgsql: Make relation-enumerating operations be security-restricted oper
@ 2022-05-09 15:37  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2022-05-09 15:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make relation-enumerating operations be security-restricted operations.

When a feature enumerates relations and runs functions associated with
all found relations, the feature's user shall not need to trust every
user having permission to create objects.  BRIN-specific functionality
in autovacuum neglected to account for this, as did pg_amcheck and
CLUSTER.  An attacker having permission to create non-temp objects in at
least one schema could execute arbitrary SQL functions under the
identity of the bootstrap superuser.  CREATE INDEX (not a
relation-enumerating operation) and REINDEX protected themselves too
late.  This change extends to the non-enumerating amcheck interface.
Back-patch to v10 (all supported versions).

Sergey Shinderuk, reviewed (in earlier versions) by Alexander Lakhin.
Reported by Alexander Lakhin.

Security: CVE-2022-1552

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/35edcc0cee7bf7d4746e3e5b7966b1f0ec509560

Modified Files
--------------
contrib/amcheck/expected/check_btree.out | 23 ++++++++
contrib/amcheck/sql/check_btree.sql      | 21 +++++++
contrib/amcheck/verify_nbtree.c          | 27 +++++++++
src/backend/access/brin/brin.c           | 29 +++++++++-
src/backend/catalog/index.c              | 65 ++++++++++++++++-----
src/backend/commands/cluster.c           | 37 ++++++++----
src/backend/commands/indexcmds.c         | 98 +++++++++++++++++++++++++++-----
src/backend/utils/init/miscinit.c        | 24 +++++---
src/test/regress/expected/privileges.out | 58 +++++++++++++++++++
src/test/regress/sql/privileges.sql      | 47 +++++++++++++++
10 files changed, 381 insertions(+), 48 deletions(-)



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

* pgsql: Make relation-enumerating operations be security-restricted oper
@ 2022-05-09 15:37  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2022-05-09 15:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make relation-enumerating operations be security-restricted operations.

When a feature enumerates relations and runs functions associated with
all found relations, the feature's user shall not need to trust every
user having permission to create objects.  BRIN-specific functionality
in autovacuum neglected to account for this, as did pg_amcheck and
CLUSTER.  An attacker having permission to create non-temp objects in at
least one schema could execute arbitrary SQL functions under the
identity of the bootstrap superuser.  CREATE INDEX (not a
relation-enumerating operation) and REINDEX protected themselves too
late.  This change extends to the non-enumerating amcheck interface.
Back-patch to v10 (all supported versions).

Sergey Shinderuk, reviewed (in earlier versions) by Alexander Lakhin.
Reported by Alexander Lakhin.

Security: CVE-2022-1552

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7f098f7b53edfe8340c6e031bf497308a2e65e2e

Modified Files
--------------
contrib/amcheck/expected/check_btree.out | 23 ++++++++
contrib/amcheck/sql/check_btree.sql      | 21 +++++++
contrib/amcheck/verify_nbtree.c          | 27 +++++++++
src/backend/access/brin/brin.c           | 29 +++++++++-
src/backend/catalog/index.c              | 65 ++++++++++++++++-----
src/backend/commands/cluster.c           | 40 ++++++++-----
src/backend/commands/indexcmds.c         | 98 +++++++++++++++++++++++++++-----
src/backend/utils/init/miscinit.c        | 24 +++++---
src/test/regress/expected/privileges.out | 58 +++++++++++++++++++
src/test/regress/sql/privileges.sql      | 47 +++++++++++++++
10 files changed, 382 insertions(+), 50 deletions(-)



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

* pgsql: Make relation-enumerating operations be security-restricted oper
@ 2022-05-09 15:37  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2022-05-09 15:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make relation-enumerating operations be security-restricted operations.

When a feature enumerates relations and runs functions associated with
all found relations, the feature's user shall not need to trust every
user having permission to create objects.  BRIN-specific functionality
in autovacuum neglected to account for this, as did pg_amcheck and
CLUSTER.  An attacker having permission to create non-temp objects in at
least one schema could execute arbitrary SQL functions under the
identity of the bootstrap superuser.  CREATE INDEX (not a
relation-enumerating operation) and REINDEX protected themselves too
late.  This change extends to the non-enumerating amcheck interface.
Back-patch to v10 (all supported versions).

Sergey Shinderuk, reviewed (in earlier versions) by Alexander Lakhin.
Reported by Alexander Lakhin.

Security: CVE-2022-1552

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a117cebd638dd02e5c2e791c25e43745f233111b

Modified Files
--------------
contrib/amcheck/expected/check_btree.out | 23 ++++++++
contrib/amcheck/sql/check_btree.sql      | 21 +++++++
contrib/amcheck/verify_nbtree.c          | 27 +++++++++
src/backend/access/brin/brin.c           | 29 +++++++++-
src/backend/catalog/index.c              | 65 ++++++++++++++++-----
src/backend/commands/cluster.c           | 37 ++++++++----
src/backend/commands/indexcmds.c         | 98 +++++++++++++++++++++++++++-----
src/backend/utils/init/miscinit.c        | 24 +++++---
src/test/regress/expected/privileges.out | 55 ++++++++++++++++++
src/test/regress/sql/privileges.sql      | 47 +++++++++++++++
10 files changed, 378 insertions(+), 48 deletions(-)



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


end of thread, other threads:[~2022-05-09 15:37 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09 15:37 pgsql: Make relation-enumerating operations be security-restricted oper Noah Misch <noah@leadboat.com>
2022-05-09 15:37 pgsql: Make relation-enumerating operations be security-restricted oper Noah Misch <noah@leadboat.com>
2022-05-09 15:37 pgsql: Make relation-enumerating operations be security-restricted oper Noah Misch <noah@leadboat.com>
2022-05-09 15:37 pgsql: Make relation-enumerating operations be security-restricted oper Noah Misch <noah@leadboat.com>
2022-05-09 15:37 pgsql: Make relation-enumerating operations be security-restricted oper Noah Misch <noah@leadboat.com>
2022-05-09 15:37 pgsql: Make relation-enumerating operations be security-restricted oper 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