Re: CVE-2017-7484-induced bugs, or, btree cmp functions are not leakproof?

Amit Langote <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-10-22T14:03:03Z
Lists: pgsql-hackers
On Sat, Jul 14, 2018 at 11:29 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> > ... For
> > partitioning, we can rely on all the columns being inherited, but not
> > for plain inheritance.
>
> Uh, what?

Maybe he meant that partitioning doesn't allow locally defined columns
in children, but plain inheritance does.  Btw, Peter also said this
earlier in the paragraph:

"This could also happen through inheritance, so we should check that as
well, but we need to make sure that the particular column is inherited
and not added locally."

But maybe for the case under question, that's irrelevant, because
we're only interested in access to inherited columns as those are the
only ones that can be accessed in queries via parent.

Thanks,
Amit


Commits

  1. Allow access to child table statistics if user can read parent table.

  2. Mark built-in btree comparison functions as leakproof where it's safe.