Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 793734 (CVE-2021-32027, CVE-2021-32028) - <dev-db/postgresql-{9.6.22, 10.17, 11.12, 12.7, 13.3}: Multiple vulnerabilities (CVE-2021-{32027,32028} )
Summary: <dev-db/postgresql-{9.6.22, 10.17, 11.12, 12.7, 13.3}: Multiple vulnerabiliti...
Status: IN_PROGRESS
Alias: CVE-2021-32027, CVE-2021-32028
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL: https://www.postgresql.org/support/se...
Whiteboard: B2 [glsa?]
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-01 17:00 UTC by Sam James
Modified: 2021-11-18 15:16 UTC (History)
1 user (show)

See Also:
Package list:
dev-db/postgresql-13.3 dev-db/postgresql-12.7 dev-db/postgresql-11.12 dev-db/postgresql-10.17 dev-db/postgresql-9.6.22 app-eselect/eselect-postgresql-2.4 hppa
Runtime testing required: ---
nattka: sanity-check-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester gentoo-dev Security 2021-06-01 17:00:58 UTC
Description:
"A flaw was found in postgresql in versions before 13.3, before 12.7, before 11.12, before 10.17 and before 9.6.22. While modifying certain SQL array values, missing bounds checks let authenticated database users write arbitrary bytes to a wide area of server memory. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability."
Comment 1 Sam James archtester gentoo-dev Security 2021-06-01 17:01:21 UTC
Please tell us when ready to stable.
Comment 2 Aaron W. Swenson gentoo-dev 2021-06-18 15:47:41 UTC
Please stabilize the following targets:
=dev-db/postgresql-13.3  ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86
=dev-db/postgresql-12.7  ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86
=dev-db/postgresql-11.12  ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86
=dev-db/postgresql-10.17  ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86
=dev-db/postgresql-9.6.22  ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86


To test:
for p in postgresql-{9.6.22,10.17,11.12,12.7,13.3}.ebuild; do
  USE="-server" ebuild ${p} install
  ebuild ${p} clean
  USE="server" FEATURES="userpriv test" LC_ALL="C" ebuild ${p} install
  ebuild ${p} clean
done

LC_ALL needn't be set to C. However, there are ICU-related tests that will fail if the LC_CTYPE and LC_COLLATE locales differ.
Comment 3 NATTkA bot gentoo-dev 2021-06-19 18:56:25 UTC Comment hidden (obsolete)
Comment 4 NATTkA bot gentoo-dev 2021-06-19 21:08:41 UTC Comment hidden (obsolete)
Comment 5 Sam James archtester gentoo-dev Security 2021-06-19 23:50:28 UTC
amd64 done
Comment 6 Sam James archtester gentoo-dev Security 2021-06-19 23:51:34 UTC
x86 done
Comment 7 Sam James archtester gentoo-dev Security 2021-06-19 23:53:29 UTC
ppc done
Comment 8 Sam James archtester gentoo-dev Security 2021-06-19 23:53:37 UTC
ppc64 done
Comment 9 Agostino Sarubbo gentoo-dev 2021-06-20 07:52:20 UTC
sparc stable
Comment 10 Rolf Eike Beer archtester 2021-06-20 16:19:05 UTC
hppa done
Comment 11 Sam James archtester gentoo-dev Security 2021-06-21 07:18:55 UTC
arm done
Comment 12 Sam James archtester gentoo-dev Security 2021-06-21 19:04:00 UTC
arm64 done

all arches done
Comment 13 John Helmert III gentoo-dev Security 2021-06-21 19:11:46 UTC
Please cleanup
Comment 14 Larry the Git Cow gentoo-dev 2021-07-06 00:47:11 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b1dcbf064c86ec88ebd364e90ab61379aa9e208

commit 3b1dcbf064c86ec88ebd364e90ab61379aa9e208
Author:     Aaron W. Swenson <titanofold@gentoo.org>
AuthorDate: 2021-07-05 11:49:08 +0000
Commit:     Aaron W. Swenson <titanofold@gentoo.org>
CommitDate: 2021-07-06 00:46:27 +0000

    dev-db/postgresql: Cleanup
    
    Bug: https://bugs.gentoo.org/793734
    Signed-off-by: Aaron W. Swenson <titanofold@gentoo.org>

 dev-db/postgresql/Manifest                 |   5 -
 dev-db/postgresql/postgresql-10.16.ebuild  | 458 ---------------------------
 dev-db/postgresql/postgresql-11.11.ebuild  | 455 ---------------------------
 dev-db/postgresql/postgresql-12.6.ebuild   | 455 ---------------------------
 dev-db/postgresql/postgresql-13.2.ebuild   | 459 ---------------------------
 dev-db/postgresql/postgresql-9.6.21.ebuild | 478 -----------------------------
 6 files changed, 2310 deletions(-)
Comment 15 NATTkA bot gentoo-dev 2021-07-25 01:00:24 UTC Comment hidden (obsolete)
Comment 16 Sam James archtester gentoo-dev Security 2021-10-13 02:30:48 UTC
CVE-2021-32028

Memory disclosure in INSERT ... ON CONFLICT ... DO UPDATE

Using an INSERT ... ON CONFLICT ... DO UPDATE command on a purpose-crafted table, an attacker can read arbitrary bytes of server memory. In the default configuration, any authenticated database user can create prerequisite objects and complete this attack at will. A user lacking the CREATE and TEMPORARY privileges on all databases and the CREATE privilege on all schemas cannot use this attack at will.

The PostgreSQL project thanks Andres Freund for reporting this problem.
Comment 17 NATTkA bot gentoo-dev 2021-11-18 15:16:44 UTC
Unable to check for sanity:

> no match for package: dev-db/postgresql-13.3