[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#782409: wheezy-pu: package netcf/0.1.9-2+deb7u2



Package: release.debian.org
Severity: normal
Tags: wheezy
User: release.debian.org@packages.debian.org
Usertags: pu

Hi,

Several users have reported memory leaks in libvirtd, see #709335
which originally was reported against src:libvirt but is a bug in
netcf.

Bugreport in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/netcf/+bug/1201938

Upstream commit:
https://git.fedorahosted.org/cgit/netcf.git/commit/src/drv_debian.c?id=b8a19dc860b38c97c42115d8a559b78853452a4b

Attached is proposed debdiff for the upload to wheezy; could it be
included in the upcoming wheezy point release?

Regards,
Salvatore
diff -Nru netcf-0.1.9/debian/changelog netcf-0.1.9/debian/changelog
--- netcf-0.1.9/debian/changelog	2015-01-15 15:08:08.000000000 +0100
+++ netcf-0.1.9/debian/changelog	2015-04-11 19:28:28.000000000 +0200
@@ -1,3 +1,11 @@
+netcf (0.1.9-2+deb7u2) wheezy; urgency=medium
+
+  * Non-maintainer upload.
+  * Add netcf-debian-memleak.patch.
+    Prevent a memory leak when listing interfaces (Closes: #709335)
+
+ -- Salvatore Bonaccorso <carnil@debian.org>  Sat, 11 Apr 2015 19:19:44 +0200
+
 netcf (0.1.9-2+deb7u1) stable; urgency=medium
 
   * Cherrypick d340f2df to fix ipcalc_netmask.  (Closes: #726127)
diff -Nru netcf-0.1.9/debian/patches/netcf-debian-memleak.patch netcf-0.1.9/debian/patches/netcf-debian-memleak.patch
--- netcf-0.1.9/debian/patches/netcf-debian-memleak.patch	1970-01-01 01:00:00.000000000 +0100
+++ netcf-0.1.9/debian/patches/netcf-debian-memleak.patch	2015-04-11 19:28:28.000000000 +0200
@@ -0,0 +1,37 @@
+Description: Avoid a memory leak when listing interfaces
+ Leak reported via Natanael Copa on IRC when used by libvirt:
+ .
+ ==623== 5,677,056 bytes in 693 blocks are definitely lost in loss record 3,354 of 3,358
+ ==623== at 0x4C1138C: malloc (vg_replace_malloc.c:270)
+ ==623== by 0x5B4A9F3: open_memstream (in /lib/libuClibc-0.9.33.2.so)
+ ==623== by 0x5B485AF: vasprintf (in /lib/libuClibc-0.9.33.2.so)
+ ==623== by 0x10BE7C8B: ???
+ ==623== by 0x10BE7EE2: ???
+ ==623== by 0x10BE8473: ???
+ ==623== by 0x10BE8A53: ???
+ ==623== by 0x109BD755: ???
+ ==623== by 0x109BE47D: ???
+ ==623== by 0x53450EF: virConnectListDefinedInterfaces (in /home/ncopa/aports/main/libvirt/src/libvirt-1.1.1/src/.libs/libvirt.so.0.1001.1)
+ .
+ Even without symbols, the lone call to vasprintf in drv_debian was
+ a pretty blatant leak.
+ .
+ * src/drv_debian.c (interface_deps): Free path when done with it.
+Origin: upstream, https://git.fedorahosted.org/cgit/netcf.git/commit/?id=b8a19dc860b38c97c42115d8a559b78853452a4b
+Bug-Debian: https://bugs.debian.org/709335
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/netcf/+bug/1201938
+Forwarded: not-needed
+Author: Eric Blake <eblake@redhat.com>
+Last-Update: 2015-04-11
+Applied-Upstream: 0.2.4
+
+--- a/src/drv_debian.c
++++ b/src/drv_debian.c
+@@ -138,6 +138,7 @@ static int interface_deps(struct netcf *
+     }
+ 
+     nmatches = aug_match(aug, path, &matches);
++    FREE(path);
+     ERR_COND_BAIL(nmatches < 0, ncf, EOTHER);
+ 
+     if (!nmatches)
diff -Nru netcf-0.1.9/debian/patches/series netcf-0.1.9/debian/patches/series
--- netcf-0.1.9/debian/patches/series	2015-01-15 14:56:26.000000000 +0100
+++ netcf-0.1.9/debian/patches/series	2015-04-11 19:28:28.000000000 +0200
@@ -6,3 +6,4 @@
 0006-drv-debian-ifup-paths.patch
 0007-dont-use-netcf-transaction.patch
 fix_ipcalc_netmask
+netcf-debian-memleak.patch

Reply to: