<?xml version="1.0" encoding="utf-8"?>
<cvrfdoc xmlns="http://www.icasi.org/CVRF/schema/cvrf/1.1" xmlns:cvrf="http://www.icasi.org/CVRF/schema/cvrf/1.1">
  <DocumentTitle xml:lang="en">Red Hat Security Advisory: postgresql and postgresql84 security update</DocumentTitle>
  <DocumentType>Security Advisory</DocumentType>
  <DocumentPublisher Type="Vendor">
    <ContactDetails>secalert@redhat.com</ContactDetails>
    <IssuingAuthority>Red Hat Security Response Team</IssuingAuthority>
  </DocumentPublisher>
  <DocumentTracking>
    <Identification><ID>RHSA-2012:0678</ID></Identification>
    <Status>Final</Status>
    <Version>1</Version>
    <RevisionHistory>
       <Revision>
         <Number>1</Number>
         <Date>2012-05-21T14:04:00Z</Date>
         <Description>Current version</Description>
       </Revision>
    </RevisionHistory>
    <InitialReleaseDate>2012-05-21T14:04:00Z</InitialReleaseDate>
    <CurrentReleaseDate>2012-05-21T14:04:00Z</CurrentReleaseDate>
    <Generator>
      <Engine>Red Hat rhsa-to-cvrf 1.0.1484</Engine>
      <Date>2012-05-21T15:09:01Z</Date>
    </Generator>
  </DocumentTracking>
  <DocumentNotes>
    <Note Title="Topic" Type="Summary" Ordinal="1" xml:lang="en">
Updated postgresql84 and postgresql packages that fix three security issues
are now available for Red Hat Enterprise Linux 5 and 6 respectively.

The Red Hat Security Response Team has rated this update as having moderate
security impact. Common Vulnerability Scoring System (CVSS) base scores,
which give detailed severity ratings, are available for each vulnerability
from the CVE links in the References section.    </Note>
    <Note Title="Details" Type="General" Ordinal="2" xml:lang="en">
PostgreSQL is an advanced object-relational database management system
(DBMS).

The pg_dump utility inserted object names literally into comments in the
SQL script it produces. An unprivileged database user could create an
object whose name includes a newline followed by an SQL command. This SQL
command might then be executed by a privileged user during later restore of
the backup dump, allowing privilege escalation. (CVE-2012-0868)

When configured to do SSL certificate verification, PostgreSQL only checked
the first 31 characters of the certificate's Common Name field. Depending
on the configuration, this could allow an attacker to impersonate a server
or a client using a certificate from a trusted Certificate Authority issued
for a different name. (CVE-2012-0867)

CREATE TRIGGER did not do a permissions check on the trigger function to
be called. This could possibly allow an authenticated database user to
call a privileged trigger function on data of their choosing.
(CVE-2012-0866)

These updated packages upgrade PostgreSQL to version 8.4.11, which fixes
these issues as well as several data-corruption issues and lesser
non-security issues. Refer to the PostgreSQL Release Notes for a full list
of changes:

http://www.postgresql.org/docs/8.4/static/release.html

