pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpg-migrator - pg_migrator: Fix for typo in install that used "exe" for
7+ messages / 3 participants
[nested] [flat]
* pg-migrator - pg_migrator: Fix for typo in install that used "exe" for
@ 2009-06-18 12:57 User Bmomjian <bmomjian@pgfoundry.org>
0 siblings, 0 replies; 7+ messages in thread
From: bmomjian@pgfoundry.org @ 2009-06-18 12:57 UTC (permalink / raw)
To: pgsql-committers
Log Message:
-----------
Fix for typo in install that used "exe" for Unix, per Hiroshi.
Modified Files:
--------------
pg_migrator:
INSTALL (r1.30 -> r1.31)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pg-migrator/pg_migrator/INSTALL?r1=1.30&r2=1.31)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow converting a table to a view if row security is present
@ 2015-07-28 23:25 Joe Conway <mail@joeconway.com>
0 siblings, 0 replies; 7+ messages in thread
From: Joe Conway @ 2015-07-28 23:25 UTC (permalink / raw)
To: pgsql-committers
Disallow converting a table to a view if row security is present.
When DefineQueryRewrite() is about to convert a table to a view, it checks
the table for features unavailable to views. For example, it rejects tables
having triggers. It omits to reject tables having relrowsecurity or a
pg_policy record. Fix that. To faciliate the repair, invent
relation_has_policies() which indicates the presence of policies on a
relation even when row security is disabled for that relation.
Reported by Noah Misch. Patch by me, review by Stephen Frost. Back-patch
to 9.5 where RLS was introduced.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/d824e2800f66f6180189d973c720611855c6f619
Modified Files
--------------
src/backend/commands/policy.c | 29 +++++++++++++++++++++++++++++
src/backend/rewrite/rewriteDefine.c | 24 +++++++++++++++++++-----
src/include/commands/policy.h | 1 +
src/test/regress/expected/rowsecurity.out | 23 +++++++++++++++++++++++
src/test/regress/sql/rowsecurity.sql | 25 +++++++++++++++++++++++++
5 files changed, 97 insertions(+), 5 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow converting a table to a view if row security is present
@ 2015-07-28 23:25 Joe Conway <mail@joeconway.com>
0 siblings, 0 replies; 7+ messages in thread
From: Joe Conway @ 2015-07-28 23:25 UTC (permalink / raw)
To: pgsql-committers
Disallow converting a table to a view if row security is present.
When DefineQueryRewrite() is about to convert a table to a view, it checks
the table for features unavailable to views. For example, it rejects tables
having triggers. It omits to reject tables having relrowsecurity or a
pg_policy record. Fix that. To faciliate the repair, invent
relation_has_policies() which indicates the presence of policies on a
relation even when row security is disabled for that relation.
Reported by Noah Misch. Patch by me, review by Stephen Frost. Back-patch
to 9.5 where RLS was introduced.
Branch
------
REL9_5_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/344703bcc453ac3ce0060785d4958ddec7d2dbe9
Modified Files
--------------
src/backend/commands/policy.c | 29 +++++++++++++++++++++++++++++
src/backend/rewrite/rewriteDefine.c | 24 +++++++++++++++++++-----
src/include/commands/policy.h | 1 +
src/test/regress/expected/rowsecurity.out | 23 +++++++++++++++++++++++
src/test/regress/sql/rowsecurity.sql | 25 +++++++++++++++++++++++++
5 files changed, 97 insertions(+), 5 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow converting a table to a view within an outer SQL comman
@ 2024-04-30 19:23 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 7+ messages in thread
From: Tom Lane @ 2024-04-30 19:23 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Disallow converting a table to a view within an outer SQL command.
We have long disallowed all forms of ALTER TABLE if the table is
already opened by some outer SQL command in the same session.
This has the same purpose as obtaining AccessExclusiveLock, but
since a session's own locks don't conflict the lock only blocks use
of the table by other sessions, not our own. Without this check,
the ALTER might confuse the outer SQL command since any previous
inspection of the table would potentially become invalid.
However, the RelisBecomingView code path in DefineQueryRewrite never
got that memo, and assumed that AccessExclusiveLock is sufficient
for performing something morally equivalent to a rather invasive
ALTER TABLE. Unsurprisingly, this can confuse an outer command
that is trying to do something with the table.
This was submitted as a security issue, but the security team
has been unable to identify any consequence worse than a null
pointer dereference (from trying to access rd_tableam methods
that the relation no longer has). Therefore, in accordance
with our usual policy, it's not security material and should
just be fixed as a routine bug.
Fix by disallowing the operation if the table is open locally,
exactly as ALTER TABLE does it.
Per an anonymous security researcher, via Bundesamt für Sicherheit
in der Informationstechnik.
Patch v12-v15 only. In v16 and later, we removed this code
altogether (cf. commit b23cd185f), so that there's no issue.
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/1ee22d1e87b3c442928abe9535d6b2bf8460fc67
Modified Files
--------------
src/backend/rewrite/rewriteDefine.c | 6 ++++++
1 file changed, 6 insertions(+)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow converting a table to a view within an outer SQL comman
@ 2024-04-30 19:23 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 7+ messages in thread
From: Tom Lane @ 2024-04-30 19:23 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Disallow converting a table to a view within an outer SQL command.
We have long disallowed all forms of ALTER TABLE if the table is
already opened by some outer SQL command in the same session.
This has the same purpose as obtaining AccessExclusiveLock, but
since a session's own locks don't conflict the lock only blocks use
of the table by other sessions, not our own. Without this check,
the ALTER might confuse the outer SQL command since any previous
inspection of the table would potentially become invalid.
However, the RelisBecomingView code path in DefineQueryRewrite never
got that memo, and assumed that AccessExclusiveLock is sufficient
for performing something morally equivalent to a rather invasive
ALTER TABLE. Unsurprisingly, this can confuse an outer command
that is trying to do something with the table.
This was submitted as a security issue, but the security team
has been unable to identify any consequence worse than a null
pointer dereference (from trying to access rd_tableam methods
that the relation no longer has). Therefore, in accordance
with our usual policy, it's not security material and should
just be fixed as a routine bug.
Fix by disallowing the operation if the table is open locally,
exactly as ALTER TABLE does it.
Per an anonymous security researcher, via Bundesamt für Sicherheit
in der Informationstechnik.
Patch v12-v15 only. In v16 and later, we removed this code
altogether (cf. commit b23cd185f), so that there's no issue.
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/56d30fb10d5ce5e2d8b432eeaca8ecf2fc2a6900
Modified Files
--------------
src/backend/rewrite/rewriteDefine.c | 6 ++++++
1 file changed, 6 insertions(+)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow converting a table to a view within an outer SQL comman
@ 2024-04-30 19:23 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 7+ messages in thread
From: Tom Lane @ 2024-04-30 19:23 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Disallow converting a table to a view within an outer SQL command.
We have long disallowed all forms of ALTER TABLE if the table is
already opened by some outer SQL command in the same session.
This has the same purpose as obtaining AccessExclusiveLock, but
since a session's own locks don't conflict the lock only blocks use
of the table by other sessions, not our own. Without this check,
the ALTER might confuse the outer SQL command since any previous
inspection of the table would potentially become invalid.
However, the RelisBecomingView code path in DefineQueryRewrite never
got that memo, and assumed that AccessExclusiveLock is sufficient
for performing something morally equivalent to a rather invasive
ALTER TABLE. Unsurprisingly, this can confuse an outer command
that is trying to do something with the table.
This was submitted as a security issue, but the security team
has been unable to identify any consequence worse than a null
pointer dereference (from trying to access rd_tableam methods
that the relation no longer has). Therefore, in accordance
with our usual policy, it's not security material and should
just be fixed as a routine bug.
Fix by disallowing the operation if the table is open locally,
exactly as ALTER TABLE does it.
Per an anonymous security researcher, via Bundesamt für Sicherheit
in der Informationstechnik.
Patch v12-v15 only. In v16 and later, we removed this code
altogether (cf. commit b23cd185f), so that there's no issue.
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/51189f98a9fc88a63ae6a9635da8adb427f9958c
Modified Files
--------------
src/backend/rewrite/rewriteDefine.c | 6 ++++++
1 file changed, 6 insertions(+)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Disallow converting a table to a view within an outer SQL comman
@ 2024-04-30 19:23 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 7+ messages in thread
From: Tom Lane @ 2024-04-30 19:23 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Disallow converting a table to a view within an outer SQL command.
We have long disallowed all forms of ALTER TABLE if the table is
already opened by some outer SQL command in the same session.
This has the same purpose as obtaining AccessExclusiveLock, but
since a session's own locks don't conflict the lock only blocks use
of the table by other sessions, not our own. Without this check,
the ALTER might confuse the outer SQL command since any previous
inspection of the table would potentially become invalid.
However, the RelisBecomingView code path in DefineQueryRewrite never
got that memo, and assumed that AccessExclusiveLock is sufficient
for performing something morally equivalent to a rather invasive
ALTER TABLE. Unsurprisingly, this can confuse an outer command
that is trying to do something with the table.
This was submitted as a security issue, but the security team
has been unable to identify any consequence worse than a null
pointer dereference (from trying to access rd_tableam methods
that the relation no longer has). Therefore, in accordance
with our usual policy, it's not security material and should
just be fixed as a routine bug.
Fix by disallowing the operation if the table is open locally,
exactly as ALTER TABLE does it.
Per an anonymous security researcher, via Bundesamt für Sicherheit
in der Informationstechnik.
Patch v12-v15 only. In v16 and later, we removed this code
altogether (cf. commit b23cd185f), so that there's no issue.
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/bf379b555c06034bcd1be384cc145d8264213f41
Modified Files
--------------
src/backend/rewrite/rewriteDefine.c | 6 ++++++
1 file changed, 6 insertions(+)
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2024-04-30 19:23 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-06-18 12:57 pg-migrator - pg_migrator: Fix for typo in install that used "exe" for User Bmomjian <bmomjian@pgfoundry.org>
2015-07-28 23:25 pgsql: Disallow converting a table to a view if row security is present Joe Conway <mail@joeconway.com>
2015-07-28 23:25 pgsql: Disallow converting a table to a view if row security is present Joe Conway <mail@joeconway.com>
2024-04-30 19:23 pgsql: Disallow converting a table to a view within an outer SQL comman Tom Lane <tgl@sss.pgh.pa.us>
2024-04-30 19:23 pgsql: Disallow converting a table to a view within an outer SQL comman Tom Lane <tgl@sss.pgh.pa.us>
2024-04-30 19:23 pgsql: Disallow converting a table to a view within an outer SQL comman Tom Lane <tgl@sss.pgh.pa.us>
2024-04-30 19:23 pgsql: Disallow converting a table to a view within an outer SQL comman Tom Lane <tgl@sss.pgh.pa.us>
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