~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to src/interfaces/libpq/fe-connect.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-02-05 18:13:52 UTC
  • mfrom: (1.1.10) (10.1.5 oneiric-proposed)
  • Revision ID: package-import@ubuntu.com-20130205181352-3kw4f94ilqklzm7c
Tags: 9.1.8-0ubuntu11.10
* New upstream security/bug fix release: (LP: #1116336)
  - Prevent execution of enum_recv from SQL
    The function was misdeclared, allowing a simple SQL command to crash the
    server.  In principle an attacker might be able to use it to examine the
    contents of server memory.  Our thanks to Sumit Soni (via Secunia SVCRP)
    for reporting this issue. (CVE-2013-0255)
  - See HISTORY/changelog.gz for the other bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1259
1259
connectDBStart(PGconn *conn)
1260
1260
{
1261
1261
        int                     portnum;
1262
 
        char            portstr[128];
 
1262
        char            portstr[MAXPGPATH];
1263
1263
        struct addrinfo *addrs = NULL;
1264
1264
        struct addrinfo hint;
1265
1265
        const char *node;
1321
1321
                node = NULL;
1322
1322
                hint.ai_family = AF_UNIX;
1323
1323
                UNIXSOCK_PATH(portstr, portnum, conn->pgunixsocket);
 
1324
                if (strlen(portstr) >= UNIXSOCK_PATH_BUFLEN)
 
1325
                {
 
1326
                        appendPQExpBuffer(&conn->errorMessage,
 
1327
                                                          libpq_gettext("Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"),
 
1328
                                                                                        portstr,
 
1329
                                                                                        (int) (UNIXSOCK_PATH_BUFLEN - 1));
 
1330
                        conn->options_valid = false;
 
1331
                        goto connect_errReturn;
 
1332
                }
1324
1333
#else
1325
1334
                /* Without Unix sockets, default to localhost instead */
1326
1335
                node = DefaultHost;