From fac030b387e58fc49946be470c01fb45140db865 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Feb 23 2022 14:22:40 +0000 Subject: import net-snmp-5.8-25.el8 --- diff --git a/SOURCES/net-snmp-5.8-deleted-iface.patch b/SOURCES/net-snmp-5.8-deleted-iface.patch new file mode 100644 index 0000000..166bf66 --- /dev/null +++ b/SOURCES/net-snmp-5.8-deleted-iface.patch @@ -0,0 +1,41 @@ +diff -up net-snmp-5.8/agent/mibgroup/if-mib/data_access/interface_linux.c.original net-snmp-5.8/agent/mibgroup/if-mib/data_access/interface_linux.c +--- net-snmp-5.8/agent/mibgroup/if-mib/data_access/interface_linux.c.original 2022-02-02 15:06:29.382119898 +0900 ++++ net-snmp-5.8/agent/mibgroup/if-mib/data_access/interface_linux.c 2022-02-02 15:15:39.298280447 +0900 +@@ -600,7 +600,6 @@ netsnmp_arch_interface_container_load(ne + { + FILE *devin; + char line[256]; +- netsnmp_interface_entry *entry = NULL; + static char scan_expected = 0; + int fd; + #ifdef NETSNMP_ENABLE_IPV6 +@@ -669,6 +668,7 @@ netsnmp_arch_interface_container_load(ne + * and retrieve (or create) the corresponding data structure. + */ + while (fgets(line, sizeof(line), devin)) { ++ netsnmp_interface_entry *entry = NULL; + char *stats, *ifstart = line; + u_int flags; + oid if_index; +@@ -701,6 +701,11 @@ netsnmp_arch_interface_container_load(ne + *stats++ = 0; /* null terminate name */ + + if_index = netsnmp_arch_interface_index_find(ifstart); ++ if (if_index == 0) { ++ DEBUGMSGTL(("access:interface", "network interface %s is gone", ++ ifstart)); ++ continue; ++ } + + /* + * set address type flags. +@@ -726,7 +731,7 @@ netsnmp_arch_interface_container_load(ne + continue; + } + +- entry = netsnmp_access_interface_entry_create(ifstart, 0); ++ entry = netsnmp_access_interface_entry_create(ifstart, if_index); + if(NULL == entry) { + #ifdef NETSNMP_ENABLE_IPV6 + netsnmp_access_ipaddress_container_free(addr_container, 0); + diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec index 532aec5..e0dfd5a 100644 --- a/SPECS/net-snmp.spec +++ b/SPECS/net-snmp.spec @@ -10,7 +10,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: 5.8 -Release: 24%{?dist} +Release: 25%{?dist} Epoch: 1 License: BSD @@ -70,6 +70,7 @@ Patch41: net-snmp-5.8-fix-cert-crash.patch Patch42: net-snmp-5.8-engine-id.patch Patch43: net-snmp-5.8-certs.patch Patch44: net-snmp-5.8-util-fix.patch +Patch45: net-snmp-5.8-deleted-iface.patch # Modern RPM API means at least EL6 Patch101: net-snmp-5.8-modern-rpm-api.patch @@ -239,6 +240,7 @@ rm -r python %patch42 -p1 -b .engine-id %patch43 -p1 -b .certs %patch44 -p1 -b .utils +%patch45 -p1 -b .ifaces %patch101 -p1 -b .modern-rpm-api @@ -493,6 +495,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test %{_libdir}/libnetsnmptrapd*.so.%{soname}* %changelog +* Mon Feb 21 2022 Josef Ridky - 1:5.8-25 +- fix segfault with error on subcontainer (#2051370) + * Thu Dec 09 2021 Josef Ridky - 1:5.8-24 - fix dereferencing null pointer (#2021403)