Bugzilla – Bug 1179907
VUL-0: AMENSIA:33 various issues in embedded IP stacks
Last modified: 2020-12-11 13:51:02 UTC
https://www.forescout.com/research-labs/amnesia33/ https://kb.cert.org/vuls/id/815128 Embedded TCP/IP stacks have memory corruption vulnerabilities Vulnerability Note VU#815128 Original Release Date: 2020-12-08 | Last Revised: 2020-12-09 Overview Multiple open-source embedded TCP/IP stacks, commonly used in Internet of Things (IoT) and embedded devices, have several vulnerabilities stemming from improper memory management. These vulnerabilities are also tracked as ICS-VU-633937 and JVNVU#96491057 as well as the name AMNESIA:33. Description Embedded TCP/IP stacks provide essential network communication capability using TCP/IP networking to many lightweight operating systems adopted by IoT and other embedded devices. These software stacks can also be used in the latest technologies such as Edge Computing. The following embedded TCP/IP stacks were discovered to have 33 memory related vulnerabilities included in this advisory: uIP: https://github.com/adamdunkels/uip Contiki-OS and Contiki-NG: https://www.contiki-ng.org/ PicoTCP and PicoTCP-NG: http://picotcp.altran.be FNET: http://fnet.sourceforge.net/ Nut/OS: http://www.ethernut.de/en/software/ These networking software stacks can be integrated in various ways, including compiled from source, modified and integrated, and linked as a dynamic or static libraries, allowing for a wide variety of implementations. As an example, projects such as Apache Nuttx and open-iscsi have adopted common libraries and software modules, thus inheriting some of these vulnerabilities with varying levels of impact. The diversity of implementations and the lack of supply chain visibility has made it difficult to accurately assess the impact, usage as well as the potential exploitability of these vulnerabilities. In general, most of these vulnerabilities are caused by memory management bugs, commonly seen in lightweight software implementations in Real Time Operating Systems (RTOS) and IoT devices. For specific details on these vulnerabilities, see the Forescout advisory that provides technical details. Impact The impact of these vulnerabilities vary widely due to the combination of build and runtime options customized while including these in embedded devices. In summary, a remote, unauthenticated attacker may be able to use specially-crafted network packets to cause the vulnerable device to behave in unexpected ways such as a failure (denial of service), disclosure of private information, or execution of arbitrary code. Solution Apply updates Update to the latest stable version of the affected embedded TCP/IP software that address these recently disclosed vulnerabilities. If you have adopted this software from an upstream provider, contact the provider to get appropriate updates that need to be integrated into your software. Concerned end-users of IoT and embedded devices that implement these vulnerable TCP/IP software stacks should contact their vendor or the closest reseller to obtain appropriate updates. Follow best-practices We recommend that you follow best practices when connecting IoT or embedded devices to a network: Avoid exposure of IoT and embedded devices directly over the Internet and use a segmented network zone when available. Enable security features such as deep-packet inspection and firewall anomaly detection when available to protect embedded and IoT devices. Ensure secure defaults are adopted and disable unused features and services on your embedded devices. Regularly update firmware to the vendor provided latest stable version to ensure your device is up to date. Acknowledgements Jos Wetzels, Stanislav Dashevskyi, Amine Amri and Daniel dos Santos of Forescout Technologies researched and reported these vulnerabilities. This document was written by Vijay Sarvepalli.
https://de.tenable.com/blog/amnesia33-researchers-disclose-33-vulnerabilities-tcpip-libraries-uip-fnet-picotcp-nutnet Background On December 8, researchers at Forescout published a report for 33 vulnerabilities that reportedly impact millions of devices. Dubbed AMNESIA:33, the vulnerabilities exist within four open TCP/IP libraries that are embedded in a number of Operational Technology (OT) and Internet of Things (IoT) devices as well as routers and printers. The four TCP/IP libraries affected by AMNESIA:33 include: uIP (integrated into Continki) FNET picoTCP Ethernut (Nut/Net) Forescout estimates over 150 vendors that have implemented these libraries are affected by AMNESIA:33. Additionally, the Cybersecurity and Infrastructure Security Agency (CISA) issued its own advisory for AMNESIA:33. The 33 vulnerabilities include mostly Denial of Service and Information Leak vulnerabilities along with multiple remote code execution (RCE) flaws. Analysis The following is a breakdown of the 33 vulnerabilities, including the affected library, vulnerability type, common weakness enumeration, impact and CVSSv3 scores. CVE Affected Library Vulnerability Type Common Weakness Enumeration Impact CVSSv3 CVE-2020-13984 uIP Infinite Loop CWE-835 Denial of Service 7.5 CVE-2020-13985 uIP Integer Wraparound CWE-190 Denial of Service 7.5 CVE-2020-13986 uIP Integer Loop CWE-835 Denial of Service 7.5 CVE-2020-13987 uIP Out-of-Bounds Read CWE-125 Denial of Service, Information Leak 8.2 CVE-2020-13988 uIP Integer Overflow CWE-190 Denial of Service 7.5 CVE-2020-17437 uIP Out-of-Bounds Write CWE-787 Denial of Service 8.2 CVE-2020-17438 uIP Out-of-Bounds Write CWE-787 Denial of Service 7 CVE-2020-17439 uIP Improper Input Validation CWE-20 DNS Cache Poisoning 8.1 CVE-2020-17440 uIP Improper Input Validation CWE-20 Denial of Service 7.5 CVE-2020-24334 uIP Out-of-Bounds Read CWE-125 Denial of Service 8.2 CVE-2020-24335 uIP Out-of-Bounds Read CWE-125 Denial of Service 7.5 CVE-2020-24336 uIP Out-of-Bounds Read CWE-125 Remote Code Execution 9.8 CVE-2020-25112 uIP Out-of-Bounds Write CWE-787 Remote Code Execution 8.1 CVE-2020-17441 picoTCP Improper Input Valiation CWE-20 Denial of Service, Information Leak 7.5 CVE-2020-17442 picoTCP Integer Overflow CWE-190 Denial of Service 7.5 CVE-2020-17443 picoTCP Integer Overflow CWE-190 Denial of Service 8.2 CVE-2020-17444 picoTCP Out-of-Bounds Read CWE-125 Denial of Service 7.5 CVE-2020-17445 picoTCP Out-of-Bounds Read CWE-125 Denial of Service 7.5 CVE-2020-24337 picoTCP Infinite Loop CWE-835 Denial of Service 7.5 CVE-2020-24338 picoTCP Out-of-Bounds Write CWE-787 Remote Code Execution 9.8 CVE-2020-24339 picoTCP Out-of-Bounds Read CWE-125 Denial of Service 7.5 CVE-2020-24340 picoTCP Out-of-Bounds Read CWE-125 Denial of Service, Information Leak 8.2 CVE-2020-24341 picoTCP Out-of-Bounds Read CWE-125 Denial of Service, Information Leak 8.2 CVE-2020-17467 FNET Out-of-Bounds Read CWE-125 Information Leak 8.2 CVE-2020-17468 FNET Out-of-Bounds Read CWE-125 Denial of Service 7.5 CVE-2020-17469 FNET Out-of-Bounds Read CWE-125 Denial of Service 5.9 CVE-2020-17470 FNET Improper Input Validation CWE-20 DNS Cache Poisoning 4 CVE-2020-24383 FNET Improper Null Termination CWE--170 Denial of Service, Information Leak 6.5 CVE-2020-25107 Nut/Net Out-of-Bounds Read CWE-125 Denial of Service 7.5 CVE-2020-25108 Nut/Net Out-of-Bounds Write CWE-787 Denial of Service 7.5 CVE-2020-25109 Nut/Net Out-of-Bounds Read CWE-125 Denial of Service 8.2 CVE-2020-25110 Nut/Net Out-of-Bounds Read CWE-125 Denial of Service 8.2 CVE-2020-25111 Nut/Net Out-of-Bounds Write CWE-787 Remote Code Execution 9.8 Remote Code Execution Three out of the four TCP/IP libraries are affected by a RCE vulnerability, which means attackers could potentially execute code and gain full control over the devices. CVE-2020-24336 is an out-of-bounds read vulnerability in the way the uIP library parses DNS records, as it does not perform any validation of the length field in the response, which could result in memory corruption. CVE-2020-24338 is an out-of-bounds write vulnerability in the way the picoTCP library parses the domain name within DNS packets. Unlike CVE-2020-24336, which occurs when the uIP library attempts to read past the allocated memory buffer, CVE-2020-24338 occurs when the picoTCP library attempts to write past the allocated memory buffer, which could also result in memory corruption. CVE-2020-25111 is an out-of-bounds write vulnerability in the Ethernut (Nut/Net) library due to multiple issues in the way the DNS handles queries and responses and lacks proper checks on null termination, data lengths and the number of queries and responses. Because of the lack of checks, these queries and responses may attempt to write past the allocated memory buffer, resulting in memory corruption. DNS Cache Poisoning In addition to the three RCE vulnerabilities outlined above, two of the libraries, uIP and FNET, are affected by DNS Cache Poisoning attacks. These are attacks that target the DNS cache, which stores requests made to certain resources locally to reduce latency. If an attacker is able to poison the cache, the next time a request is made to a legitimate resource (e.g. google.com), it would redirect the requester to a malicious resource (e.g. badwebsite.com) instead. Denial of Service and Information Leak The remaining flaws are primarily Denial of Service or Information Leak vulnerabilities. Following in the footsteps of Ripple20 and URGENT/11 AMNESIA:33 follows in the footsteps of Ripple20 (disclosed in 2020) and URGENT/11 (disclosed in 2019). Ripple20 is a set of 19 vulnerabilities in the TCP/IP library created by Treck, while URGENT/11 is a set of 11 vulnerabilities in VxWorks, a Real-Time Operating System (RTOS). Like AMNESIA:33, Ripple20 and URGENT/11 each reportedly affected millions of OT, IoT and IT devices. Proof of concept A section of the AMNESIA:33 report includes a proof-of-concept (PoC) for exploiting one of the three RCE vulnerabilities, CVE-2020-25111. At this time, no other PoCs have been shared publicly for the remaining vulnerabilities. Solution The researchers coordinated with the ICS-CERT and CERT/CC along with the Github Security team to attempt to address these vulnerabilities. According to the report, the following subset of the libraries received patches: TCP/IP Library Fixed Version FNET 4.7.0 and later uIP-Contiki-NG 4.6.0 and later picoTCP-NG Contact for update Nut/Net 5.1 and later Additionally, open-iscsi, which implements some uIP code in its stack, has issued its own patches for it. However, the original versions of uIP, Contiki and picoTCP did not receive patches as they have reached end-of-life. CISA shares advisories from 13 vendors In its own advisory, CISA shared advisories from the following 13 vendors that have implemented these TCP/IP libraries into their products: Devolo EMU Electronic AG FEIG Genetec Harting Hensoldt Microchip Nanotec NT-Ware Tagmaster Siemens Uniflow Yanzi Networks Lessons learned from Ripple20 and URGENT/11 One of the overarching lessons learned from the disclosures of Ripple20 and URGENT11 is that the broad usage of open source TCP/IP libraries across a number of devices means that these vulnerabilities will persist for quite some time. The researchers collaborate with entities like ICS-CERT and the CERT Coordination Center (CERT/CC) to aid in the identification and notification process, but this is an extensive process. Knowing which devices are impacted will be a continuous effort, but if you’re a vendor that has implemented one of these libraries, it is imperative that you seek out the developers of those libraries and implement these patched versions immediately to protect your customers. Identifying affected systems Tenable is working to implement product coverage for the AMNESIA:33 vulnerabilities across our suite of products, including Tenable.ot. A list of Tenable plugins to identify these vulnerabilities will appear here as they’re released.
CVE-2020-24336: uIP RCE IPv4toIPV6 domain name decoding function `ip64-dns64.c:ip64_dns64_4to6()` This code is not in the uip copy in open-iscsi -> not affected by this CVE.
The picoTCP , FNET, Nut/Net IP stacks are not shipped by SUSE or openSUSE. -> Not affected bny those CVEs. A stripped down older version of uIP is embedded in open-iscsi, only some CVEs affect open-iscsi.
According to the researchers only these 4 CVEs affect open-iscsi: CVE-2020-13988 CVE-2020-13987 CVE-2020-17438 CVE-2020-17437