-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                        ESB-2007.0138 -- [Solaris]
        Two Security Vulnerabilities in PostgreSQL May Allow Denial
                     of Service or Information Leakage
                               1 March 2007

===========================================================================

        AusCERT Security Bulletin Summary
        ---------------------------------

Product:              PostgreSQL
Publisher:            Sun Microsystems
Operating System:     Solaris 10
Impact:               Read-only Data Access
                      Denial of Service
Access:               Existing Account
CVE Names:            CVE-2007-0556 CVE-2007-0555

Ref:                  ESB-2007.0079

Original Bulletin:    
  http://sunsolve.sun.com/search/printfriendly.do?assetkey=1-26-102825-1

Revision History:     March  8 2007: Sun has released patches
                      March  1 2007: Initial Release

- --------------------------BEGIN INCLUDED TEXT--------------------

Sun(sm) Alert Notification
     * Sun Alert ID: 102825
     * Synopsis: Two Security Vulnerabilities in PostgreSQL May Allow
       Denial of Service or Information Leakage
     * Category: Security
     * Product: Solaris 10 Operating System
     * BugIDs: 6520656
     * Avoidance: Patch, Workaround
     * State: Resolved
     * Date Released: 27-Feb-2007, 05-Mar-2007
     * Date Closed: 05-Mar-2007
     * Date Modified: 05-Mar-2007

1. Impact

   Two security vulnerabilities in the PostgreSQL database server (see
   postgres(1)) may allow local or remote PostgreSQL users the ability to
   cause the PostgreSQL server to crash or access restricted database
   content.

   The ability to crash the PostgreSQL server is a type of Denial of
   Service (DoS).

   These issues are described in the following documents:
     * CVE-2007-0555:
       http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0555
     * CVE-2007-0556:
       http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0556
     * PostgreSQL Security Information:
       http://www.postgresql.org/support/security

2. Contributing Factors

   These issues can occur in the following releases:

   SPARC Platform
     * Solaris 10 without patch 123590-03

   x86 Platform
     * Solaris 10 without patch 123591-03

   Note 1: Solaris 8 and Solaris 9 do not ship with PostgreSQL and are
   thus not impacted by this issue.

   Note 2: CVE-2007-0555 affects PostgreSQL versions 7.3 before 7.3.13,
   7.4 before 7.4.16, 8.0 before 8.0.11, 8.1 before 8.1.7, and 8.2 before
   8.2.2. CVE-2007-0556 affects PostgreSQL versions 8.0 before 8.0.11,
   8.1 before 8.1.7, and 8.2 before 8.2.2.

   Note 3: Any user exploiting these vulnerabilities must have an account
   on the SQL server and additional permissions to create or alter
   objects in the database/schema is necessary for CVE-2007-0555. These
   permissions are available by default to all such users.

   Note 4: Solaris 10 6/06 was the first release of Solaris to ship
   PostgreSQL and it included version 8.1.3. The patches in the
   "Resolution" section below update PostgreSQL to version 8.1.8.

   To determine the version of PostgreSQL on the system, the following
   command can be run:
    $ /usr/bin/postgres --version
    postgres (PostgreSQL) 8.1.3


