Resolves: RHEL-122095 - remove wrong assert

Signed-off-by: Josef Ridky <jridky@redhat.com>
This commit is contained in:
Josef Ridky 2025-11-04 18:42:24 +01:00
parent 1ba6335ec6
commit 600bc6d67d
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,23 @@
From d8c83ff96144f0bb0945a3640ce7ac5995b91c74 Mon Sep 17 00:00:00 2001
From: Bart Van Assche <bvanassche@acm.org>
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);

View File

@ -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 <jridky@redhat.com> - 1:5.9.1-19
- remove wrong assert (RHEL-122095)
* Wed Oct 22 2025 Josef Ridky <jridky@redhat.com> - 1:5.9.1-18
- fix inverted usage of -n in snmptrapd (RHEL-101078)
- fix use after free issue (RHEL-121091)