Siemens SCALANCE XCM332
As of January 10, 2023, CISA will no longer be updating ICS security advisories for Siemens product vulnerabilities beyond the initial advisory. For the most up-to-date information on vulnerabilities in this advisory, please see Siemens' ProductCERT Security Advisories (CERT Services | Services | Siemens Global).
1. EXECUTIVE SUMMARY
- CVSS v3 9.8
- ATTENTION: Exploitable remotely/low attack complexity
- Vendor: Siemens
- Equipment: SCALANCE XCM332
- Vulnerabilities: Allocation of Resources Without Limits or Throttling, Use After Free, Concurrent Execution Using Shared Resource with Improper Synchronization ('Race Condition'), Incorrect Default Permissions, Out-of-bounds Write, and Improper Validation of Syntactic Correctness of Input
2. RISK EVALUATION
Successful exploitation of these vulnerabilities could cause a denial-of-service condition, code execution, data injection, and allow unauthorized access.
3. TECHNICAL DETAILS
3.1 AFFECTED PRODUCTS
The following software from Siemens is affected:
- SCALANCE XCM332 (6GK5332-0GA01-2AC2): Versions prior to 2.2
3.2 VULNERABILITY OVERVIEW
In versions of libtirpc prior to 1.3.3rc1, remote attackers could exhaust the file descriptors of a process using libtirpc due to mishandling of idle TCP connections. This could lead to an svc_run infinite loop without accepting new connections.
3.2.2 USE AFTER FREE CWE-416
Linux Kernel could allow a local attacker to leverage a concurrency use-after-free flaw in the bad_flp_intr function to execute arbitrary code. By executing a specially-crafted program, an attacker could exploit this vulnerability to execute arbitrary code or cause a denial-of-service condition on the system.
A race condition was found the Linux kernel in perf_event_open() which can be exploited by an unprivileged user to gain root privileges. The bug allows to build several exploit primitives, such as kernel address information leak and arbitrary execution.
3.2.4 USE AFTER FREE CWE-416
A use-after-free in Busybox 1.35-x's awk applet leads to a denial-of-service condition and possible code execution when processing a crafted awk pattern in the copyvar function.
A malicious server can serve excessive amounts of "Set-Cookie:" headers in a HTTP response to curl and curl < 7.84.0, which stores all of them. A sufficiently large amount of cookies could make subsequent HTTP requests to this, or other servers to which the cookies match, create requests larger than the threshold curl uses internally to avoid sending excessively large requests (1048576 bytes), and instead returns an error. This denial state might remain for as long as the same cookies are kept, match, and haven't expired. Due to cookie matching rules, a server on "foo.example.com" can set cookies that also would match for "bar.example.com", making it possible for a "sister server" to cause a denial-of-service condition for a sibling site on the same second level domain using this method.
Versions of curl < 7.84.0 support "chained" HTTP compression algorithms, where a server response can be compressed multiple times with potentially different algorithms. The number of acceptable "links" in this "decompression chain" was unbounded, allowing a malicious server to insert a virtually unlimited number of compression steps; this could result in a "malloc bomb," making curl spend enormous amounts of allocated heap memory, or trying to, and returning out of memory errors.
When curl < 7.84.0 saves cookies, alt-svc, and hsts data to local files, it finalizes the operation with a rename from a temporary name to the final target file name, making the operation atomic. In this rename operation, these versions of curl might accidentally widen the permissions for the target file, leaving the updated file accessible to more users than intended.
When curl < 7.84.0 performs file transfer protocol (FTP) transfers secured by krb5, it does not handle message verification failures correctly; it is possible for a machine-in-the-middle attack to go unnoticed and allows injection of data into the client.
When curl is used to retrieve and parse cookies from a HTTP(S) server, it accepts cookies using control codes that, when are later sent back to a HTTP server, might make the server return 400 responses. This could allow a "sister site" to deny service to all sibling sites.
3.2.10 USE AFTER FREE CWE-416
Versions of libexpat before 2.4.9 have a use-after-free vulnerability in the doContent function in xmlparse.c.
- CRITICAL INFRASTRUCTURE SECTORS: Multiple
- COUNTRIES/AREAS DEPLOYED: Worldwide
- COMPANY HEADQUARTERS LOCATION: Germany
Siemens reported these vulnerabilities to CISA.
Siemens has released an update for the SCALANCE XCM332 and recommends updating to the latest version:
- SCALANCE XCM332 (6GK5332-0GA01-2AC2): Update to V2.2 or later version
As a general security measure, Siemens recommends protecting network access to devices with appropriate mechanisms. To operate the devices in a protected IT environment, Siemens recommends configuring the environment according to Siemens’ operational guidelines for industrial security and following the recommendations in the product manuals. Additional information on Industrial Security by Siemens can be found at the Siemens Industrial Security web page.
For further inquiries on security vulnerabilities in Siemens products and solutions, users should contact the Siemens ProductCERT.
CISA recommends users take defensive measures to minimize the risk of exploitation of this vulnerability these vulnerabilities. Specifically, users should:
- Minimize network exposure for all control system devices and/or systems, and ensure they are not accessible from the Internet.
- Locate control system networks and remote devices behind firewalls and isolate them from business networks.
- When remote access is required, use secure methods, such as Virtual Private Networks (VPNs), recognizing VPNs may have vulnerabilities and should be updated to the most current version available. Also recognize VPN is only as secure as its connected devices.
CISA reminds organizations to perform proper impact analysis and risk assessment prior to deploying defensive measures.
CISA also provides a section for control systems security recommended practices on the ICS webpage at cisa.gov/ics. Several CISA products detailing cyber defense best practices are available for reading and download, including Improving Industrial Control Systems Cybersecurity with Defense-in-Depth Strategies.
Additional mitigation guidance and recommended practices are publicly available on the ICS webpage at cisa.gov/ics in the technical information paper, ICS-TIP-12-146-01B--Targeted Cyber Intrusion Detection and Mitigation Strategies.
Organizations observing suspected malicious activity should follow established internal procedures and report findings to CISA for tracking and correlation against other incidents.
CISA also recommends users take the following measures to protect themselves from social engineering attacks:
- Do not click web links or open attachments in unsolicited email messages.
- Refer to Recognizing and Avoiding Email Scams for more information on avoiding email scams.
- Refer to Avoiding Social Engineering and Phishing Attacks for more information on social engineering attacks.
No known public exploits specifically target these vulnerabilities.