libiec61850: patch CVE-2024-26529
PATCH 1/3 libiec61850: patch CVE-2024-26529
Details https://nvd.nist.gov/vuln/detail/CVE-2024-26529
---
...-break-CMAKE_INSTALL_PATH-by-trying-.patch | 7 ++--
...AKE_INSTALL_LIBDIR-from-GNUInstallD.patch} | 4 ++-
...ed-null-pointer-dereference-in-mmsSe.patch | 33 +++++++++++++++++++
.../libiec61850/libiec61850_1.5.3.bb | 3 +-
4 files changed, 40 insertions(+), 7 deletions(-)
rename meta-networking/recipes-connectivity/libiec61850/files/{0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch => 0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch} (89%)
create mode 100644 meta-networking/recipes-connectivity/libiec61850/files/0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patchmeta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch +2 -5
@@ -1,4 +1,4 @@ -From d4ddfc7a350011b7944ed8d6bca80f164dfd1387 Mon Sep 17 00:00:00 2001 +From 21d0a059097dfae1723255e5ff59665d39420be0 Mon Sep 17 00:00:00 2001 From: Romain Naour <[email protected]> Date: Fri, 10 Jul 2020 17:08:34 +0200 Subject: [PATCH] pyiec61850: don't break CMAKE_INSTALL_PATH by trying to find
@@ -14,7 +14,7 @@ Upstream-Status: Pending 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt -index 159ef4b..d1732a1 100644 +index 159ef4bc..d1732a16 100644 --- a/pyiec61850/CMakeLists.txt +++ b/pyiec61850/CMakeLists.txt @@ -31,14 +31,7 @@ endif()
@@ -34,6 +34,3 @@ index 159ef4b..d1732a1 100644 +install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py) --- -2.31.1 -
meta-networking/recipes-connectivity/libiec61850/files/0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch renamed from meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch +3 -1
@@ -1,4 +1,4 @@ -From 16d07a82242c3263ec0038c9b4c97355795d2dd9 Mon Sep 17 00:00:00 2001 +From aa48ec52d5792c18a3b369a55ed6472a7dfa1ec1 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Sat, 19 Mar 2022 23:16:51 -0700 Subject: [PATCH] pyiec61850: Use CMAKE_INSTALL_LIBDIR from GNUInstallDirs in
@@ -13,6 +13,8 @@ Signed-off-by: Khem Raj <[email protected]> pyiec61850/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) +diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt +index d1732a16..c19f889b 100644 --- a/pyiec61850/CMakeLists.txt +++ b/pyiec61850/CMakeLists.txt @@ -31,7 +31,9 @@ endif()
meta-networking/recipes-connectivity/libiec61850/files/0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patch new file +33 -0
@@ -0,0 +1,33 @@ +From de14cb2e053c95d9695bb41bbdd580f35f710793 Mon Sep 17 00:00:00 2001 +From: Michael Zillgith <[email protected]> +Date: Fri, 2 Feb 2024 06:44:47 +0000 +Subject: [PATCH] LIB61850-430: fixed null pointer dereference in + mmsServer_handleDeleteNamedVariableListRequest when receiving malformed + message + +CVE: CVE-2024-26529 +Upstream-Status: Backport [https://github.com/mz-automation/libiec61850/commit/cf94d64206cf53298edf4799a75b31657bb7cbb3] + +(cherry picked from commit cf94d64206cf53298edf4799a75b31657bb7cbb3) +Signed-off-by: Ankur Tyagi <[email protected]> +--- + src/mms/iso_mms/server/mms_named_variable_list_service.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/mms/iso_mms/server/mms_named_variable_list_service.c b/src/mms/iso_mms/server/mms_named_variable_list_service.c +index 3a27061c..3365f771 100644 +--- a/src/mms/iso_mms/server/mms_named_variable_list_service.c ++++ b/src/mms/iso_mms/server/mms_named_variable_list_service.c +@@ -140,6 +140,12 @@ mmsServer_handleDeleteNamedVariableListRequest(MmsServerConnection connection, + mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_INVALID_PDU, response); + goto exit_function; + } ++ ++ if (request->listOfVariableListName == NULL) ++ { ++ mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_INVALID_PDU, response); ++ goto exit_function; ++ } + + long scopeOfDelete = DeleteNamedVariableListRequest__scopeOfDelete_specific; +
meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.3.bb +2 -1
@@ -17,7 +17,8 @@ SRCREV = "6f557c490f0b46ab5d7ef1b01bb3bc9fab3f442f" SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.5;protocol=https \ file://0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch \ - file://0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \ + file://0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \ + file://0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patch \ " S = "${WORKDIR}/git"
PATCH 2/3 libiec61850: patch CVE-2024-45971
Details https://nvd.nist.gov/vuln/detail/CVE-2024-45971
--- ...laced-unsafe-function-StringUtils_cr.patch | 218 ++++++++++++++++++ .../libiec61850/libiec61850_1.5.3.bb | 1 + 2 files changed, 219 insertions(+) create mode 100644 meta-networking/recipes-connectivity/libiec61850/files/0004-LIB61850-447-replaced-unsafe-function-StringUtils_cr.patch
meta-networking/recipes-connectivity/libiec61850/files/0004-LIB61850-447-replaced-unsafe-function-StringUtils_cr.patch new file +218 -0
@@ -0,0 +1,218 @@ +From c8fa1fb0e11eb3993faa5f3df09c6d3c4d2305c1 Mon Sep 17 00:00:00 2001 +From: Michael Zillgith <[email protected]> +Date: Mon, 22 Jul 2024 16:34:03 +0100 +Subject: [PATCH] LIB61850-447: replaced unsafe function + StringUtils_createStringFromBufferInBuffer with function with length check to + not exceed target buffer + +CVE: CVE-2024-45971 +Upstream-Status: Backport [https://github.com/mz-automation/libiec61850/commit/1f52be9ddeae00e69cd43e4cac3cb4f0c880c4f0] + +(cherry picked from commit 1f52be9ddeae00e69cd43e4cac3cb4f0c880c4f0) +Signed-off-by: Ankur Tyagi <[email protected]> +--- + src/common/inc/string_utilities.h | 3 ++ + src/common/string_utilities.c | 12 +++++ + src/iec61850/server/mms_mapping/mms_mapping.c | 6 ++- + src/mms/iso_mms/client/mms_client_identify.c | 6 +-- + .../server/mms_named_variable_list_service.c | 52 +++++++++---------- + 5 files changed, 48 insertions(+), 31 deletions(-) + +diff --git a/src/common/inc/string_utilities.h b/src/common/inc/string_utilities.h +index b6b238ff..9a5d868a 100644 +--- a/src/common/inc/string_utilities.h ++++ b/src/common/inc/string_utilities.h +@@ -63,6 +63,9 @@ StringUtils_createStringFromBuffer(const uint8_t* buf, int size); + LIB61850_INTERNAL char* + StringUtils_createStringFromBufferInBuffer(char* newString, const uint8_t* buf, int size); + ++LIB61850_INTERNAL char* ++StringUtils_createStringFromBufferInBufferMax(char* newString, const uint8_t* buf, int size, int maxBufSize); ++ + LIB61850_INTERNAL void + StringUtils_replace(char* string, char oldChar, char newChar); + +diff --git a/src/common/string_utilities.c b/src/common/string_utilities.c +index 37e62ad7..378acbde 100644 +--- a/src/common/string_utilities.c ++++ b/src/common/string_utilities.c +@@ -85,6 +85,18 @@ StringUtils_createStringFromBufferInBuffer(char* newString, const uint8_t* buf, + return newString; + } + ++char* ++StringUtils_createStringFromBufferInBufferMax(char* newString, const uint8_t* buf, int size, int maxBufSize) ++{ ++ if (size >= maxBufSize) ++ size = maxBufSize - 1; ++ ++ memcpy(newString, buf, size); ++ newString[size] = 0; ++ ++ return newString; ++} ++ + char* + StringUtils_createStringInBuffer(char* newStr, int bufSize, int count, ...) + { +diff --git a/src/iec61850/server/mms_mapping/mms_mapping.c b/src/iec61850/server/mms_mapping/mms_mapping.c +index 707e8b57..4a700a27 100644 +--- a/src/iec61850/server/mms_mapping/mms_mapping.c ++++ b/src/iec61850/server/mms_mapping/mms_mapping.c +@@ -3268,7 +3268,9 @@ mmsReadAccessHandler (void* parameter, MmsDomain* domain, char* variableId, MmsS + } + else + { +- StringUtils_createStringFromBufferInBuffer(str, (uint8_t*) variableId, separator - variableId); ++ char str[65]; ++ ++ StringUtils_createStringFromBufferInBufferMax(str, (uint8_t*) variableId, separator - variableId, sizeof(str)); + + LogicalNode* ln = LogicalDevice_getLogicalNode(ld, str); + +@@ -3286,7 +3288,7 @@ mmsReadAccessHandler (void* parameter, MmsDomain* domain, char* variableId, MmsS + else { + doEnd--; + +- StringUtils_createStringFromBufferInBuffer(str, (uint8_t*) (doStart + 1), doEnd - doStart); ++ StringUtils_createStringFromBufferInBufferMax(str, (uint8_t*) (doStart + 1), doEnd - doStart, sizeof(str)); + } + + if (fc == IEC61850_FC_SP) { +diff --git a/src/mms/iso_mms/client/mms_client_identify.c b/src/mms/iso_mms/client/mms_client_identify.c +index 831b439d..c679a423 100644 +--- a/src/mms/iso_mms/client/mms_client_identify.c ++++ b/src/mms/iso_mms/client/mms_client_identify.c +@@ -84,15 +84,15 @@ mmsClient_parseIdentifyResponse(MmsConnection self, ByteBuffer* response, uint32 + + switch (tag) { + case 0x80: /* vendorName */ +- vendorName = StringUtils_createStringFromBufferInBuffer(vendorNameBuf, buffer + bufPos, length); ++ vendorName = StringUtils_createStringFromBufferInBufferMax(vendorNameBuf, buffer + bufPos, length, sizeof(vendorNameBuf)); + bufPos += length; + break; + case 0x81: /* modelName */ +- modelName = StringUtils_createStringFromBufferInBuffer(modelNameBuf, buffer + bufPos, length); ++ modelName = StringUtils_createStringFromBufferInBufferMax(modelNameBuf, buffer + bufPos, length, sizeof(modelNameBuf)); + bufPos += length; + break; + case 0x82: /* revision */ +- revision = StringUtils_createStringFromBufferInBuffer(revisionBuf, buffer + bufPos, length); ++ revision = StringUtils_createStringFromBufferInBufferMax(revisionBuf, buffer + bufPos, length, sizeof (revisionBuf)); + bufPos += length; + break; + case 0x83: /* list of abstract syntaxes */ +diff --git a/src/mms/iso_mms/server/mms_named_variable_list_service.c b/src/mms/iso_mms/server/mms_named_variable_list_service.c +index 3365f771..757d0ed3 100644 +--- a/src/mms/iso_mms/server/mms_named_variable_list_service.c ++++ b/src/mms/iso_mms/server/mms_named_variable_list_service.c +@@ -401,13 +401,13 @@ createNamedVariableList(MmsServer server, MmsDomain* domain, MmsDevice* device, + char variableName[65]; + char domainId[65]; + +- StringUtils_createStringFromBufferInBuffer(variableName, +- varSpec->choice.name.choice.domainspecific.itemId.buf, +- varSpec->choice.name.choice.domainspecific.itemId.size); ++ StringUtils_createStringFromBufferInBufferMax(variableName, ++ varSpec->choice.name.choice.domainspecific.itemId.buf, ++ varSpec->choice.name.choice.domainspecific.itemId.size, sizeof(variableName)); + +- StringUtils_createStringFromBufferInBuffer(domainId, +- varSpec->choice.name.choice.domainspecific.domainId.buf, +- varSpec->choice.name.choice.domainspecific.domainId.size); ++ StringUtils_createStringFromBufferInBufferMax(domainId, ++ varSpec->choice.name.choice.domainspecific.domainId.buf, ++ varSpec->choice.name.choice.domainspecific.domainId.size, sizeof(domainId)); + + MmsDomain* elementDomain = MmsDevice_getDomain(device, domainId); + +@@ -494,9 +494,9 @@ mmsServer_handleDefineNamedVariableListRequest( + goto exit_free_struct; + } + +- StringUtils_createStringFromBufferInBuffer(domainName, +- request->variableListName.choice.domainspecific.domainId.buf, +- request->variableListName.choice.domainspecific.domainId.size); ++ StringUtils_createStringFromBufferInBufferMax(domainName, ++ request->variableListName.choice.domainspecific.domainId.buf, ++ request->variableListName.choice.domainspecific.domainId.size, sizeof(domainName)); + + MmsDomain* domain = MmsDevice_getDomain(device, domainName); + +@@ -517,9 +517,9 @@ mmsServer_handleDefineNamedVariableListRequest( + goto exit_free_struct; + } + +- StringUtils_createStringFromBufferInBuffer(variableListName, +- request->variableListName.choice.domainspecific.itemId.buf, +- request->variableListName.choice.domainspecific.itemId.size); ++ StringUtils_createStringFromBufferInBufferMax(variableListName, ++ request->variableListName.choice.domainspecific.itemId.buf, ++ request->variableListName.choice.domainspecific.itemId.size, sizeof(variableListName)); + + if (MmsDomain_getNamedVariableList(domain, variableListName) != NULL) { + mmsMsg_createServiceErrorPdu(invokeId, response, MMS_ERROR_DEFINITION_OBJECT_EXISTS); +@@ -567,9 +567,9 @@ mmsServer_handleDefineNamedVariableListRequest( + goto exit_free_struct; + } + +- StringUtils_createStringFromBufferInBuffer(variableListName, +- request->variableListName.choice.aaspecific.buf, +- request->variableListName.choice.aaspecific.size); ++ StringUtils_createStringFromBufferInBufferMax(variableListName, ++ request->variableListName.choice.aaspecific.buf, ++ request->variableListName.choice.aaspecific.size, sizeof(variableListName)); + + if (MmsServerConnection_getNamedVariableList(connection, variableListName) != NULL) { + mmsMsg_createServiceErrorPdu(invokeId, response, MMS_ERROR_DEFINITION_OBJECT_EXISTS); +@@ -611,9 +611,9 @@ mmsServer_handleDefineNamedVariableListRequest( + goto exit_free_struct; + } + +- StringUtils_createStringFromBufferInBuffer(variableListName, +- request->variableListName.choice.vmdspecific.buf, +- request->variableListName.choice.vmdspecific.size); ++ StringUtils_createStringFromBufferInBufferMax(variableListName, ++ request->variableListName.choice.vmdspecific.buf, ++ request->variableListName.choice.vmdspecific.size, sizeof(variableListName)); + + if (mmsServer_getNamedVariableListWithName(MmsDevice_getNamedVariableLists(connection->server->device), variableListName) != NULL) { + mmsMsg_createServiceErrorPdu(invokeId, response, MMS_ERROR_DEFINITION_OBJECT_EXISTS); +@@ -757,11 +757,11 @@ mmsServer_handleGetNamedVariableListAttributesRequest( + goto exit_function; + } + +- StringUtils_createStringFromBufferInBuffer(domainName, request->choice.domainspecific.domainId.buf, +- request->choice.domainspecific.domainId.size); ++ StringUtils_createStringFromBufferInBufferMax(domainName, request->choice.domainspecific.domainId.buf, ++ request->choice.domainspecific.domainId.size, sizeof(domainName)); + +- StringUtils_createStringFromBufferInBuffer(itemName, request->choice.domainspecific.itemId.buf, +- request->choice.domainspecific.itemId.size); ++ StringUtils_createStringFromBufferInBufferMax(itemName, request->choice.domainspecific.itemId.buf, ++ request->choice.domainspecific.itemId.size, sizeof(itemName)); + + MmsDevice* mmsDevice = MmsServer_getDevice(connection->server); + +@@ -798,8 +798,8 @@ mmsServer_handleGetNamedVariableListAttributesRequest( + goto exit_function; + } + +- StringUtils_createStringFromBufferInBuffer(listName, request->choice.aaspecific.buf, +- request->choice.aaspecific.size); ++ StringUtils_createStringFromBufferInBufferMax(listName, request->choice.aaspecific.buf, ++ request->choice.aaspecific.size, sizeof(listName)); + + MmsNamedVariableList varList = MmsServerConnection_getNamedVariableList(connection, listName); + +@@ -817,8 +817,8 @@ mmsServer_handleGetNamedVariableListAttributesRequest( + goto exit_function; + } + +- StringUtils_createStringFromBufferInBuffer(listName, request->choice.vmdspecific.buf, +- request->choice.vmdspecific.size); ++ StringUtils_createStringFromBufferInBufferMax(listName, request->choice.vmdspecific.buf, ++ request->choice.vmdspecific.size, sizeof(listName)); + + MmsDevice* mmsDevice = MmsServer_getDevice(connection->server); +
meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.3.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.5;protocol=https file://0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch \ file://0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \ file://0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patch \ + file://0004-LIB61850-447-replaced-unsafe-function-StringUtils_cr.patch \ " S = "${WORKDIR}/git"
PATCH 3/3 libiec61850: patch CVE-2024-45970
In reply to Ankur TyagiDetails https://nvd.nist.gov/vuln/detail/CVE-2024-45970
--- ...ed-potential-buffer-overflows-in-MMS.patch | 73 +++++++++++++++++++ .../libiec61850/libiec61850_1.5.3.bb | 1 + 2 files changed, 74 insertions(+) create mode 100644 meta-networking/recipes-connectivity/libiec61850/files/0005-LIB61850-449-fixed-potential-buffer-overflows-in-MMS.patch
meta-networking/recipes-connectivity/libiec61850/files/0005-LIB61850-449-fixed-potential-buffer-overflows-in-MMS.patch new file +73 -0
@@ -0,0 +1,73 @@ +From 3238485703baf62a66da6c9dae63eb648c230b8c Mon Sep 17 00:00:00 2001 +From: Michael Zillgith <[email protected]> +Date: Tue, 23 Jul 2024 18:50:15 +0100 +Subject: [PATCH] LIB61850-449: fixed potential buffer overflows in MMS client + file service handling + +CVE: CVE-2024-45970 +Upstream-Status: Backport [https://github.com/mz-automation/libiec61850/commit/ac925fae8e281ac6defcd630e9dd756264e9c5bc] + +(cherry picked from commit ac925fae8e281ac6defcd630e9dd756264e9c5bc) +Signed-off-by: Ankur Tyagi <[email protected]> +--- + src/mms/iso_mms/client/mms_client_files.c | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +diff --git a/src/mms/iso_mms/client/mms_client_files.c b/src/mms/iso_mms/client/mms_client_files.c +index 4fca418e..935ba1a4 100644 +--- a/src/mms/iso_mms/client/mms_client_files.c ++++ b/src/mms/iso_mms/client/mms_client_files.c +@@ -487,8 +487,13 @@ parseFileAttributes(uint8_t* buffer, int bufPos, int maxBufPos, uint32_t* fileSi + break; + case 0x81: /* lastModified */ + { +- if (lastModified != NULL) { ++ if (lastModified != NULL) ++ { + char gtString[40]; ++ ++ if (length > sizeof(gtString) - 1) ++ return false; /* lastModified string too long */ ++ + memcpy(gtString, buffer + bufPos, length); + gtString[length] = 0; + *lastModified = Conversions_generalizedTimeToMsTime(gtString); +@@ -515,12 +520,14 @@ parseDirectoryEntry(uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeI + uint32_t fileSize = 0; + uint64_t lastModified = 0; + +- while (bufPos < maxBufPos) { ++ while (bufPos < maxBufPos) ++ { + uint8_t tag = buffer[bufPos++]; + int length; + + bufPos = BerDecoder_decodeLength(buffer, &length, bufPos, maxBufPos); +- if (bufPos < 0) { ++ if (bufPos < 0) ++ { + if (DEBUG_MMS_CLIENT) + printf("MMS_CLIENT: invalid length field\n"); + return false; +@@ -534,12 +541,20 @@ parseDirectoryEntry(uint8_t* buffer, int bufPos, int maxBufPos, uint32_t invokeI + tag = buffer[bufPos++]; + + bufPos = BerDecoder_decodeLength(buffer, &length, bufPos, maxBufPos); +- if (bufPos < 0) { ++ if (bufPos < 0) ++ { + if (DEBUG_MMS_CLIENT) + printf("MMS_CLIENT: invalid length field\n"); + return false; + } + ++ if (length > (sizeof(fileNameMemory) - 1)) ++ { ++ if (DEBUG_MMS_CLIENT) ++ printf("MMS_CLIENT: filename too long\n"); ++ return false; ++ } ++ + memcpy(filename, buffer + bufPos, length); + filename[length] = 0; +
meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.3.bb +1 -0
@@ -20,6 +20,7 @@ SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.5;protocol=https file://0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \ file://0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patch \ file://0004-LIB61850-447-replaced-unsafe-function-StringUtils_cr.patch \ + file://0005-LIB61850-449-fixed-potential-buffer-overflows-in-MMS.patch \ " S = "${WORKDIR}/git"
Is this the full patch? It looks like about half of it is missing - or am I missing something? It doesn't look like 1.5.3 had part of the fix already.
Quoted 122 lines · Ankur Tyagi via lists.openembedded.org
Details https://nvd.nist.gov/vuln/detail/CVE-2024-26529
Signed-off-by Ankur Tyagi <[email protected]>--- ...-break-CMAKE_INSTALL_PATH-by-trying-.patch | 7 ++-- ...AKE_INSTALL_LIBDIR-from-GNUInstallD.patch} | 4 ++- ...ed-null-pointer-dereference-in-mmsSe.patch | 33 +++++++++++++++++++ .../libiec61850/libiec61850_1.5.3.bb | 3 +- 4 files changed, 40 insertions(+), 7 deletions(-) rename meta-networking/recipes-connectivity/libiec61850/files/{0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch => 0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch} (89%) create mode 100644 meta-networking/recipes-connectivity/libiec61850/files/0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patchmeta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch +2
-5@@ -1,4 +1,4 @@ -From d4ddfc7a350011b7944ed8d6bca80f164dfd1387 Mon Sep 17 00:00:00 2001 +From 21d0a059097dfae1723255e5ff59665d39420be0 Mon Sep 17 00:00:00 2001 From: Romain Naour <[email protected]> Date: Fri, 10 Jul 2020 17:08:34 +0200 Subject: [PATCH] pyiec61850: don't break CMAKE_INSTALL_PATH by trying to find@@ -14,7 +14,7 @@ Upstream-Status: Pending 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt -index 159ef4b..d1732a1 100644 +index 159ef4bc..d1732a16 100644 --- a/pyiec61850/CMakeLists.txt +++ b/pyiec61850/CMakeLists.txt @@ -31,14 +31,7 @@ endif()@@ -34,6 +34,3 @@ index 159ef4b..d1732a1 100644 +install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py) --- -2.31.1 -meta-networking/recipes-connectivity/libiec61850/files/0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch renamed from meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch +3
-1@@ -1,4 +1,4 @@ -From 16d07a82242c3263ec0038c9b4c97355795d2dd9 Mon Sep 17 00:00:00 2001 +From aa48ec52d5792c18a3b369a55ed6472a7dfa1ec1 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Sat, 19 Mar 2022 23:16:51 -0700 Subject: [PATCH] pyiec61850: Use CMAKE_INSTALL_LIBDIR from GNUInstallDirs in@@ -13,6 +13,8 @@ Signed-off-by: Khem Raj <[email protected]> pyiec61850/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) +diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt +index d1732a16..c19f889b 100644 --- a/pyiec61850/CMakeLists.txt +++ b/pyiec61850/CMakeLists.txt @@ -31,7 +31,9 @@ endif()meta-networking/recipes-connectivity/libiec61850/files/0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patch new file +33
-0@@ -0,0 +1,33 @@ +From de14cb2e053c95d9695bb41bbdd580f35f710793 Mon Sep 17 00:00:00 2001 +From: Michael Zillgith <[email protected]> +Date: Fri, 2 Feb 2024 06:44:47 +0000 +Subject: [PATCH] LIB61850-430: fixed null pointer dereference in + mmsServer_handleDeleteNamedVariableListRequest when receiving malformed + message + +CVE: CVE-2024-26529 +Upstream-Status: Backport [https://github.com/mz-automation/libiec61850/commit/cf94d64206cf53298edf4799a75b31657bb7cbb3] + +(cherry picked from commit cf94d64206cf53298edf4799a75b31657bb7cbb3) +Signed-off-by: Ankur Tyagi <[email protected]> +--- + src/mms/iso_mms/server/mms_named_variable_list_service.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/mms/iso_mms/server/mms_named_variable_list_service.c b/src/mms/iso_mms/server/mms_named_variable_list_service.c +index 3a27061c..3365f771 100644 +--- a/src/mms/iso_mms/server/mms_named_variable_list_service.c ++++ b/src/mms/iso_mms/server/mms_named_variable_list_service.c +@@ -140,6 +140,12 @@ mmsServer_handleDeleteNamedVariableListRequest(MmsServerConnection connection, + mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_INVALID_PDU, response); + goto exit_function; + } ++ ++ if (request->listOfVariableListName == NULL) ++ { ++ mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_INVALID_PDU, response); ++ goto exit_function; ++ } + + long scopeOfDelete = DeleteNamedVariableListRequest__scopeOfDelete_specific; +meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.3.bb +2
-2@@ -17,7 +17,8 @@ SRCREV = "6f557c490f0b46ab5d7ef1b01bb3bc9fab3f442f" SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.5;protocol=https \ file://0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch \ - file://0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \ + file://0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \ + file://0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patch \ " S = "${WORKDIR}/git" -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#120395): https://lists.openembedded.org/g/openembedded-devel/message/120395
Mute This Topic: https://lists.openembedded.org/mt/115666831/6084445
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines · Gyorgy Sarvari via lists.openembedded.org
Is this the full patch? It looks like about half of it is missing - or am I missing something? It doesn't look like 1.5.3 had part of the fix already.
Sorry, please ignore this message. What I was missing is that the rest is only whitespace change.
Quoted 127 lines · Ankur Tyagi via lists.openembedded.org
Quoted 107 lines
Details https://nvd.nist.gov/vuln/detail/CVE-2024-26529
Signed-off-by Ankur Tyagi <[email protected]>--- ...-break-CMAKE_INSTALL_PATH-by-trying-.patch | 7 ++-- ...AKE_INSTALL_LIBDIR-from-GNUInstallD.patch} | 4 ++- ...ed-null-pointer-dereference-in-mmsSe.patch | 33 +++++++++++++++++++ .../libiec61850/libiec61850_1.5.3.bb | 3 +- 4 files changed, 40 insertions(+), 7 deletions(-) rename meta-networking/recipes-connectivity/libiec61850/files/{0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch => 0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch} (89%) create mode 100644 meta-networking/recipes-connectivity/libiec61850/files/0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patchmeta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch +2
-5@@ -1,4 +1,4 @@ -From d4ddfc7a350011b7944ed8d6bca80f164dfd1387 Mon Sep 17 00:00:00 2001 +From 21d0a059097dfae1723255e5ff59665d39420be0 Mon Sep 17 00:00:00 2001 From: Romain Naour <[email protected]> Date: Fri, 10 Jul 2020 17:08:34 +0200 Subject: [PATCH] pyiec61850: don't break CMAKE_INSTALL_PATH by trying to find@@ -14,7 +14,7 @@ Upstream-Status: Pending 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt -index 159ef4b..d1732a1 100644 +index 159ef4bc..d1732a16 100644 --- a/pyiec61850/CMakeLists.txt +++ b/pyiec61850/CMakeLists.txt @@ -31,14 +31,7 @@ endif()@@ -34,6 +34,3 @@ index 159ef4b..d1732a1 100644 +install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py) --- -2.31.1 -meta-networking/recipes-connectivity/libiec61850/files/0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch renamed from meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch +3
-1@@ -1,4 +1,4 @@ -From 16d07a82242c3263ec0038c9b4c97355795d2dd9 Mon Sep 17 00:00:00 2001 +From aa48ec52d5792c18a3b369a55ed6472a7dfa1ec1 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Sat, 19 Mar 2022 23:16:51 -0700 Subject: [PATCH] pyiec61850: Use CMAKE_INSTALL_LIBDIR from GNUInstallDirs in@@ -13,6 +13,8 @@ Signed-off-by: Khem Raj <[email protected]> pyiec61850/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) +diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt +index d1732a16..c19f889b 100644 --- a/pyiec61850/CMakeLists.txt +++ b/pyiec61850/CMakeLists.txt @@ -31,7 +31,9 @@ endif()meta-networking/recipes-connectivity/libiec61850/files/0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patch new file +33
-0@@ -0,0 +1,33 @@ +From de14cb2e053c95d9695bb41bbdd580f35f710793 Mon Sep 17 00:00:00 2001 +From: Michael Zillgith <[email protected]> +Date: Fri, 2 Feb 2024 06:44:47 +0000 +Subject: [PATCH] LIB61850-430: fixed null pointer dereference in + mmsServer_handleDeleteNamedVariableListRequest when receiving malformed + message + +CVE: CVE-2024-26529 +Upstream-Status: Backport [https://github.com/mz-automation/libiec61850/commit/cf94d64206cf53298edf4799a75b31657bb7cbb3] + +(cherry picked from commit cf94d64206cf53298edf4799a75b31657bb7cbb3) +Signed-off-by: Ankur Tyagi <[email protected]> +--- + src/mms/iso_mms/server/mms_named_variable_list_service.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/mms/iso_mms/server/mms_named_variable_list_service.c b/src/mms/iso_mms/server/mms_named_variable_list_service.c +index 3a27061c..3365f771 100644 +--- a/src/mms/iso_mms/server/mms_named_variable_list_service.c ++++ b/src/mms/iso_mms/server/mms_named_variable_list_service.c +@@ -140,6 +140,12 @@ mmsServer_handleDeleteNamedVariableListRequest(MmsServerConnection connection, + mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_INVALID_PDU, response); + goto exit_function; + } ++ ++ if (request->listOfVariableListName == NULL) ++ { ++ mmsMsg_createMmsRejectPdu(&invokeId, MMS_ERROR_REJECT_INVALID_PDU, response); ++ goto exit_function; ++ } + + long scopeOfDelete = DeleteNamedVariableListRequest__scopeOfDelete_specific; +meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.3.bb +0
-0meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.3.bb SRCREV = "6f557c490f0b46ab5d7ef1b01bb3bc9fab3f442f" · line 24
Quoted 9 lines
meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.3.bb +2
-1@@ -17,7 +17,8 @@ SRCREV = "6f557c490f0b46ab5d7ef1b01bb3bc9fab3f442f" SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.5;protocol=https \ file://0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch \ - file://0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \ + file://0002-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \ + file://0003-LIB61850-430-fixed-null-pointer-dereference-in-mmsSe.patch \ " S = "${WORKDIR}/git"-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#120420): https://lists.openembedded.org/g/openembedded-devel/message/120420
Mute This Topic: https://lists.openembedded.org/mt/115666831/6084445
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-