Bug 1798852 (CVE-2020-1720)

Summary: CVE-2020-1720 postgresql: ALTER ... DEPENDS ON EXTENSION is missing authorization checks
Product: [Other] Security Response Reporter: Dhananjay Arunesh <darunesh>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: akoufoud, alazarot, almorale, anon.amish, anstephe, asakala, bkearney, databases-maint, dblechte, devrim, dfediuck, eedri, etirelli, gsuckevi, hhorak, ibek, jmlich83, jorton, jstanek, jstastny, krathod, kverlaen, mgoldboi, michal.skrivanek, mike, mnovotny, panovotn, paradhya, pjindal, pkajaba, pkubat, praiskup, rrajasek, rsynek, sbonazzo, sdaley, security-response-team, sherold, sisharma, tgl, tlestach, yturgema
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: PostgreSQL 12.2, PostgreSQL 11.7, PostgreSQL 10.12, PostgreSQL 9.6.17 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in PostgreSQL's "ALTER ... DEPENDS ON EXTENSION", where sub-commands did not perform authorization checks. An authenticated attacker could use this flaw in certain configurations to perform drop objects such as function, triggers, et al., leading to database corruption.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-26 16:32:33 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: 1812456, 1812457, 1812459, 1812460, 1812461, 1812462, 1812464, 1812465, 1812466, 1812467, 1812468, 1812469, 1813839, 1814512, 1873482, 1873542, 1875800, 1881771, 1881778, 1887756, 1909708, 1909709, 1909720, 1909726    
Bug Blocks: 1798853    

Description Dhananjay Arunesh 2020-02-06 07:01:47 UTC
The ALTER ... DEPENDS ON EXTENSION sub-commands do not perform authorization checks. If one of the following prerequisites holds, an unprivileged user can exploit this to drop any function, procedure, materialized view, index, or trigger. The attack is possible if an administrator has installed an extension that unprivileged users can CREATE. The attack is also possible if an extension owner issues DROP EXTENSION predictably or can be convinced to issue DROP EXTENSION.

Comment 2 Cedric Buissart 2020-03-11 11:52:02 UTC
PosgreSQL versions 9.5 and older are not affected by this issue beacuse they did not support the `ALTER THING .. DEPENDS ON EXTENSION` feature, which appeared in version 9.6.0.

Comment 3 Cedric Buissart 2020-03-11 11:53:37 UTC
Created mingw-postgresql tracking bugs for this issue:

Affects: fedora-all [bug 1812456]


Created postgresql tracking bugs for this issue:

Affects: fedora-all [bug 1812457]


Created postgresql:10/postgresql tracking bugs for this issue:

Affects: fedora-all [bug 1812460]


Created postgresql:11/postgresql tracking bugs for this issue:

Affects: fedora-all [bug 1812461]


Created postgresql:12/postgresql tracking bugs for this issue:

Affects: fedora-all [bug 1812462]


Created postgresql:9.6/postgresql tracking bugs for this issue:

Affects: fedora-all [bug 1812459]

Comment 4 Cedric Buissart 2020-03-11 11:56:07 UTC
Upstream fix (master branch) : https://github.com/postgres/postgres/commit/b048f558dd7c26a0c630a2cff29d3d8981eaf6b9

Comment 8 errata-xmlrpc 2020-03-26 12:28:04 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

Via RHSA-2020:0980 https://access.redhat.com/errata/RHSA-2020:0980

Comment 9 Product Security DevOps Team 2020-03-26 16:32:33 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-1720

Comment 11 errata-xmlrpc 2020-09-08 09:49:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:3669 https://access.redhat.com/errata/RHSA-2020:3669

Comment 18 errata-xmlrpc 2020-10-21 13:06:50 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7

Via RHSA-2020:4295 https://access.redhat.com/errata/RHSA-2020:4295

Comment 26 errata-xmlrpc 2020-11-16 12:09:14 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS

Via RHSA-2020:5112 https://access.redhat.com/errata/RHSA-2020:5112

Comment 28 errata-xmlrpc 2020-12-17 15:52:52 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:5619 https://access.redhat.com/errata/RHSA-2020:5619

Comment 29 errata-xmlrpc 2020-12-17 15:58:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:5620 https://access.redhat.com/errata/RHSA-2020:5620

Comment 30 errata-xmlrpc 2020-12-22 08:53:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.0 Update Services for SAP Solutions

Via RHSA-2020:5661 https://access.redhat.com/errata/RHSA-2020:5661

Comment 31 errata-xmlrpc 2020-12-22 09:26:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.0 Update Services for SAP Solutions

Via RHSA-2020:5664 https://access.redhat.com/errata/RHSA-2020:5664

Comment 32 errata-xmlrpc 2021-01-18 09:58:15 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2021:0163 https://access.redhat.com/errata/RHSA-2021:0163

Comment 33 errata-xmlrpc 2021-01-18 10:00:40 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2021:0164 https://access.redhat.com/errata/RHSA-2021:0164

Comment 34 errata-xmlrpc 2021-01-18 16:19:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

Via RHSA-2021:0166 https://access.redhat.com/errata/RHSA-2021:0166

Comment 35 errata-xmlrpc 2021-01-18 16:20:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

Via RHSA-2021:0167 https://access.redhat.com/errata/RHSA-2021:0167