Bug 1364001 (CVE-2016-5423)

Summary: CVE-2016-5423 postgresql: CASE/WHEN with inlining can cause untrusted pointer dereference
Product: [Other] Security Response Reporter: Martin Prpič <mprpic>
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, gblomqui, gmccullo, gnaik, gtanzill, hhorak, hhudgeon, jfrey, jhardy, jorton, jprause, obarenbo, praiskup, roliveri, security-response-team, tkasparek, tlestach
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20160811,reported=20160801,source=upstream,cvss2=6.5/AV:N/AC:L/Au:S/C:P/I:P/A:P,cvss3=8.5/CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H,cwe=CWE-822,rhel-5/postgresql=wontfix,rhel-5/postgresql84=wontfix,rhel-6/postgresql=wontfix,rhel-7/postgresql=affected,rhscl-2/postgresql92-postgresql=affected,rhscl-2/rh-postgresql94-postgresql=affected,rhscl-2/rh-postgresql95-postgresql=affected,cfme-5/postgresql=affected,cfme-5/postgresql92-postgresql=affected,rhn_satellite_5.7/postgresql92-postgresql=affected,fedora-all/postgresql=affected
Fixed In Version: postgresql 9.5.4, postgresql 9.4.9, postgresql 9.3.14, postgresql 9.2.18, postgresql 9.1.23 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the way PostgreSQL server handled certain SQL statements containing CASE/WHEN commands. A remote, authenticated attacker could use a specially crafted SQL statement to cause PostgreSQL to crash or disclose a few bytes of server memory or possibly execute arbitrary code.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:57:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1366344, 1367640, 1367704, 1367705, 1367707, 1367708, 1367709, 1367710    
Bug Blocks: 1323912, 1364007    

Description Martin Prpič 2016-08-04 09:05:42 UTC
It was discovered that certain SQL statements containing CASE/WHEN commands could crash the PostgreSQL server, or disclose a few bytes of server memory, potentially leading to arbitrary code execution.

Comment 1 Martin Prpič 2016-08-04 09:05:59 UTC
Acknowledgments:

Name: the PostgreSQL project
Upstream: Heikki Linnakangas

Comment 2 Martin Prpič 2016-08-11 17:25:35 UTC
Public via:

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

Comment 3 Martin Prpič 2016-08-11 17:27:21 UTC
Created postgresql tracking bugs for this issue:

Affects: fedora-all [bug 1366344]

Comment 15 Fedora Update System 2016-08-23 12:49:16 UTC
postgresql-9.5.4-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2016-08-23 15:22:22 UTC
postgresql-9.4.9-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2016-08-27 10:37:44 UTC
postgresql-9.5.4-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 errata-xmlrpc 2016-08-31 05:48:22 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS

Via RHSA-2016:1781 https://rhn.redhat.com/errata/RHSA-2016-1781.html

Comment 20 errata-xmlrpc 2016-09-07 09:54:45 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS

Via RHSA-2016:1821 https://rhn.redhat.com/errata/RHSA-2016-1821.html

Comment 21 errata-xmlrpc 2016-09-07 10:12:54 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS

Via RHSA-2016:1820 https://rhn.redhat.com/errata/RHSA-2016-1820.html

Comment 27 errata-xmlrpc 2016-11-03 21:28:10 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:2606 https://rhn.redhat.com/errata/RHSA-2016-2606.html

Comment 29 errata-xmlrpc 2017-08-07 16:12:28 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