All PostgreSQL users are advised to upgrade to these updated packages,
which correct these issues. If the postgresql service is running, it will
be automatically restarted after installing this update.    </Note>
    <Note Title="Terms of Use" Ordinal="3" Type="Legal Disclaimer" xml:lang="en">Please see https://www.redhat.com/footer/terms-of-use.html</Note>
  </DocumentNotes>
  <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
  <AggregateSeverity Namespace="https://access.redhat.com/security/updates/classification/">Moderate</AggregateSeverity>
  <DocumentReferences>
    <Reference Type="Self">
       <URL>https://rhn.redhat.com/errata/RHSA-2012-0678.html</URL>
       <Description>https://rhn.redhat.com/errata/RHSA-2012-0678.html</Description>
    </Reference>
    <Reference>
       <URL>https://access.redhat.com/security/updates/classification/#moderate</URL>
       <Description>https://access.redhat.com/security/updates/classification/#moderate</Description>
    </Reference>
    <Reference>
       <URL>http://www.postgresql.org/docs/8.4/static/release.html</URL>
       <Description>http://www.postgresql.org/docs/8.4/static/release.html</Description>
    </Reference>
  </DocumentReferences>
  <ProductTree xmlns="http://www.icasi.org/CVRF/schema/prod/1.1">
    <Branch Type="Product Family" Name="Red Hat Enterprise Linux">
      <Branch Type="Product Name" Name="Red Hat Enterprise Linux Desktop (v. 5 client)">
        <FullProductName ProductID="5Client-5.8.Z">Red Hat Enterprise Linux Desktop (v. 5 client)</FullProductName>
      </Branch>
      <Branch Type="Product Name" Name="Red Hat Enterprise Linux HPC Node (v. 6)">
        <FullProductName ProductID="6ComputeNode-6.2.z">Red Hat Enterprise Linux HPC Node (v. 6)</FullProductName>
      </Branch>
      <Branch Type="Product Name" Name="Red Hat Enterprise Linux Desktop (v. 6)">
        <FullProductName ProductID="6Client-6.2.z">Red Hat Enterprise Linux Desktop (v. 6)</FullProductName>
      </Branch>
      <Branch Type="Product Name" Name="Red Hat Enterprise Linux HPC Node Optional (v. 6)">
        <FullProductName ProductID="6ComputeNode-optional-6.2.z">Red Hat Enterprise Linux HPC Node Optional (v. 6)</FullProductName>
      </Branch>
      <Branch Type="Product Name" Name="Red Hat Enterprise Linux Server (v. 6)">
        <FullProductName ProductID="6Server-6.2.z">Red Hat Enterprise Linux Server (v. 6)</FullProductName>
      </Branch>
      <Branch Type="Product Name" Name="Red Hat Enterprise Linux Workstation (v. 6)">
        <FullProductName ProductID="6Workstation-6.2.z">Red Hat Enterprise Linux Workstation (v. 6)</FullProductName>
      </Branch>
      <Branch Type="Product Name" Name="Red Hat Enterprise Linux Desktop Optional (v. 6)">
        <FullProductName ProductID="6Client-optional-6.2.z">Red Hat Enterprise Linux Desktop Optional (v. 6)</FullProductName>
      </Branch>
      <Branch Type="Product Name" Name="Red Hat Enterprise Linux (v. 5 server)">
        <FullProductName ProductID="5Server-5.8.Z">Red Hat Enterprise Linux (v. 5 server)</FullProductName>
      </Branch>
      <Branch Type="Product Name" Name="RHEL Desktop Workstation (v. 5 client)">
        <FullProductName ProductID="5Client-Workstation-5.8.Z">RHEL Desktop Workstation (v. 5 client)</FullProductName>
      </Branch>
    </Branch>
    <Branch Type="Product Version" Name="postgresql-8.4.11-1.el6_2">
      <FullProductName ProductID="postgresql-8.4.11-1.el6_2">postgresql-8.4.11-1.el6_2.src.rpm</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="postgresql84-8.4.11-1.el5_8">
      <FullProductName ProductID="postgresql84-8.4.11-1.el5_8">postgresql84-8.4.11-1.el5_8.src.rpm</FullProductName>
    </Branch>
    <Relationship ProductReference="postgresql84-8.4.11-1.el5_8" RelationType="Default Component Of" RelatesToProductReference="5Client-5.8.Z">
      <FullProductName ProductID="5Client-5.8.Z:postgresql84-8.4.11-1.el5_8">postgresql84-8.4.11-1.el5_8 as a component of Red Hat Enterprise Linux Desktop (v. 5 client)</FullProductName>
    </Relationship>
    <Relationship ProductReference="postgresql-8.4.11-1.el6_2" RelationType="Default Component Of" RelatesToProductReference="6ComputeNode-6.2.z">
      <FullProductName ProductID="6ComputeNode-6.2.z:postgresql-8.4.11-1.el6_2">postgresql-8.4.11-1.el6_2 as a component of Red Hat Enterprise Linux HPC Node (v. 6)</FullProductName>
    </Relationship>
    <Relationship ProductReference="postgresql-8.4.11-1.el6_2" RelationType="Default Component Of" RelatesToProductReference="6Client-6.2.z">
      <FullProductName ProductID="6Client-6.2.z:postgresql-8.4.11-1.el6_2">postgresql-8.4.11-1.el6_2 as a component of Red Hat Enterprise Linux Desktop (v. 6)</FullProductName>
    </Relationship>
    <Relationship ProductReference="postgresql-8.4.11-1.el6_2" RelationType="Default Component Of" RelatesToProductReference="6ComputeNode-optional-6.2.z">
      <FullProductName ProductID="6ComputeNode-optional-6.2.z:postgresql-8.4.11-1.el6_2">postgresql-8.4.11-1.el6_2 as a component of Red Hat Enterprise Linux HPC Node Optional (v. 6)</FullProductName>
    </Relationship>
    <Relationship ProductReference="postgresql-8.4.11-1.el6_2" RelationType="Default Component Of" RelatesToProductReference="6Server-6.2.z">
      <FullProductName ProductID="6Server-6.2.z:postgresql-8.4.11-1.el6_2">postgresql-8.4.11-1.el6_2 as a component of Red Hat Enterprise Linux Server (v. 6)</FullProductName>
    </Relationship>
    <Relationship ProductReference="postgresql-8.4.11-1.el6_2" RelationType="Default Component Of" RelatesToProductReference="6Workstation-6.2.z">
      <FullProductName ProductID="6Workstation-6.2.z:postgresql-8.4.11-1.el6_2">postgresql-8.4.11-1.el6_2 as a component of Red Hat Enterprise Linux Workstation (v. 6)</FullProductName>
    </Relationship>
    <Relationship ProductReference="postgresql-8.4.11-1.el6_2" RelationType="Default Component Of" RelatesToProductReference="6Client-optional-6.2.z">
      <FullProductName ProductID="6Client-optional-6.2.z:postgresql-8.4.11-1.el6_2">postgresql-8.4.11-1.el6_2 as a component of Red Hat Enterprise Linux Desktop Optional (v. 6)</FullProductName>
    </Relationship>
    <Relationship ProductReference="postgresql84-8.4.11-1.el5_8" RelationType="Default Component Of" RelatesToProductReference="5Server-5.8.Z">
      <FullProductName ProductID="5Server-5.8.Z:postgresql84-8.4.11-1.el5_8">postgresql84-8.4.11-1.el5_8 as a component of Red Hat Enterprise Linux (v. 5 server)</FullProductName>
    </Relationship>
    <Relationship ProductReference="postgresql84-8.4.11-1.el5_8" RelationType="Default Component Of" RelatesToProductReference="5Client-Workstation-5.8.Z">
      <FullProductName ProductID="5Client-Workstation-5.8.Z:postgresql84-8.4.11-1.el5_8">postgresql84-8.4.11-1.el5_8 as a component of RHEL Desktop Workstation (v. 5 client)</FullProductName>
    </Relationship>
  </ProductTree>

  <Vulnerability Ordinal="1" xmlns="http://www.icasi.org/CVRF/schema/vuln/1.1">
    <Notes><Note Title="Vulnerability Description" Type="General" Ordinal="1" xml:lang="en">CREATE TRIGGER did not do a permissions check on the trigger function to be called. This could possibly allow an authenticated database user to call a privileged trigger function on data of their choosing. </Note></Notes>
    <DiscoveryDate>2012-02-20T00:00:00Z</DiscoveryDate>
    <ReleaseDate>2012-02-27T00:00:00Z</ReleaseDate>
    <Involvements><Involvement Party="Vendor" Status="Completed"></Involvement></Involvements>
    <CVE>CVE-2012-0866</CVE>
    <ProductStatuses><Status Type="Fixed">
      <ProductID>5Client-5.8.Z:postgresql84-8.4.11-1.el5_8</ProductID>
      <ProductID>5Client-Workstation-5.8.Z:postgresql84-8.4.11-1.el5_8</ProductID>
      <ProductID>5Server-5.8.Z:postgresql84-8.4.11-1.el5_8</ProductID>
      <ProductID>6Client-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6Client-optional-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6ComputeNode-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6ComputeNode-optional-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6Server-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6Workstation-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
    </Status></ProductStatuses>
    <Threats><Threat Type="Impact"><Description>Low</Description></Threat></Threats>
    <CVSSScoreSets><ScoreSet>
      <BaseScore>5.2</BaseScore>
      <Vector>AV:A/AC:L/Au:S/C:P/I:P/A:P</Vector>
    </ScoreSet></CVSSScoreSets>
    <Remediations>
      <Remediation Type="Vendor Fix"><Description xml:lang="en">
