CVE-2022-36063: CWE-121: Stack-based Buffer Overflow in azure-rtos usbx
Azure RTOS USBx is a USB host, device, and on-the-go (OTG) embedded stack, fully integrated with Azure RTOS ThreadX and available for all Azure RTOS ThreadX–supported processors. Azure RTOS USBX implementation of host support for USB CDC ECM includes an integer underflow and a buffer overflow in the `_ux_host_class_cdc_ecm_mac_address_get` function which may be potentially exploited to achieve remote code execution or denial of service. Setting mac address string descriptor length to a `0` or `1` allows an attacker to introduce an integer underflow followed (string_length) by a buffer overflow of the `cdc_ecm -> ux_host_class_cdc_ecm_node_id` array. This may allow one to redirect the code execution flow or introduce a denial of service. The fix has been included in USBX release [6.1.12](https://github.com/azure-rtos/usbx/releases/tag/v6.1.12_rel). Improved mac address string descriptor length validation to check for unexpectedly small values may be used as a workaround.
AI Analysis
Technical Summary
CVE-2022-36063 is a stack-based buffer overflow vulnerability identified in the Azure RTOS USBX component, specifically within the USB host support for the USB CDC ECM (Communications Device Class Ethernet Control Model) implementation. Azure RTOS USBX is an embedded USB stack integrated with Azure RTOS ThreadX, widely used in embedded devices across various industries. The vulnerability arises from improper handling of the MAC address string descriptor length in the function `_ux_host_class_cdc_ecm_mac_address_get`. When the MAC address string descriptor length is set to an unexpectedly small value such as 0 or 1, it triggers an integer underflow due to insufficient validation. This underflow subsequently leads to a buffer overflow in the `cdc_ecm->ux_host_class_cdc_ecm_node_id` array on the stack. Exploitation of this vulnerability could allow an attacker to overwrite the stack, potentially redirecting code execution flow or causing a denial of service (DoS) by crashing the system. The vulnerability affects all versions of USBX prior to 6.1.12, where the issue has been addressed by improved validation of the MAC address string descriptor length. No known exploits have been reported in the wild to date. The vulnerability is classified under CWE-121 (stack-based buffer overflow) and CWE-191 (integer underflow), indicating a critical memory corruption flaw triggered by arithmetic errors in input validation. Given the embedded nature of USBX and its integration with ThreadX, this vulnerability is particularly relevant for embedded systems that rely on USB CDC ECM functionality for network communication over USB interfaces.
Potential Impact
For European organizations, the impact of this vulnerability depends largely on the deployment of embedded devices using Azure RTOS USBX with USB CDC ECM support. Potentially affected devices include industrial control systems, medical devices, IoT gateways, and network equipment that utilize USB-based Ethernet communication. Successful exploitation could lead to remote code execution, allowing attackers to gain control over the affected device, or cause denial of service, disrupting critical operations. This is particularly concerning for sectors such as manufacturing, healthcare, and critical infrastructure where embedded devices play a vital role. The ability to remotely exploit this vulnerability without authentication and with minimal user interaction increases the risk profile. Disruption or compromise of embedded devices could lead to operational downtime, data breaches, or serve as a foothold for lateral movement within networks. Given the increasing reliance on embedded systems in European industrial and critical infrastructure environments, this vulnerability poses a tangible risk to operational continuity and security.
Mitigation Recommendations
1. Immediate upgrade to USBX version 6.1.12 or later to apply the official patch that includes improved validation of the MAC address string descriptor length. 2. For organizations unable to upgrade immediately, implement a workaround by adding strict validation checks on the MAC address string descriptor length to reject values of 0 or 1 before processing. 3. Conduct an inventory of embedded devices using Azure RTOS USBX with USB CDC ECM support to identify potentially vulnerable systems. 4. Employ network segmentation and strict access controls to limit exposure of embedded devices to untrusted networks, reducing the attack surface. 5. Monitor USB traffic and device behavior for anomalies indicative of exploitation attempts, such as unexpected USB device descriptors or crashes. 6. Collaborate with device manufacturers and vendors to ensure timely updates and patches are applied to embedded products in use. 7. Incorporate this vulnerability into vulnerability management and incident response plans, preparing for potential exploitation scenarios.
Affected Countries
Germany, France, United Kingdom, Italy, Netherlands, Sweden, Finland, Poland, Belgium, Spain
CVE-2022-36063: CWE-121: Stack-based Buffer Overflow in azure-rtos usbx
Description
Azure RTOS USBx is a USB host, device, and on-the-go (OTG) embedded stack, fully integrated with Azure RTOS ThreadX and available for all Azure RTOS ThreadX–supported processors. Azure RTOS USBX implementation of host support for USB CDC ECM includes an integer underflow and a buffer overflow in the `_ux_host_class_cdc_ecm_mac_address_get` function which may be potentially exploited to achieve remote code execution or denial of service. Setting mac address string descriptor length to a `0` or `1` allows an attacker to introduce an integer underflow followed (string_length) by a buffer overflow of the `cdc_ecm -> ux_host_class_cdc_ecm_node_id` array. This may allow one to redirect the code execution flow or introduce a denial of service. The fix has been included in USBX release [6.1.12](https://github.com/azure-rtos/usbx/releases/tag/v6.1.12_rel). Improved mac address string descriptor length validation to check for unexpectedly small values may be used as a workaround.
AI-Powered Analysis
Technical Analysis
CVE-2022-36063 is a stack-based buffer overflow vulnerability identified in the Azure RTOS USBX component, specifically within the USB host support for the USB CDC ECM (Communications Device Class Ethernet Control Model) implementation. Azure RTOS USBX is an embedded USB stack integrated with Azure RTOS ThreadX, widely used in embedded devices across various industries. The vulnerability arises from improper handling of the MAC address string descriptor length in the function `_ux_host_class_cdc_ecm_mac_address_get`. When the MAC address string descriptor length is set to an unexpectedly small value such as 0 or 1, it triggers an integer underflow due to insufficient validation. This underflow subsequently leads to a buffer overflow in the `cdc_ecm->ux_host_class_cdc_ecm_node_id` array on the stack. Exploitation of this vulnerability could allow an attacker to overwrite the stack, potentially redirecting code execution flow or causing a denial of service (DoS) by crashing the system. The vulnerability affects all versions of USBX prior to 6.1.12, where the issue has been addressed by improved validation of the MAC address string descriptor length. No known exploits have been reported in the wild to date. The vulnerability is classified under CWE-121 (stack-based buffer overflow) and CWE-191 (integer underflow), indicating a critical memory corruption flaw triggered by arithmetic errors in input validation. Given the embedded nature of USBX and its integration with ThreadX, this vulnerability is particularly relevant for embedded systems that rely on USB CDC ECM functionality for network communication over USB interfaces.
Potential Impact
For European organizations, the impact of this vulnerability depends largely on the deployment of embedded devices using Azure RTOS USBX with USB CDC ECM support. Potentially affected devices include industrial control systems, medical devices, IoT gateways, and network equipment that utilize USB-based Ethernet communication. Successful exploitation could lead to remote code execution, allowing attackers to gain control over the affected device, or cause denial of service, disrupting critical operations. This is particularly concerning for sectors such as manufacturing, healthcare, and critical infrastructure where embedded devices play a vital role. The ability to remotely exploit this vulnerability without authentication and with minimal user interaction increases the risk profile. Disruption or compromise of embedded devices could lead to operational downtime, data breaches, or serve as a foothold for lateral movement within networks. Given the increasing reliance on embedded systems in European industrial and critical infrastructure environments, this vulnerability poses a tangible risk to operational continuity and security.
Mitigation Recommendations
1. Immediate upgrade to USBX version 6.1.12 or later to apply the official patch that includes improved validation of the MAC address string descriptor length. 2. For organizations unable to upgrade immediately, implement a workaround by adding strict validation checks on the MAC address string descriptor length to reject values of 0 or 1 before processing. 3. Conduct an inventory of embedded devices using Azure RTOS USBX with USB CDC ECM support to identify potentially vulnerable systems. 4. Employ network segmentation and strict access controls to limit exposure of embedded devices to untrusted networks, reducing the attack surface. 5. Monitor USB traffic and device behavior for anomalies indicative of exploitation attempts, such as unexpected USB device descriptors or crashes. 6. Collaborate with device manufacturers and vendors to ensure timely updates and patches are applied to embedded products in use. 7. Incorporate this vulnerability into vulnerability management and incident response plans, preparing for potential exploitation scenarios.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-07-15T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9849c4522896dcbf68e6
Added to database: 5/21/2025, 9:09:29 AM
Last enriched: 6/21/2025, 11:41:45 PM
Last updated: 8/1/2025, 6:20:43 AM
Views: 13
Related Threats
CVE-2025-55161: CWE-918: Server-Side Request Forgery (SSRF) in Stirling-Tools Stirling-PDF
HighCVE-2025-25235: CWE-918 Server-Side Request Forgery (SSRF) in Omnissa Secure Email Gateway
HighCVE-2025-55151: CWE-918: Server-Side Request Forgery (SSRF) in Stirling-Tools Stirling-PDF
HighCVE-2025-55150: CWE-918: Server-Side Request Forgery (SSRF) in Stirling-Tools Stirling-PDF
HighCVE-2025-54992: CWE-611: Improper Restriction of XML External Entity Reference in telstra open-kilda
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.