CVE-2017-12172
PostgreSQL 10.x before 10.1, 9.6.x before 9.6.6, 9.5.x before 9.5.10, 9.4.x before 9.4.15, 9.3.x before 9.3.20, and 9.2.x before 9.2.24 runs under a non-root operating system account, and database superusers have effective ability to run arbitrary code under that system account. PostgreSQL provides a script for starting the database server during system boot. Packages of PostgreSQL for many operating systems provide their own, packager-authored startup implementations. Several implementations use a log file name that the database superuser can replace with a symbolic link. As root, they open(), chmod() and/or chown() this log file name. This often suffices for the database superuser to escalate to root privileges when root starts the server.
What to do
Fixed builds are available from Red Hat: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 16.04 | postgresql-9.5 | Not affected vulnerable_code_not_present | ||
| Ubuntu 14.04 | postgresql-9.1 | Not affected vulnerable_code_not_present | ||
| Red Hat Enterprise Linux 7 | postgresql | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-contrib | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-devel | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-docs | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-libs | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-plperl | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-plpython | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-pltcl | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-server | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-static | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-test | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 7 | postgresql-upgrade | Fixed | 0:9.2.23-3.el7_4 | RHSA-2017:3402 |
| Red Hat Enterprise Linux 6 | postgresql | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | postgresql-contrib | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | postgresql-devel | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | postgresql-docs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | postgresql-libs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | postgresql-plperl | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | postgresql-plpython | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | postgresql-pltcl | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | postgresql-server | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | postgresql-test | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 5 | postgresql | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 5 | postgresql84 | Will not fix Will not fix |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Red Hat, Inc. postgresql: affected: 10.x before 10.1, 9.6.x before 9.6.6, 9.5.x before 9.5.10, 9.4.x before 9.4.15, 9.3.x before 9.3.20, 9.2.x before 9.2.24
Vendor advisories:
- https://access.redhat.com/errata/RHSA-2017:3402 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2017:3403 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2017:3405 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2017:3404 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2017:3402
- http://www.securityfocus.com/bid/101949
- https://access.redhat.com/errata/RHSA-2017:3403
- https://access.redhat.com/errata/RHSA-2017:3405
- https://www.postgresql.org/support/security/
- http://www.securitytracker.com/id/1039752
- https://www.postgresql.org/about/news/1801/
- https://access.redhat.com/errata/RHSA-2017:3404
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.