From 600bc6d67d94b0809616640dccdb07b318619d62 Mon Sep 17 00:00:00 2001 From: Josef Ridky Date: Tue, 4 Nov 2025 18:42:24 +0100 Subject: [PATCH] Resolves: RHEL-122095 - remove wrong assert Signed-off-by: Josef Ridky --- net-snmp-5.9-remove-assert.patch | 23 +++++++++++++++++++++++ net-snmp.spec | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 net-snmp-5.9-remove-assert.patch diff --git a/net-snmp-5.9-remove-assert.patch b/net-snmp-5.9-remove-assert.patch new file mode 100644 index 0000000..a031942 --- /dev/null +++ b/net-snmp-5.9-remove-assert.patch @@ -0,0 +1,23 @@ +From d8c83ff96144f0bb0945a3640ce7ac5995b91c74 Mon Sep 17 00:00:00 2001 +From: Bart Van Assche +Date: Thu, 26 Sep 2024 09:24:38 -0700 +Subject: [PATCH] libsnmp: Remove an incorrect assert statement + +See also https://github.com/net-snmp/net-snmp/issues/856. +--- + snmplib/snmpusm.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/snmplib/snmpusm.c b/snmplib/snmpusm.c +index 704f3e25b9..c9363745b7 100644 +--- a/snmplib/snmpusm.c ++++ b/snmplib/snmpusm.c +@@ -304,7 +304,6 @@ usm_clone(netsnmp_pdu *pdu, netsnmp_pdu *new_pdu) + return ret; + + if (pdu->command == SNMP_MSG_TRAP2) { +- netsnmp_assert(pdu->securityModel == SNMP_DEFAULT_SECMODEL); + ret = usm_clone_usmStateReference(ref, new_ref); + } else { + netsnmp_assert(ref == *new_ref); + diff --git a/net-snmp.spec b/net-snmp.spec index 89c1dc3..dcd6421 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -10,7 +10,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: 5.9.1 -Release: 18%{?dist} +Release: 19%{?dist} Epoch: 1 License: BSD @@ -63,6 +63,7 @@ Patch33: net-snmp-5.9-deleted-iface.patch Patch34: net-snmp-5.9.4-revert-n-snmptrapd-log.patch Patch35: net-snmp-5.8-callback-fix.patch Patch36: net-snmp-5.9.1-create-user-usage.patch +Patch37: net-snmp-5.9-remove-assert.patch # Modern RPM API means at least EL6 Patch101: net-snmp-5.8-modern-rpm-api.patch @@ -251,6 +252,7 @@ cp %{SOURCE10} . %patch34 -p1 -b .revert-n-snmptrapd-log %patch35 -p1 -b .callback-fix %patch36 -p1 -b .create-user-usage +%patch37 -p1 -b .remove-assert %patch101 -p1 -b .modern-rpm-api %patch102 -p1 @@ -520,6 +522,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test %{_libdir}/libnetsnmptrapd*.so.%{soname}* %changelog +* Tue Nov 04 2025 Josef Ridky - 1:5.9.1-19 +- remove wrong assert (RHEL-122095) + * Wed Oct 22 2025 Josef Ridky - 1:5.9.1-18 - fix inverted usage of -n in snmptrapd (RHEL-101078) - fix use after free issue (RHEL-121091)