Before applying this update, make sure all previously-released errata
relevant to your system have been applied.

This update is available via the Red Hat Network. Details on how to
use the Red Hat Network to apply this update are available at
https://access.redhat.com/knowledge/articles/11258    </Description>      <URL>https://rhn.redhat.com/errata/RHSA-2012-0678.html</URL></Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.redhat.com/security/data/cve/CVE-2012-0866.html</URL>
        <Description>CVE-2012-0866</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.redhat.com/show_bug.cgi?id=797222</URL>
        <Description>bz#797222: CVE-2012-0866 postgresql: Absent permission checks on trigger function to be called when creating a trigger</Description>
      </Reference>
    </References>
  </Vulnerability>

  <Vulnerability Ordinal="2" xmlns="http://www.icasi.org/CVRF/schema/vuln/1.1">
    <Notes><Note Title="Vulnerability Description" Type="General" Ordinal="1" xml:lang="en">When configured to do SSL certificate verification, PostgreSQL only checked the first 31 characters of the certificate's Common Name field. Depending on the configuration, this could allow an attacker to impersonate a server or a client using a certificate from a trusted Certificate Authority issued for a different name. </Note></Notes>
    <DiscoveryDate>2012-02-20T00:00:00Z</DiscoveryDate>
    <ReleaseDate>2012-02-27T00:00:00Z</ReleaseDate>
    <Involvements><Involvement Party="Vendor" Status="Completed"></Involvement></Involvements>
    <CVE>CVE-2012-0867</CVE>
    <ProductStatuses><Status Type="Fixed">
      <ProductID>5Client-5.8.Z:postgresql84-8.4.11-1.el5_8</ProductID>
      <ProductID>5Client-Workstation-5.8.Z:postgresql84-8.4.11-1.el5_8</ProductID>
      <ProductID>5Server-5.8.Z:postgresql84-8.4.11-1.el5_8</ProductID>
      <ProductID>6Client-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6Client-optional-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6ComputeNode-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6ComputeNode-optional-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6Server-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6Workstation-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
    </Status></ProductStatuses>
    <Threats><Threat Type="Impact"><Description>Low</Description></Threat></Threats>
    <CVSSScoreSets><ScoreSet>
      <BaseScore>3.6</BaseScore>
      <Vector>AV:N/AC:H/Au:S/C:P/I:P/A:N</Vector>
    </ScoreSet></CVSSScoreSets>
    <Remediations>
      <Remediation Type="Vendor Fix"><Description xml:lang="en">
