SEC Consult Vulnerability Lab Security Advisory < 20241125-0 > ======================================================================= title: Unlocked JTAG interface and buffer overflow product: Siemens SM-2558 Protocol Element (extension module for Siemens SICAM AK3/TM/BC), Siemens CP-2016 & CP-2019 vulnerable version: JTAG: Unknown HW revision, Zynq Firmware Version 10A45 Buffer overflow: 500 Internal Server Error

Internal Server Error

Sorry, an unexpected internal server error occurred while processing your request.

Pseudocode of vulnerable function: [...] sessiond_id = (char *)get_http_header(a1, (int)"Session-ID"); <<<<<<<<<<<<<<<< session_id is extracted from HTTP request if ( !sessiond_id ) goto LABEL_194; if ( unk_51CD1C ) { v11 = 0; } else { sub_3DB0E4((unsigned int)byte_51CD08, (unsigned int)sessiond_id, 0x14u); v11 = 1; } if ( sub_15332C() == 1 ) { v134 = 0; if ( sub_155BC4(a1, (int)v133) || !v134 ) { LABEL_49: sequence_id = get_http_header_int(a1, "Sequence-ID"); sprintf( <<<<<<<<<<<<<<<< response_buffer overflows here response_buffer, "HTTP/1.1 200 OK\r\n" "Server: %s\r\n" "Version: %u\r\n" "Session-ID: %s\r\n" "Sequence-ID: %lu\r\n" "Content-Type: text/plain\r\n" "Content-Length: 0\r\n" "\r\n", "SICAM 1703", 1, sessiond_id, sequence_id); [...] Vulnerable / tested versions: ----------------------------- The following version has been tested which was the latest version available at the time of the test: - Webserver that runs on Firmware Version 10A45 of the Zynq FPGA. - The Hardware revision of the device was unknown. According to the vendor, the following firmware versions for the SM-2558 are affected by CVE-2024-31484: * ETA4 Ethernet Interface IEC60870-5-104: All versions < V10.46 * ETA5 Ethernet Int. 1x100TX IEC61850 Ed.2: All versions < V03.27 Note that the same vulnerability exists as well in other products' firmware versions, namely: * CPCX26 Central Processing/Communication for CP-2016: All versions < V06.02 * PCCX26 Ax 1703 PE, Contr, Communication Element for CP-2019: All versions < V06.05 Vendor contact timeline: ------------------------ 2024-03-05: Contacting vendor through productcert@siemens.com 2024-03-06: Siemens tracks this as #22436 2024-04-03: Requested status update. 2024-04-03: Siemens can reproduce vulnerabilities and will evaluate buffer overflow. Hardware is EOL, no fix for the JTAG issue. 2024-06-11: Siemens publishes SSA-620338 and confirms the buffer overflow. 2024-07 - 2024-09: Various vacation / absences, delaying advisory coordination. 2024-10-22: Meeting with ProductCERT, discussing release of SM-2558 advisory. 2024-10-31: Sending advisory draft to ProductCERT. 2024-11-14: Receiving feedback on advisory draft. 2024-11-19: Sending updated advisory to ProductCERT. 2024-11-25: Coordinated release of advisory. Solution: --------- The vendor provides patches for the affected devices / components to fix CVE-2024-31484: * ETA4 for SM-2558: Upgrade to V10.46 * ETA5 for SM-2558: Upgrade to V03.27 * CPCX26 for CP-2016: Upgrade to V06.02 * PCCX26 for CP-2019: Upgrade to V06.05 More detailed information can be found in the Siemens Security Advisory SSA-620338: https://cert-portal.siemens.com/productcert/html/ssa-620338.html The hardware (SM-2558) is considered end of life (EOL), thus no new version with a fixed JTAG will be released. Restrict physical access to the device. Workaround: ----------- Make sure to strictly limit physical access to the PLCs containing the protocol element during and also after its life cycle. Advisory URL: ------------- https://sec-consult.com/vulnerability-lab/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SEC Consult Vulnerability Lab An integrated part of SEC Consult, an Eviden business Europe | Asia About SEC Consult Vulnerability Lab The SEC Consult Vulnerability Lab is an integrated part of SEC Consult, an Eviden business. It ensures the continued knowledge gain of SEC Consult in the field of network and application security to stay ahead of the attacker. The SEC Consult Vulnerability Lab supports high-quality penetration testing and the evaluation of new offensive and defensive technologies for our customers. Hence our customers obtain the most current information about vulnerabilities and valid recommendation about the risk profile of new technologies. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Interested to work with the experts of SEC Consult? Send us your application https://sec-consult.com/career/ Interested in improving your cyber security with the experts of SEC Consult? Contact our local offices https://sec-consult.com/contact/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mail: security-research at sec-consult dot com Web: https://www.sec-consult.com Blog: https://blog.sec-consult.com Twitter: https://twitter.com/sec_consult EOF Constantin Schieber-Knöbl, Stefan Viehböck / @2024