Bug 1448078 (CVE-2017-7484)

Summary: CVE-2017-7484 postgresql: Selectivity estimators bypass SELECT privilege checks
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bkearney, cpelland, dajohnso, databases-maint, devrim, gblomqui, gmccullo, gtanzill, hhorak, hhudgeon, jfrey, jhardy, jmlich83, jorton, jprause, jstanek, meissner, mike, obarenbo, pkubat, praiskup, roliveri, security-response-team, simaishi, tgl, thomas, tlestach
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: postgresql 9.2.21, postgresql 9.3.17, postgresql 9.4.12, postgresql 9.5.7, postgresql 9.6.3 Doc Type: If docs needed, set a value
Doc Text:
It was found that some selectivity estimation functions did not check user privileges before providing information from pg_statistic, possibly leaking information. A non-administrative database user could use this flaw to steal some information from tables they are otherwise not allowed to access.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 03:11:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1449699, 1449700, 1449701, 1449702, 1449703, 1449704, 1449705, 1449706, 1450115, 1450116, 1450117, 1469544, 1469545    
Bug Blocks: 1415638, 1448091    

Description Adam Mariš 2017-05-04 13:34:13 UTC
PostgreSQL maintains column statistics for tables. Certain statistics, such as histograms and lists of most common values, contain values taken from the column. PostgreSQL does not check privileges before consulting those statistics during query planning; an attacker can exploit this to view the most common values of arbitrary columns.

Comment 1 Adam Mariš 2017-05-04 13:34:31 UTC
Acknowledgments:

Name: the PostgreSQL project
Upstream: Robert Haas

Comment 2 Cedric Buissart 2017-05-09 14:21:44 UTC
Upstream set of patches : 
* Add security checks to selectivity estimation functions
https://github.com/postgres/postgres/commit/e2d4ef8de
* Fix possibly-uninitialized variable.
https://github.com/postgres/postgres/commit/b6576e59
* Further patch rangetypes_selfuncs.c's statistics slot management.
https://github.com/postgres/postgres/commit/da075960

Comment 4 Adam Mariš 2017-05-11 14:37:23 UTC
External References:

https://www.postgresql.org/about/news/1746/

Comment 5 Adam Mariš 2017-05-11 14:46:53 UTC
Created mingw-postgresql tracking bugs for this issue:

Affects: epel-7 [bug 1450116]
Affects: fedora-all [bug 1450117]


Created postgresql tracking bugs for this issue:

Affects: fedora-all [bug 1450115]

Comment 8 errata-xmlrpc 2017-07-05 05:45:13 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS

Via RHSA-2017:1677 https://access.redhat.com/errata/RHSA-2017:1677

Comment 9 errata-xmlrpc 2017-07-05 05:55:13 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS

Via RHSA-2017:1678 https://access.redhat.com/errata/RHSA-2017:1678

Comment 11 errata-xmlrpc 2017-07-31 15:52:43 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 5.8
  Red Hat Satellite 5.8 ELS

Via RHSA-2017:1838 https://access.redhat.com/errata/RHSA-2017:1838

Comment 12 errata-xmlrpc 2017-08-01 20:45:26 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:1983 https://access.redhat.com/errata/RHSA-2017:1983

Comment 13 errata-xmlrpc 2017-08-07 16:12:49 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 5.7

Via RHSA-2017:2425 https://access.redhat.com/errata/RHSA-2017:2425