Resolves: #2151540 - fix memory leak when ipv6 disable set to 1

This commit is contained in:
Josef Řídký 2023-02-15 10:26:25 +01:00
parent 39c74035d5
commit 741f21d440
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -urNp a/snmplib/snmp_logging.c b/snmplib/snmp_logging.c
--- a/snmplib/snmp_logging.c 2023-02-15 10:19:15.691827254 +0100
+++ b/snmplib/snmp_logging.c 2023-02-15 10:24:41.006642974 +0100
@@ -490,7 +490,7 @@ snmp_log_options(char *optarg, int argc,
char *
snmp_log_syslogname(const char *pstr)
{
- if (pstr)
+ if (pstr && (pstr != syslogname))
strlcpy (syslogname, pstr, sizeof(syslogname));
return syslogname;

View File

@ -53,6 +53,7 @@ Patch23: net-snmp-5.9-intermediate-certs.patch
Patch24: net-snmp-5.9-twice-IP-parsing.patch
Patch25: net-snmp-5.9-openssl-3.0.patch
Patch26: net-snmp-5.9-CVE-2022-44792-44793.patch
Patch27: net-snmp-5.9-ipv6-disable-leak.patch
# Modern RPM API means at least EL6
Patch101: net-snmp-5.8-modern-rpm-api.patch
@ -230,7 +231,8 @@ cp %{SOURCE10} .
%patch23 -p1 -b .intermediate-certs
%patch24 -p1 -b .twice-IP-parsing
%patch25 -p1 -b .openssl-3-0
%patch26 -p1 -b .CVE-2022-44792-44793
%patch26 -p1
%patch27 -p1 -b .ipv6-disable-leak
%patch101 -p1 -b .modern-rpm-api
%patch102 -p1
@ -502,6 +504,7 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test
%changelog
* Wed Feb 15 2023 Josef Ridky <jridky@redhat.com> - 1:5.9.1-9
- fix CVE-2022-44792 and CVE-2022-44793 (#2141902) and (#2141906)
- fix memory leak when ipv6 disable set to 1 (#2151540)
* Thu Apr 07 2022 Josef Ridky <jridky@redhat.com> - 1:5.9.1-8
- fix default snmpd.conf file content (#2067954)