Before applying this update, make sure all previously-released errata
relevant to your system have been applied.

This update is available via the Red Hat Network. Details on how to
use the Red Hat Network to apply this update are available at
https://access.redhat.com/knowledge/articles/11258    </Description>      <URL>https://rhn.redhat.com/errata/RHSA-2012-0678.html</URL></Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.redhat.com/security/data/cve/CVE-2012-0867.html</URL>
        <Description>CVE-2012-0867</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.redhat.com/show_bug.cgi?id=797915</URL>
        <Description>bz#797915: CVE-2012-0867 postgresql: MITM due improper x509_v3 CN validation during certificate verification</Description>
      </Reference>
    </References>
  </Vulnerability>

  <Vulnerability Ordinal="3" xmlns="http://www.icasi.org/CVRF/schema/vuln/1.1">
    <Notes><Note Title="Vulnerability Description" Type="General" Ordinal="1" xml:lang="en">The pg_dump utility inserted object names literally into comments in the SQL script it produces. An unprivileged database user could create an object whose name includes a newline followed by an SQL command. This SQL command might then be executed by a privileged user during later restore of the backup dump, allowing privilege escalation. </Note></Notes>
    <DiscoveryDate>2012-02-20T00:00:00Z</DiscoveryDate>
    <ReleaseDate>2012-02-27T00:00:00Z</ReleaseDate>
    <Involvements><Involvement Party="Vendor" Status="Completed"></Involvement></Involvements>
    <CVE>CVE-2012-0868</CVE>
    <ProductStatuses><Status Type="Fixed">
      <ProductID>5Client-5.8.Z:postgresql84-8.4.11-1.el5_8</ProductID>
      <ProductID>5Client-Workstation-5.8.Z:postgresql84-8.4.11-1.el5_8</ProductID>
      <ProductID>5Server-5.8.Z:postgresql84-8.4.11-1.el5_8</ProductID>
      <ProductID>6Client-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6Client-optional-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6ComputeNode-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6ComputeNode-optional-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6Server-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
      <ProductID>6Workstation-6.2.z:postgresql-8.4.11-1.el6_2</ProductID>
    </Status></ProductStatuses>
    <Threats><Threat Type="Impact"><Description>Moderate</Description></Threat></Threats>
    <CVSSScoreSets><ScoreSet>
      <BaseScore>2.3</BaseScore>
      <Vector>AV:A/AC:M/Au:S/C:N/I:P/A:N</Vector>
    </ScoreSet></CVSSScoreSets>
    <Remediations>
      <Remediation Type="Vendor Fix"><Description xml:lang="en">
Before applying this update, make sure all previously-released errata
relevant to your system have been applied.

This update is available via the Red Hat Network. Details on how to
use the Red Hat Network to apply this update are available at
https://access.redhat.com/knowledge/articles/11258    </Description>      <URL>https://rhn.redhat.com/errata/RHSA-2012-0678.html</URL></Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.redhat.com/security/data/cve/CVE-2012-0868.html</URL>
        <Description>CVE-2012-0868</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.redhat.com/show_bug.cgi?id=797917</URL>
        <Description>bz#797917: CVE-2012-0868 postgresql: SQL injection due unsanitized newline characters in object names</Description>
      </Reference>
    </References>
  </Vulnerability>
</cvrfdoc>
