Re: CVE-2017-7484-induced bugs, or, btree cmp functions are not leakproof?
Amit Langote <langote_amit_f8@lab.ntt.co.jp>
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Amit Langote <amitlangote09@gmail.com>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-11-02T08:04:27Z
Lists: pgsql-hackers
Attachments
- 0001-Store-inheritance-root-parent-index-in-otherrel-s-Re.patch (text/plain) patch 0001
- 0002-Use-permissions-granted-on-parent-to-read-stats-on-o.patch (text/plain) patch 0002
On 2018/11/01 20:34, Dilip Kumar wrote: > On Mon, Oct 29, 2018 at 2:53 PM Amit Langote wrote: >> Anyway, why don't we just use the child table's AppendRelInfo to get the >> parent's version of varattno instead of creating a new function? It can >> be done as shown in the attached revised version of the portion of the >> patch changing selfuncs.c. Please take a look. > > +1 Okay, here are two patches: 0001 adds a new RelOptInfo member inh_root_parent that's set for inheritance child otherrels and contains the RT index of the inheritance parent table mentioned in the query from which they originated. 0002 is your patch that modifies examine_variable, etc. to use the permissions granted on parent before reading stats on otherrel inheritance child tables. I've added your name as the author in the 2nd patch. Thanks, Amit
Commits
-
Allow access to child table statistics if user can read parent table.
- 553d2ec2710b 13.0 landed
- 21a4edd1281d 12.2 landed
- 1d9056f563f3 11.7 landed
-
Mark built-in btree comparison functions as leakproof where it's safe.
- 39a96512b3ed 12.0 landed