SIMATIC S7-1500 CPU 1518-4 PN/DP MFP: Double Free
CVE-2022-40304 is a high-severity double free vulnerability in SIMATIC S7-1500 CPU 1518-4 PN/DP MFP from Siemens, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. The record lists version V3.1.5 as the first without the flaw, so updating SIMATIC S7-1500 CPU 1518-4 PN/DP MFP to that release or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 5.81% chance of exploitation within 30 days, which is in the top 6.74% of all scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update SIMATIC S7-1500 CPU 1518-4 PN/DP MFP to V3.1.5 or a later version.
- Update SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP to V3.1.5 or a later version.
- Update SIPLUS S7-1500 CPU 1518-4 PN/DP MFP to V3.1.5 or a later version.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | V3.1.0 up to, but not including, V3.1.5 | V3.1.5 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | V3.1.0 up to, but not including, V3.1.5 | V3.1.5 |
| Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | V3.1.0 up to, but not including, V3.1.5 | V3.1.5 |
| Xmlsoft | Libxml2 | before 2.10.3 | 2.10.3 |
| NetApp | Active Iq Unified Manager | Not specified in the record | Not stated |
| NetApp | Clustered Data Ontap | Not specified in the record | Not stated |
| NetApp | Clustered Data Ontap Antivirus Connector | Not specified in the record | Not stated |
| NetApp | Manageability Software Development Kit | Not specified in the record | Not stated |
| NetApp | Smi-s Provider | Not specified in the record | Not stated |
| NetApp | Snapmanager | Not specified in the record | Not stated |
| NetApp | H300s Firmware | Not specified in the record | Not stated |
| NetApp | H500s Firmware | Not specified in the record | Not stated |
| NetApp | H700s Firmware | Not specified in the record | Not stated |
| NetApp | H410s Firmware | Not specified in the record | Not stated |
| NetApp | H410c Firmware | Not specified in the record | Not stated |
| Apple | iPadOS | before 15.7.2 | 15.7.2 |
| Apple | Iphone OS | before 15.7.2 | 15.7.2 |
| Apple | macOS | 11.0 up to, but not including, 11.7.2; 12.0 up to, but not including, 12.6.2 | 11.7.2, 12.6.2 |
| Apple | tvOS | before 16.2 | 16.2 |
| Apple | watchOS | before 9.2 | 9.2 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | NVD |
| CVSS 3.1 | 7.8 | High | CISA (ADP) |
Official description
An issue was discovered in libxml2 before 2.10.3. Certain invalid XML entity definitions can corrupt a hash table key, potentially leading to subsequent logic errors. In one case, a double-free can be provoked.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Double Free
The product calls free() twice on the same memory address.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- Ensure that each allocation is freed only once. After freeing a chunk, set the pointer to NULL to ensure the pointer cannot be freed again. In complicated error conditions, be sure that clean-up routines respect the state of allocation properly. If the language is object oriented, ensure that object destructors delete each chunk of memory only once.
- Use a static analysis tool to find double free instances.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- gitlab.gnome.org/GNOME/libxml2/-/commit/1b41ec4e9433b05bb0376be4725804c54ef1d80bThird Party Advisory
- gitlab.gnome.org/GNOME/libxml2/-/tagsRelease Notes, Third Party Advisory
- gitlab.gnome.org/GNOME/libxml2/-/tags/v2.10.3Release Notes, Third Party Advisory
Third-party and government advisories
- seclists.org/fulldisclosure/2022/Dec/21Mailing List, Third Party Advisory
- seclists.org/fulldisclosure/2022/Dec/24Mailing List, Third Party Advisory
- seclists.org/fulldisclosure/2022/Dec/25Mailing List, Third Party Advisory
- seclists.org/fulldisclosure/2022/Dec/26Mailing List, Third Party Advisory
- security.netapp.com/advisory/ntap-20221209-0003/Third Party Advisory
- support.apple.com/kb/HT213531Third Party Advisory
- support.apple.com/kb/HT213533Third Party Advisory
- support.apple.com/kb/HT213534Third Party Advisory
- support.apple.com/kb/HT213535Third Party Advisory
- support.apple.com/kb/HT213536Third Party Advisory
Other references
- seclists.org/fulldisclosure/2022/Dec/27
- cert-portal.siemens.com/productcert/html/ssa-337522.html
- cert-portal.siemens.com/productcert/html/ssa-341067.html
- cert-portal.siemens.com/productcert/html/ssa-398330.html
- cert-portal.siemens.com/productcert/html/ssa-556635.html
- cert-portal.siemens.com/productcert/html/ssa-625862.html
- cert-portal.siemens.com/productcert/html/ssa-769027.html
Other vulnerabilities in SIMATIC S7-1500 CPU 1518-4 PN/DP MFP
- 9.6 Critical severity
- 9.6 Critical severity
- 9.6 Critical severity
- 7.8 High severity
- 7.1 High severity
- 9.1 Critical severity
Recent Double Free vulnerabilities
- 7.8 High severity
- 8.1 High severity
- 7.8 High severity
- 9.8 Critical severity
- 7.8 High severity
- 9.8 Critical severity
Spotted an error? Tell us.