1 Star 0 Fork 15

src-oepkgs-oE-rv/net-snmp

forked from src-openEuler/net-snmp 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CVE-2019-20892-4.patch 2.44 KB
一键复制 编辑 原始数据 按行查看 历史
sherlock2010 提交于 2020-07-09 21:37 . Fix CVE-2019-20892
From 39381c4d20dd8042870c28ae3b0c16291e50b705 Mon Sep 17 00:00:00 2001
From: Bart Van Assche <bvanassche@acm.org>
Date: Tue, 23 Jul 2019 10:52:28 -0700
Subject: [PATCH] libsnmp: Unexport struct usmStateReference
Certain snmpd crashes can only be fixed by introducing a reference
count in struct usmStateReference. Unexport that structure such that
changing it does not affect the ABI.
---
include/net-snmp/library/snmpusm.h | 17 +----------------
snmplib/snmpusm.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/include/net-snmp/library/snmpusm.h b/include/net-snmp/library/snmpusm.h
index 3f6078799..49061d8b1 100644
--- a/include/net-snmp/library/snmpusm.h
+++ b/include/net-snmp/library/snmpusm.h
@@ -42,22 +42,7 @@ extern "C" {
/*
* Structures.
*/
- struct usmStateReference {
- char *usr_name;
- size_t usr_name_length;
- u_char *usr_engine_id;
- size_t usr_engine_id_length;
- oid *usr_auth_protocol;
- size_t usr_auth_protocol_length;
- u_char *usr_auth_key;
- size_t usr_auth_key_length;
- oid *usr_priv_protocol;
- size_t usr_priv_protocol_length;
- u_char *usr_priv_key;
- size_t usr_priv_key_length;
- u_int usr_sec_level;
- };
-
+ struct usmStateReference;
/*
* struct usmUser: a structure to represent a given user in a list
diff --git a/snmplib/snmpusm.c b/snmplib/snmpusm.c
index ae2d16906..917865267 100644
--- a/snmplib/snmpusm.c
+++ b/snmplib/snmpusm.c
@@ -84,6 +84,22 @@ netsnmp_feature_child_of(usm_support, usm_all)
netsnmp_feature_require(usm_support)
+struct usmStateReference {
+ char *usr_name;
+ size_t usr_name_length;
+ u_char *usr_engine_id;
+ size_t usr_engine_id_length;
+ oid *usr_auth_protocol;
+ size_t usr_auth_protocol_length;
+ u_char *usr_auth_key;
+ size_t usr_auth_key_length;
+ oid *usr_priv_protocol;
+ size_t usr_priv_protocol_length;
+ u_char *usr_priv_key;
+ size_t usr_priv_key_length;
+ u_int usr_sec_level;
+};
+
oid usmNoAuthProtocol[10] = { NETSNMP_USMAUTH_BASE_OID,
NETSNMP_USMAUTH_NOAUTH };
#ifndef NETSNMP_DISABLE_MD5
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-oepkgs-oe-rv/net-snmp.git
git@gitee.com:src-oepkgs-oe-rv/net-snmp.git
src-oepkgs-oe-rv
net-snmp
net-snmp
master

搜索帮助