CVE-2015-3165
NoneCVSS
—
EPSS
8.4%
Published
May 28, 2015
CISA due date
—
Cloudanix analysis
A flaw in older PostgreSQL database software lets remote attackers crash the server by closing a secure connection at exactly the wrong moment, causing outages until the database is restarted.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- Network Service
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Double-free condition in PostgreSQL SSL session shutdown logic when an authentication timeout expires during connection closure, resulting in memory corruption that crashes the server process.
Why it matters to the business
Remote attackers can cause PostgreSQL database instances to crash, leading to unplanned downtime, loss of availability for applications relying on the database, and potential data inconsistency during recovery.
How an attack unfolds
An unauthenticated remote attacker initiates an SSL connection to a PostgreSQL server, allows the authentication timeout to near expiration, then abruptly closes the SSL session in a manner that triggers the double-free during shutdown sequence, crashing the backend.
How to fix it
Upgrade PostgreSQL to 9.0.20 or later, 9.1.16 or later, 9.2.11 or later, 9.3.7 or later, or 9.4.2 or later depending on the installed branch; apply vendor-supplied patches for affected operating system packages; disable SSL if not required and restart services.
How to confirm the fix worked
Verify PostgreSQL version is at or above the fixed releases listed in the advisory; review server logs for absence of crash signatures related to SSL shutdown; test connectivity with SSL sessions under simulated authentication timeout conditions.
Typical attack path
- Establish SSL connection to PostgreSQL listener
- Delay or manipulate authentication phase to approach timeout window
- Close SSL session during the critical shutdown sequence
- Trigger double-free and resulting crash
How to detect it
Review PostgreSQL server logs for repeated backend crashes during SSL connection shutdowns or authentication timeout events; correlate with network logs showing short-lived SSL handshakes; examine core dumps or memory error logs for double-free indicators if available.
What your security team should do
- Immediately inventory all PostgreSQL deployments and prioritize upgrades for internet-facing or high-value instances
- Apply the minimum required patched versions for each branch
- Monitor for new EPSS increases or exploit code publication given the 11-year disclosure window
- Implement network segmentation and authentication hardening to reduce exposure window
The record
Double free vulnerability in PostgreSQL before 9.0.20, 9.1.x before 9.1.16, 9.2.x before 9.2.11, 9.3.x before 9.3.7, and 9.4.x before 9.4.2 allows remote attackers to cause a denial of service (crash) by closing an SSL session at a time when the authentication timeout will expire during the session shutdown sequence.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:6.0 | postgresql-8.4 | 0 | 8.4.22lts2-0+deb6u2 |
| Debian:7 | postgresql-9.1 | 0 | 9.1.16-0+deb7u1 |
| Debian:8 | postgresql-9.1 | 0 | 9.1.16-0+deb8u1 |
| Debian:8 | postgresql-9.4 | 0 | 9.4.2-0+deb8u1 |
| Mageia:4 | postgresql9.0 | 0 | 9.0.22-1.mga4 |
| Mageia:4 | postgresql9.1 | 0 | 9.1.18-1.mga4 |
| Mageia:4 | postgresql9.2 | 0 | 9.2.13-1.mga4 |
| Mageia:4 | postgresql9.3 | 0 | 9.3.9-1.mga4 |
| Red Hat:enterprise_linux:6::client | postgresql | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::client | postgresql-contrib | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::client | postgresql-debuginfo | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::client | postgresql-devel | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::client | postgresql-docs | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::client | postgresql-libs | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::client | postgresql-plperl | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::client | postgresql-plpython | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::client | postgresql-pltcl | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::client | postgresql-server | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::client | postgresql-test | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql-contrib | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql-debuginfo | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql-devel | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql-docs | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql-libs | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql-plperl | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql-plpython | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql-pltcl | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql-server | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::computenode | postgresql-test | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql-contrib | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql-debuginfo | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql-devel | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql-docs | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql-libs | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql-plperl | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql-plpython | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql-pltcl | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql-server | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::server | postgresql-test | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql-contrib | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql-debuginfo | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql-devel | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql-docs | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql-libs | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql-plperl | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql-plpython | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql-pltcl | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql-server | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:6::workstation | postgresql-test | 0 | 0:8.4.20-3.el6_6 |
| Red Hat:enterprise_linux:7::client | postgresql | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-contrib | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-debuginfo | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-devel | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-docs | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-libs | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-plperl | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-plpython | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-pltcl | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-server | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-test | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::client | postgresql-upgrade | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-contrib | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-debuginfo | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-devel | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-docs | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-libs | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-plperl | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-plpython | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-pltcl | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-server | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-test | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::computenode | postgresql-upgrade | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::server | postgresql | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-contrib | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-debuginfo | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-devel | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-docs | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-libs | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-plperl | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-plpython | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-pltcl | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-server | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-test | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::server | postgresql-upgrade | 0 | 0:9.2.13-1.ael7b_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-contrib | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-debuginfo | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-devel | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-docs | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-libs | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-plperl | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-plpython | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-pltcl | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-server | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-test | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:enterprise_linux:7::workstation | postgresql-upgrade | 0 | 0:9.2.13-1.el7_1 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-contrib | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-debuginfo | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-devel | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-docs | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-libs | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-plperl | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-plpython | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-pltcl | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-server | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-test | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | postgresql92-postgresql-upgrade | 0 | 0:9.2.13-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-contrib | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-debuginfo | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-devel | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-docs | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-libs | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-plperl | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-plpython | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-pltcl | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-server | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-test | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el6 | rh-postgresql94-postgresql-upgrade | 0 | 0:9.4.4-1.el6 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-contrib | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-debuginfo | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-devel | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-docs | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-libs | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-plperl | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-plpython | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-pltcl | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-server | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-test | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | postgresql92-postgresql-upgrade | 0 | 0:9.2.13-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-contrib | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-debuginfo | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-devel | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-docs | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-libs | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-plperl | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-plpython | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-pltcl | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-server | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-test | 0 | 0:9.4.4-1.el7 |
| Red Hat:rhel_software_collections:2::el7 | rh-postgresql94-postgresql-upgrade | 0 | 0:9.4.4-1.el7 |
| SUSE:Linux Enterprise Desktop 12 | postgresql93 | 0 | 9.3.8-8.1 |
| SUSE:Linux Enterprise Desktop 12 | postgresql93-libs | 0 | 9.3.8-8.1 |
| SUSE:Linux Enterprise Server 12 | postgresql93 | 0 | 9.3.8-8.1 |
| SUSE:Linux Enterprise Server 12 | postgresql93-libs | 0 | 9.3.8-8.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | postgresql93 | 0 | 9.3.8-8.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | postgresql93-libs | 0 | 9.3.8-8.1 |
| SUSE:Linux Enterprise Software Development Kit 12 | postgresql93-libs | 0 | 9.3.8-8.1 |
| Ubuntu:14.04:LTS | postgresql-9.1 | 0 | 9.1.16-0ubuntu0.14.04 |
| Ubuntu:14.04:LTS | postgresql-9.3 | 0 | 9.3.7-0ubuntu0.14.04 |
| openSUSE:Tumbleweed | postgresql93 | 0 | 9.3.15-1.1 |
| openSUSE:Tumbleweed | postgresql94 | 0 | 9.4.10-1.1 |
| openSUSE:Tumbleweed | postgresql95 | 0 | 9.5.4-1.2 |
Related vulnerabilities
- CVE-2014-8161 PostgreSQL before 9.0.19, 9.1.x before 9.1.15, 9.2.x before 9.2.10, 9.3.x before 9.3.6… Also affects postgresql-8.4
- CVE-2015-5288 The crypt function in contrib/pgcrypto in PostgreSQL before 9.0.23, 9.1.x before 9.1.19… Also affects postgresql-8.4
- CVE-2017-7546 PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to… Also affects postgresql-9.1
- CVE-2016-5423 PostgreSQL before 9.1.23, 9.2.x before 9.2.18, 9.3.x before 9.3.14, 9.4.x before 9.4.9… Also affects postgresql-9.1
- CVE-2016-0766 PostgreSQL before 9.1.20, 9.2.x before 9.2.15, 9.3.x before 9.3.11, 9.4.x before 9.4.6… Also affects postgresql-9.1
- CVE-2013-1899 Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9… Also affects postgresql-9.1
- CVE-2017-15098 Invalid json_populate_recordset or jsonb_populate_recordset function calls in PostgreSQL… Also affects postgresql-9.4