[Pkg-net-snmp-devel] Bug#531056: leaks memory when vlan subinterfaces present

John Morrissey jwm at horde.net
Sun May 31 23:28:51 UTC 2009


On Sun, May 31, 2009 at 09:03:23AM +0200, Thomas Anders wrote:
> John Morrissey wrote:
> > Just tried this; snmpd does *not* leak when kernel IPv6 support is
> > absent.
> 
> Thanks for your great help so far. Do you also have a chance to test
> upstream's 5.4.x SVN and/or SVN trunk (with IPv6 support enabled again)?

5.4.x svn didn't leak. Found the upstream commit that fixed this; a debdiff
is attached.

john
-- 
John Morrissey          _o            /\         ----  __o
jwm at horde.net        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__
-------------- next part --------------
diff -u net-snmp-5.4.1~dfsg/debian/changelog net-snmp-5.4.1~dfsg/debian/changelog
--- net-snmp-5.4.1~dfsg/debian/changelog
+++ net-snmp-5.4.1~dfsg/debian/changelog
@@ -1,3 +1,11 @@
+net-snmp (5.4.1~dfsg-13) unstable; urgency=low
+
+  * Fix memory leak when multiple interfaces have the same IPv6 address,
+    such as link-local addresses when VLAN subinterfaces are in use.
+    (Closes: #531056)
+
+ -- John Morrissey <jwm at horde.net>  Sun, 31 May 2009 23:07:32 +0000
+
 net-snmp (5.4.1~dfsg-12) unstable; urgency=high
 
   * Urgency high because of RC bug fix.
only in patch2:
unchanged:
--- net-snmp-5.4.1~dfsg.orig/debian/patches/56_fix_ipv6_memleak.patch
+++ net-snmp-5.4.1~dfsg/debian/patches/56_fix_ipv6_memleak.patch
@@ -0,0 +1,17 @@
+Index: agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
+===================================================================
+--- agent/mibgroup/ip-mib/data_access/ipaddress_linux.c	(revision 17254)
++++ agent/mibgroup/ip-mib/data_access/ipaddress_linux.c	(revision 17255)
+@@ -325,7 +325,11 @@
+         /*
+          * add entry to container
+          */
+-        CONTAINER_INSERT(container, entry);
++        if (CONTAINER_INSERT(container, entry) < 0) {
++            DEBUGMSGTL(("access:ipaddress:container","error with ipaddress_entry: insert into container failed.\n"));
++            netsnmp_access_ipaddress_entry_free(entry);
++            continue;
++        }
+     }
+ 
+     fclose(in);
only in patch2:
unchanged:
--- net-snmp-5.4.1~dfsg.orig/debian/patches/56_fix_ipv6_memleak.README
+++ net-snmp-5.4.1~dfsg/debian/patches/56_fix_ipv6_memleak.README
@@ -0,0 +1,2 @@
+Upstream Changeset 17255: CHANGES: snmpd: fix memory leak when multiple
+interfaces have the same IPv6 address


More information about the Pkg-net-snmp-devel mailing list