Skip to content

Commit

Permalink
[security] Fixes for DSA-4314-1 net-snmp (#2152)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenggen-xu authored and lguohan committed Oct 15, 2018
1 parent a401ee7 commit e2ffb58
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 2170e345858738e65d3156a49d3186e4a9288821 Mon Sep 17 00:00:00 2001
From: Zhenggen Xu <zxu@linkedin.com>
Date: Fri, 12 Oct 2018 17:13:54 -0700
Subject: [PATCH] Subject: [PATCH] CHANGES: BUG: 2743: snmpd crashes when
receiving a GetNext PDU with multiple Varbinds

skip out-of-range varbinds when calling next handler
---
agent/helpers/table.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/agent/helpers/table.c b/agent/helpers/table.c
index 882e84c..b943d6e 100644
--- a/agent/helpers/table.c
+++ b/agent/helpers/table.c
@@ -406,6 +406,8 @@ table_helper_handler(netsnmp_mib_handler *handler,
if (reqinfo->mode == MODE_GET)
table_helper_cleanup(reqinfo, request,
SNMP_NOSUCHOBJECT);
+ else
+ request->processed = 1; /* skip if next handler called */
continue;
}

@@ -483,6 +485,8 @@ table_helper_handler(netsnmp_mib_handler *handler,
#endif /* NETSNMP_NO_WRITE_SUPPORT */
table_helper_cleanup(reqinfo, request,
SNMP_NOSUCHOBJECT);
+ else
+ request->processed = 1; /* skip if next handler called */
continue;
}
/*
--
2.18.0

1 change: 1 addition & 0 deletions src/snmpd/patch-5.7.3+dfsg/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
0001-SNMP-Stop-spamming-logs-with-statfs-permission-denie.patch
0002-at.c-properly-check-return-status-from-realloc.-Than.patch
0003-CHANGES-BUG-2743-snmpd-crashes-when-receiving-a-GetN.patch

0 comments on commit e2ffb58

Please sign in to comment.