mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-14 05:49:57 +00:00
net-snmp: patch CVE-2025-68615
Pick patch per [1]. [1] https://security-tracker.debian.org/tracker/CVE-2025-68615 Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
From b4e6f826d9ddcc2d72eac432746807e1234266db Mon Sep 17 00:00:00 2001
|
||||
From: Bart Van Assche <bvanassche@acm.org>
|
||||
Date: Sun, 2 Nov 2025 14:48:55 -0800
|
||||
Subject: [PATCH] snmptrapd: Fix out-of-bounds trapOid[] accesses
|
||||
|
||||
Fixes: https://issues.oss-fuzz.com/issues/457106694
|
||||
Fixes: https://issues.oss-fuzz.com/issues/458668421
|
||||
Fixes: https://issues.oss-fuzz.com/issues/458876071
|
||||
|
||||
CVE: CVE-2025-68615
|
||||
Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/b4e6f826d9ddcc2d72eac432746807e1234266db]
|
||||
Signed-off-by: Peter Marko <peter.marko@siemens.com>
|
||||
---
|
||||
apps/snmptrapd_handlers.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/apps/snmptrapd_handlers.c b/apps/snmptrapd_handlers.c
|
||||
index 6cd126f26..afd93ed0f 100644
|
||||
--- a/apps/snmptrapd_handlers.c
|
||||
+++ b/apps/snmptrapd_handlers.c
|
||||
@@ -1112,6 +1112,12 @@ snmp_input(int op, netsnmp_session *session,
|
||||
*/
|
||||
if (pdu->trap_type == SNMP_TRAP_ENTERPRISESPECIFIC) {
|
||||
trapOidLen = pdu->enterprise_length;
|
||||
+ /*
|
||||
+ * Drop packets that would trigger an out-of-bounds trapOid[]
|
||||
+ * access.
|
||||
+ */
|
||||
+ if (trapOidLen < 1 || trapOidLen > OID_LENGTH(trapOid) - 2)
|
||||
+ return 1;
|
||||
memcpy(trapOid, pdu->enterprise, sizeof(oid) * trapOidLen);
|
||||
if (trapOid[trapOidLen - 1] != 0) {
|
||||
trapOid[trapOidLen++] = 0;
|
||||
@@ -30,6 +30,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
|
||||
file://0001-Android-Fix-the-build.patch \
|
||||
file://netsnmp-swinst-crash.patch \
|
||||
file://net-snmp-5.9.4-kernel-6.7.patch \
|
||||
file://CVE-2025-68615.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user