pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: CVE-2017-7484-induced bugs, or, btree cmp functions are not leakproof?
Date: Thu, 05 Sep 2019 11:53:31 -0400
Message-ID: <26899.1567698811@sss.pgh.pa.us> (raw )
In-Reply-To: <CA+HiwqGSu_TmJApx25TQiNLYS_MPBwwQd29mH63c0srYcgwXwA@mail.gmail.com >
References: <3876.1531261875@sss.pgh.pa.us >
<11560.1531349520@sss.pgh.pa.us >
<3ad75dc5-4ae7-087a-f2f8-b3bd92a8b2b0@2ndquadrant.com >
<1029.1531578563@sss.pgh.pa.us >
<CA+HiwqE+YMtM8RZtEGxS6yC8HFqEmZUrx4D-Gn=Xmn0gZRtCQQ@mail.gmail.com >
<83025.1540217851@sss.pgh.pa.us >
<CAFiTN-vY8tjKaKnebjZA_EfhpQe0KB__zGkOQGfA2r9n3o6Owg@mail.gmail.com >
<de957e5b-faa0-6fb9-c0ab-0b389d71cf5a@lab.ntt.co.jp >
<CAFiTN-smxd2R-oxoA465EOtWUjfiP73Cwn4SWbPCB_0F84qJUw@mail.gmail.com >
<CAFiTN-sLoLyouXbsmrmaTHwymXN9ThY-JmGHCEJSa6iuP3FPCQ@mail.gmail.com >
<be766794-eb16-b798-52ec-1f786b26b61b@lab.ntt.co.jp >
<CAFiTN-sK9kVQdRDX0J2_FHevgVocBostNhyg+uZNN2QCc0va_A@mail.gmail.com >
<01981f9d-b875-9ef7-5a86-1371c6c531db@lab.ntt.co.jp >
<CAFiTN-uyyW54V5TP-p15VhLwCrAOscoyYx0UxMCr5110RocjGg@mail.gmail.com >
<CAFiTN-sWVz9JXuzLSjnASvR1WPvyEOpqWcjafLpdHODGwYO9sg@mail.gmail.com >
<CA+HiwqEvB-JELhjPgwFNDq2hPEfTFUjUOsvJyf0S50vOLm2mAA@mail.gmail.com >
<CAFiTN-tSCDi7RwNYyR2RwYnPYbRWfyZL55KqDQdtR3JS2ycHdA@mail.gmail.com >
<CA+HiwqHaqL! DEF=X+b2zznSzkjBX4dsiER4QciEFjNh51Ls5irA@mail.gmail.com >
<14123.1567554785@sss.pgh.pa.us >
<CA+HiwqHBrFqP8w8L_sa09b0u3x7v6prSR8GwDaGu5r78L=yrWQ@mail.gmail.com >
<CAFiTN-s-DJC-Jp3URJwWPq45A527WtwyLw3tXZvAeX_+0=HmGQ@mail.gmail.com >
<CA+HiwqGSu_TmJApx25TQiNLYS_MPBwwQd29mH63c0srYcgwXwA@mail.gmail.com >
Amit Langote <amitlangote09@gmail.com> writes:
> On Thu, Sep 5, 2019 at 6:18 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:
>> Instead of falling back to the child, isn't it make more sense to
>> check the permissions on the parent upto which we could translate (it
>> may not be the root parent)?
> Hmm, in that case, the parent up to which we might be able to
> translate would still be a child and might have different permissions
> than the table mentioned in the query (what's being called "root" in
> this context). Would it be worth further complicating this code if
> that's the case?
I think that checking intermediate levels would be an actively bad idea
--- it would make the behavior too confusing. We should preferably check
the table actually named in the query, or if we can't then check the
table we are using the stats of; nothing else.
Another idea that we should consider, though, is to allow the access if
*either* of those two tables allows it. The main reason that that's
attractive is that it's certain not to break any case that works today.
But also, it would mean that in many practical cases we'd not have to
try to map Vars back up to the original parent, thus avoiding the
performance penalty. (That is, check the target table as we do now,
and only if we find it lacks permissions do we start mapping back.)
regards, tom lane
view thread (37+ messages) latest in thread
Message-ID: <26899.1567698811@sss.pgh.pa.us>
Permalink: ../26899.1567698811@sss.pgh.pa.us/
Also on: postgresql.org/message-id/26899.1567698811@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, amitlangote09@gmail.com, dilipbalaut@gmail.com, Langote_Amit_f8@lab.ntt.co.jp, peter.eisentraut@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
Subject: Re: CVE-2017-7484-induced bugs, or, btree cmp functions are not leakproof?
In-Reply-To: <26899.1567698811@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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