mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-22 08:28:21 +00:00
libiec61850: patch CVE-2026-18582
Details: https://nvd.nist.gov/vuln/detail/cve-2026-18582 Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
This commit is contained in:
1 parent
a7088b0fda
commit
f4c8ac2da1
2 files changed
+52
No files matched your search
@@ -0,0 +1,51 @@
|
|||||||
|
From 43aa106301639f2afddf11302d25e84c5482e26c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Zillgith <michael.zillgith@mz-automation.de>
|
||||||
|
Date: Tue, 16 Jun 2026 19:24:12 +0100
|
||||||
|
Subject: [PATCH] - MMS server: fixed - oversized RptID written to RCB can
|
||||||
|
trigger invalid free when reports are sent later
|
||||||
|
(LIB61850-561)(GHSA-7qg8-hm25-rv5v)
|
||||||
|
|
||||||
|
(cherry picked from commit 5b2a69f44256b8548927d8afdd7ac5f5381abe1e)
|
||||||
|
|
||||||
|
CVE: CVE-2026-18582
|
||||||
|
Upstream-Status: Backport [https://github.com/mz-automation/libiec61850/commit/5b2a69f44256b8548927d8afdd7ac5f5381abe1e]
|
||||||
|
|
||||||
|
Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
|
||||||
|
---
|
||||||
|
src/iec61850/server/mms_mapping/reporting.c | 9 +++++++--
|
||||||
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/iec61850/server/mms_mapping/reporting.c b/src/iec61850/server/mms_mapping/reporting.c
|
||||||
|
index 2a230c28..a44f0583 100644
|
||||||
|
--- a/src/iec61850/server/mms_mapping/reporting.c
|
||||||
|
+++ b/src/iec61850/server/mms_mapping/reporting.c
|
||||||
|
@@ -557,7 +557,6 @@ updateSingleTrackingValue(MmsMapping* self, ReportControl* rc, const char* name,
|
||||||
|
attributeToUpdate = trkInst->resv;
|
||||||
|
else if (!strcmp(name, "DatSet"))
|
||||||
|
{
|
||||||
|
-
|
||||||
|
char datSet[130];
|
||||||
|
const char* datSetStr = MmsValue_toString(newValue);
|
||||||
|
|
||||||
|
@@ -2664,6 +2663,12 @@ Reporting_RCBWriteAccessHandler(MmsMapping* self, ReportControl* rc, const char*
|
||||||
|
goto exit_function;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (MmsValue_getStringSize(value) > 129)
|
||||||
|
+ {
|
||||||
|
+ retVal = DATA_ACCESS_ERROR_OBJECT_VALUE_INVALID;
|
||||||
|
+ goto exit_function;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
#if (CONFIG_MMS_THREADLESS_STACK != 1)
|
||||||
|
Semaphore_wait(rc->rcbValuesLock);
|
||||||
|
#endif
|
||||||
|
@@ -3677,7 +3682,7 @@ sendNextReportEntrySegment(ReportControl* self)
|
||||||
|
|
||||||
|
const char* rptIdStr = MmsValue_toString(rptIdFromRcb);
|
||||||
|
|
||||||
|
- if (rptIdStr[0] == 0)
|
||||||
|
+ if (rptIdStr[0] == 0 || MmsValue_getStringSize(rptIdFromRcb) > 129)
|
||||||
|
{
|
||||||
|
/* use default rptId when RptID is empty in RCB */
|
||||||
|
updateWithDefaultRptId(self, &rptId);
|
||||||
@@ -17,6 +17,7 @@ SRCREV = "a13961110b8238d2d8ea577c1fb7592ba3017ad8"
|
|||||||
|
|
||||||
SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.6;protocol=https;tag=v${PV} \
|
SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.6;protocol=https;tag=v${PV} \
|
||||||
file://0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \
|
file://0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \
|
||||||
|
file://CVE-2026-18582.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user