Full Report
OpenSSL has published a security advisory [0] about a vulnerability in OpenSSL versions 1.1.1 Siemens has released updates for several affected products and recommends to update to the latest versions. Siemens is preparing further updates and recommends countermeasures for products where updates are not, or not yet available. [0] https://www.openssl.org/news/secadv/20210824.txt
Analysis Summary
# Vulnerability: OpenSSL SM2 Decryption Buffer Overflow and Certificate Validation Flaws
## CVE Details
* **CVE ID:** CVE-2021-3711 (Primary), CVE-2021-3712
* **CVSS Score:** 8.1 (High) / 7.4 (High)
* **CWE:** CWE-120 (Buffer Overflow), CWE-125 (Out-of-bounds Read)
## Affected Systems
* **Products:** OpenSSL and integrated Siemens products (including industrial controllers, communication modules, and management software).
* **Versions:**
* OpenSSL 1.1.1 prior to 1.1.1l
* OpenSSL 1.0.2 prior to 1.0.2za (Premium support only)
* **Configurations:** Systems utilizing SM2 decryption or processing specifically crafted X.509 certificates.
## Vulnerability Description
The primary vulnerability (CVE-2021-3711) is a heap-based buffer overflow in the implementation of the SM2 decryption algorithm. An attacker can provide SM2 encrypted data that, when decrypted, overflows a buffer by up to 62 bytes with attacker-controlled data.
The secondary flaw (CVE-2021-3712) involves an out-of-bounds read when processing ASN.1 strings that are not NUL-terminated. This can occur during the display of certificate details, potentially leading to a crash (DoS) or the disclosure of private memory contents.
## Exploitation
* **Status:** PoC available; no widespread exploitation in the wild reported at the time of advisory.
* **Complexity:** Medium
* **Attack Vector:** Network (Remote)
## Impact
* **Confidentiality:** High (Potential disclosure of private memory/keys)
* **Integrity:** High (Potential for code execution via buffer overflow)
* **Availability:** High (Denial of Service via application crash)
## Remediation
### Patches
* **OpenSSL:** Upgrade to OpenSSL 1.1.1l or 1.0.2za.
* **Siemens Products:** Refer to the specific Siemens security advisory for product-specific firmware updates. Users should apply updates to affected PLCs, HMI panels, and IPCs as they become available.
### Workarounds
* Disable the use of SM2 algorithms if not strictly required by the environment.
* Restrict network access to affected devices to trusted administrative traffic only.
* Implement defense-in-depth by placing affected industrial components behind firewalls.
## Detection
* **Indicators of Compromise:** Unusual application crashes in services utilizing OpenSSL; unexpected memory spikes.
* **Detection methods and tools:** Use vulnerability scanners (e.g., Nessus, OpenVAS) to identify outdated OpenSSL libraries. Monitor system logs for segmentation faults in crypto-reliant services.
## References
* OpenSSL Security Advisory: hxxps[://]www[.]openssl[.]org/news/secadv/20210824[.]txt
* Siemens Security Advisory: hxxps[://]cert-portal[.]siemens[.]com/
* NVD - CVE-2021-3711: hxxps[://]nvd[.]nist[.]gov/vuln/detail/CVE-2021-3711