diff -Nru pgbouncer-1.4.2/debian/changelog pgbouncer-1.4.2/debian/changelog --- pgbouncer-1.4.2/debian/changelog 2011-12-03 11:04:25.000000000 +0700 +++ pgbouncer-1.4.2/debian/changelog 2012-12-04 22:25:03.000000000 +0700 @@ -1,3 +1,13 @@ +pgbouncer (1.4.2-2ubuntu0.1) precise-security; urgency=low + + * SECURITY UPDATE: denial of service when too long db name is provided + (LP: #1083414) + - debian/patches/2-CVE-2012-4575.patch: objects.c(add_database): fail + gracefully if too long db name. Based on upstream patch. + - CVE-2012-4575 + + -- Christian Kuersteiner Tue, 04 Dec 2012 22:21:56 +0700 + pgbouncer (1.4.2-2build1) precise; urgency=low * No-change rebuild to drop spurious libsfgcc1 dependency on armhf. diff -Nru pgbouncer-1.4.2/debian/control pgbouncer-1.4.2/debian/control --- pgbouncer-1.4.2/debian/control 2011-04-12 18:52:02.000000000 +0700 +++ pgbouncer-1.4.2/debian/control 2012-12-04 22:48:02.000000000 +0700 @@ -1,5 +1,6 @@ Source: pgbouncer -Maintainer: Christoph Berg +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Christoph Berg Uploaders: Bernd Zeimetz , Peter Eisentraut Section: database Priority: optional diff -Nru pgbouncer-1.4.2/debian/patches/2-CVE-2012-4575.patch pgbouncer-1.4.2/debian/patches/2-CVE-2012-4575.patch --- pgbouncer-1.4.2/debian/patches/2-CVE-2012-4575.patch 1970-01-01 07:00:00.000000000 +0700 +++ pgbouncer-1.4.2/debian/patches/2-CVE-2012-4575.patch 2012-12-06 12:10:31.000000000 +0700 @@ -0,0 +1,21 @@ +## Description: fix for denial of service when too long db name is provided +## Origin/Author: ckuerste@gmx.ch +## Bug: http://git.postgresql.org/gitweb/?p=pgbouncer.git;a=commitdiff;h=4b92112b820830b30cd7bc91bef3dd8f35305525 +## Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pgbouncer/+bug/1083414 +Index: pgbouncer-1.4.2/src/objects.c +=================================================================== +--- pgbouncer-1.4.2.orig/src/objects.c 2011-03-30 05:49:12.000000000 +0700 ++++ pgbouncer-1.4.2/src/objects.c 2012-12-04 22:20:27.887892760 +0700 +@@ -303,7 +303,11 @@ + return NULL; + + list_init(&db->head); +- safe_strcpy(db->name, name, sizeof(db->name)); ++ if (strlcpy(db->name, name, sizeof(db->name)) >= sizeof(db->name)) { ++ log_warning("Too long db name: %s", name); ++ slab_free(db_cache, db); ++ return NULL; ++ } + put_in_order(&db->head, &database_list, cmp_database); + } + diff -Nru pgbouncer-1.4.2/debian/patches/series pgbouncer-1.4.2/debian/patches/series --- pgbouncer-1.4.2/debian/patches/series 2011-04-12 19:00:57.000000000 +0700 +++ pgbouncer-1.4.2/debian/patches/series 2012-12-04 22:18:15.000000000 +0700 @@ -1 +1,2 @@ debian-config +2-CVE-2012-4575.patch