From b5fd226d96c7d302944aed782e92c952dda207d0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 12 2016 07:34:53 +0000 Subject: import net-snmp-5.7.2-24.el7_2.1 --- diff --git a/SOURCES/net-snmp-5.7.2-dot3-leak.patch b/SOURCES/net-snmp-5.7.2-dot3-leak.patch new file mode 100644 index 0000000..b0ce315 --- /dev/null +++ b/SOURCES/net-snmp-5.7.2-dot3-leak.patch @@ -0,0 +1,23 @@ +1305933 - snmpd leaks memory in ether like-mib implementation + +commit ed4e48b5fab165d1ba4c431e31e543f808a2c25f +Author: Jan Safranek +Date: Wed Feb 10 14:00:12 2016 +0100 + + CHANGES: snmpd: fixed memory leak in ETHERLIKE-MIB. + + ke->name in stdup-ed at line 297: + n->name = strdup(RTA_DATA(tb[IFLA_IFNAME])); + +diff --git a/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c b/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c +index b110950..a884bb3 100644 +--- a/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c ++++ b/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c +@@ -463,6 +463,7 @@ _dot3Stats_netlink_get_errorcntrs(dot3StatsTable_rowreq_ctx *rowreq_ctx, const c + done = 1; + } + kern_db = ke->next; ++ free(ke->name); + free(ke); + } + diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec index ed6a59b..f3f00bb 100644 --- a/SPECS/net-snmp.spec +++ b/SPECS/net-snmp.spec @@ -11,7 +11,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: 5.7.2 -Release: 24%{?dist} +Release: 24%{?dist}.1 Epoch: 1 License: BSD @@ -88,6 +88,7 @@ Patch51: net-snmp-5.7.2-hrFSTable-read-write.patch Patch52: net-snmp-5.5-sensors-duplicate.patch Patch53: net-snmp-5.7.2-extend-close.patch Patch54: net-snmp-5.7.2-python-addr-size.patch +Patch55: net-snmp-5.7.2-dot3-leak.patch Requires(post): chkconfig Requires(preun): chkconfig @@ -294,6 +295,7 @@ The net-snmp-sysvinit package provides SysV init scripts for Net-SNMP daemons. %patch52 -p1 -b .sensors-duplicate %patch53 -p1 -b .extend-close %patch54 -p1 -b .python-addr-size +%patch55 -p1 -b .dot3-leak %ifarch sparc64 s390 s390x # disable failing test - see https://bugzilla.redhat.com/show_bug.cgi?id=680697 @@ -589,6 +591,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_initrddir}/snmptrapd %changelog +* Fri Mar 18 2016 Jan Safranek - 1:5.7.2-24.1 +- Fixed memory leak in ETHERLIKE-MIB (#1305933) + * Tue Aug 18 2015 Jan Safranek - 1:5.7.2-24 - Fixed lmSensorsTable not reporting sensors with duplicate names (#1252053)