Added a patch to fix the CVE
Change-Id: Ia57fc3325ee9864368f5e2717532cf42725f0a5c
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6424
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,33 @@ |
0 |
+From 7ffb8e25a0db851953155de91f0170e9bf8c457d Mon Sep 17 00:00:00 2001 |
|
1 |
+From: Robert Story <rstory@freesnmp.com> |
|
2 |
+Date: Thu, 6 Oct 2016 10:43:10 -0400 |
|
3 |
+Subject: [PATCH] CHANGES: BUG: 2743: snmpd crashes when receiving a GetNext |
|
4 |
+ PDU with multiple Varbinds |
|
5 |
+ |
|
6 |
+skip out-of-range varbinds when calling next handler |
|
7 |
+--- |
|
8 |
+ agent/helpers/table.c | 4 ++++ |
|
9 |
+ 1 file changed, 4 insertions(+) |
|
10 |
+ |
|
11 |
+diff --git a/agent/helpers/table.c b/agent/helpers/table.c |
|
12 |
+index 882e84c..b943d6e 100644 |
|
13 |
+--- a/agent/helpers/table.c |
|
14 |
+@@ -406,6 +406,8 @@ table_helper_handler(netsnmp_mib_handler *handler, |
|
15 |
+ if (reqinfo->mode == MODE_GET) |
|
16 |
+ table_helper_cleanup(reqinfo, request, |
|
17 |
+ SNMP_NOSUCHOBJECT); |
|
18 |
++ else |
|
19 |
++ request->processed = 1; /* skip if next handler called */ |
|
20 |
+ continue; |
|
21 |
+ } |
|
22 |
+ |
|
23 |
+@@ -483,6 +485,8 @@ table_helper_handler(netsnmp_mib_handler *handler, |
|
24 |
+ #endif /* NETSNMP_NO_WRITE_SUPPORT */ |
|
25 |
+ table_helper_cleanup(reqinfo, request, |
|
26 |
+ SNMP_NOSUCHOBJECT); |
|
27 |
++ else |
|
28 |
++ request->processed = 1; /* skip if next handler called */ |
|
29 |
+ continue; |
|
30 |
+ } |
|
31 |
+ /* |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
Summary: Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6. |
3 | 3 |
Name: net-snmp |
4 | 4 |
Version: 5.7.3 |
5 |
-Release: 9%{?dist} |
|
5 |
+Release: 10%{?dist} |
|
6 | 6 |
License: BSD (like) |
7 | 7 |
URL: http://net-snmp.sourceforge.net/ |
8 | 8 |
Group: Productivity/Networking/Other |
... | ... |
@@ -16,6 +16,7 @@ Patch1: net-snmp-5.7.2-systemd.patch |
16 | 16 |
Patch2: net-snmp-remove-u64-typedef.patch |
17 | 17 |
Patch3: net-snmp-fix-perl-module-compilation.patch |
18 | 18 |
Patch4: net-snmp-CVE-2018-1000116.patch |
19 |
+Patch5: net-snmp-CVE-2018-18065.patch |
|
19 | 20 |
BuildRequires: openssl-devel perl systemd |
20 | 21 |
Requires: perl systemd |
21 | 22 |
%description |
... | ... |
@@ -35,6 +36,7 @@ The net-snmp-devel package contains headers and libraries for building SNMP appl |
35 | 35 |
%patch2 -p1 |
36 | 36 |
%patch3 -p1 |
37 | 37 |
%patch4 -p1 |
38 |
+%patch5 -p1 |
|
38 | 39 |
|
39 | 40 |
%build |
40 | 41 |
./configure --prefix=%{_prefix} \ |
... | ... |
@@ -99,6 +101,8 @@ rm -rf %{buildroot}/* |
99 | 99 |
%exclude /usr/lib/perl5/5.24.1/*/perllocal.pod |
100 | 100 |
|
101 | 101 |
%changelog |
102 |
+* Mon Dec 31 2018 Ankit Jain <ankitja@vmware.com> 5.7.3-10 |
|
103 |
+- Fix for CVE-2018-18065 |
|
102 | 104 |
* Tue Jul 31 2018 Ajay Kaher <akaher@vmware.com> 5.7.3-9 |
103 | 105 |
- Excluded perllocal.pod for aarch64 |
104 | 106 |
* Mon Apr 16 2018 Xiaolin Li <xiaolinl@vmware.com> 5.7.3-8 |