3. Symptoms

   If the described issue occurs, The PostgreSQL server process may exit
   unexpectedly with the following messages in the log file:
    LOG:  server process (PID 2917) was terminated by signal 11
    LOG:  terminating any other active server processes
    FATAL:  the database system is in recovery mode
    LOG:  all server processes terminated; reinitializing
    LOG:  database system was interrupted at 2007-02-09 08:56:28 CET

   The log file is stored in the "data" directory by default. The
   following stack trace is indicative of this issue:
    feb3458b memcpy   (2a, 0, 8) + 1b
    08119bb7 postquel_execute (83ac8d8, 8046abc, 83ac418, 83129e0) + 7f
    08119cf8 fmgr_sql (8046abc) + 91
    08114f96 ExecMakeFunctionResult (83abd20, 83abc98, 83ac2a8, 83ac300) + 134
    0811574e ExecEvalFunc (83abd20, 83abc98, 83ac2a8, 83ac300) + 31
    08117e0a ExecTargetList (83ac178, 83abc98, 83ac298, 83ac2a8, 83ac300, 8046d
80) + 6b
    081180a8 ExecProject (83ac2b8, 8046d80) + 59
    0811fce0 ExecResult (83abc10) + 9c
    08113eae ExecProcNode (83abc10) + 162
    081129bf ExecutePlan (83abb00, 83abc10, 1, 0, 1, 8355470) + 83
    08111fe5 ExecutorRun (83a8fe8, 1, 0) + 53
    081852d9 PortalRunSelect (83a6fb8, 1, 0, 8355470) + 177
    081850a1 PortalRun (83a6fb8, 7fffffff, 8355470, 8355470, 80470d8) + 2dc
    0818187c exec_simple_query (8354e88) + 285
    08184179 PostgresMain (4, 82f4a38, 82f4a08) + eee
    0816393f BackendRun (830cb10, 830cb10, 1, 45cc292c, 8047d74, 81618db) + 4bd
    08163271 BackendStartup (830cb10) + 4b
    081618db ServerLoop (313c1, 82f0708, 3, 82f8b48, 3, febb07a7) + 12f
    081611b7 PostmasterMain (3, 82f0708) + 9c3
    0812c3c5 main     (3, 8047de0, 8047df0) + 1e5
    0807ef7a ???????? (3, 8047ea0, 8047fe1, 8047fe1, 0, 8047ec5) 

4. Relief/Workaround

   To work around the issue described in CVE-2007-0555, remove
   permissions to create or alter objects in the database schema to all
   users by using the following command:
    REVOKE CREATE ON SCHEMA public FROM PUBLIC CASCADE;

   Note: All users have this permission on public schema by default.

   For more information about REVOKE command see:
   http://www.postgresql.org/docs/8.1/interactive/sql-revoke.html

   There is no workaround for the issue described in CVE-2007-0556.
   Please see the "Resolution" section below.

5. Resolution

   This issue is addressed in the following releases:

   SPARC Platform
     * Solaris 10 with patch 123590-03 or later

   x86 Platform
     * Solaris 10 with patch 123591-03 or later

Change History

   05-Mar-2007:
     * State: Resolved
     * Updated Contributing Factors and Relief/Workaround sections

   This Sun Alert notification is being provided to you on an "AS IS"
   basis. This Sun Alert notification may contain information provided by
   third parties. The issues described in this Sun Alert notification may
   or may not impact your system(s). Sun makes no representations,
   warranties, or guarantees as to the information contained herein. ANY
   AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
   WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
   NON-INFRINGEMENT, ARE HEREBY DISCLAIMED. BY ACCESSING THIS DOCUMENT
   YOU ACKNOWLEDGE THAT SUN SHALL IN NO EVENT BE LIABLE FOR ANY DIRECT,
   INDIRECT, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES THAT ARISE
   OUT OF YOUR USE OR FAILURE TO USE THE INFORMATION CONTAINED HEREIN.
   This Sun Alert notification contains Sun proprietary and confidential
   information. It is being provided to you pursuant to the provisions of
   your agreement to purchase services from Sun, or, if you do not have
   such an agreement, the Sun.com Terms of Use. This Sun Alert
   notification may only be used for the purposes contemplated by these
   agreements.

   Copyright 2000-2006 Sun Microsystems, Inc., 4150 Network Circle, Santa
   Clara, CA 95054 U.S.A. All rights reserved

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

        http://www.auscert.org.au/render.html?cid=1980

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
===========================================================================

-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQCVAwUBRe+PpSh9+71yA2DNAQLwRgQAlxtsHKawcwSdUxji5bffvBiDE5Rf84Vj
kIlbMCeHlqEspEiaZNUh5YUlulmw8ujbky6VKyDXWeovi/MkQvsd7e/pPfLjpW6y
DCrRNNZCdyO7XRETXdDyqoXhQ5/OWpdjRkfgsNq1l/FWjmHjH8buuM/w6w+rYUl2
an4Yqjok/ZA=
=Qnbr
-----END PGP SIGNATURE-----