CVE-2022-29223: CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') in azure-rtos usbx
Azure RTOS USBX is a USB host, device, and on-the-go (OTG) embedded stack. In versions prior to 6.1.10, an attacker can cause a buffer overflow by providing the Azure RTOS USBX host stack a HUB descriptor with `bNbPorts` set to a value greater than `UX_MAX_TT` which defaults to 8. For a `bNbPorts` value of 255, the implementation of `ux_host_class_hub_descriptor_get` function will modify the contents of `hub` -> `ux_host_class_hub_device` -> `ux_device_hub_tt` array violating the end boundary by 255 - `UX_MAX_TT` items. The USB host stack needs to validate the number of ports reported by the hub, and if the value is larger than UX_MAX_TT, USB stack needs to reject the request. This fix has been included in USBX release 6.1.10.
AI Analysis
Technical Summary
CVE-2022-29223 is a classic buffer overflow vulnerability identified in the Azure RTOS USBX stack, specifically affecting versions prior to 6.1.10. Azure RTOS USBX is an embedded USB host, device, and OTG stack widely used in real-time operating systems for embedded devices. The vulnerability arises in the function ux_host_class_hub_descriptor_get, which processes the HUB descriptor provided by a USB hub device. The descriptor field bNbPorts indicates the number of ports on the hub. The USBX stack defines a maximum number of transaction translators (UX_MAX_TT), defaulting to 8. However, the vulnerable code does not validate if bNbPorts exceeds UX_MAX_TT. An attacker can supply a malicious HUB descriptor with bNbPorts set to a value significantly larger than UX_MAX_TT, for example 255, causing the function to write beyond the bounds of the ux_device_hub_tt array. This buffer overflow can corrupt adjacent memory, potentially leading to arbitrary code execution, denial of service, or system instability. The vulnerability is rooted in CWE-120, which is a failure to check input size before copying data into a buffer. The issue was addressed in USBX version 6.1.10 by adding proper validation to reject HUB descriptors with bNbPorts values exceeding UX_MAX_TT. No known exploits have been reported in the wild to date. The vulnerability affects embedded systems using the vulnerable USBX versions, which are often found in IoT devices, industrial control systems, and other embedded applications relying on USB connectivity. Exploitation requires an attacker to connect a malicious USB hub or device that can send crafted descriptors to the host stack. No authentication or user interaction beyond physical connection is required, making the attack vector plausible in environments where physical access is possible or where untrusted USB devices can be connected.
Potential Impact
For European organizations, the impact of this vulnerability depends on the deployment of embedded devices running vulnerable versions of Azure RTOS USBX. Critical infrastructure sectors such as manufacturing, energy, transportation, and healthcare often use embedded systems with USB connectivity. Exploitation could allow attackers to execute arbitrary code or cause denial of service on these devices, potentially disrupting operations or compromising safety systems. Given the physical nature of the attack vector, environments with less controlled physical access or supply chain exposure are at higher risk. The vulnerability could also be leveraged as a foothold for lateral movement within networks if compromised devices are connected to enterprise systems. Additionally, embedded devices in smart city infrastructure or industrial IoT deployments in Europe could be targeted, leading to broader operational disruptions. Although no exploits are currently known, the medium severity rating and the ease of triggering the overflow via USB descriptors warrant proactive mitigation to prevent future attacks. The confidentiality, integrity, and availability of affected embedded systems could be compromised, impacting organizational resilience and potentially causing regulatory compliance issues under European cybersecurity laws such as NIS2.
Mitigation Recommendations
1. Upgrade all Azure RTOS USBX stacks to version 6.1.10 or later, where the vulnerability is patched with proper input validation. 2. Implement strict USB device control policies to restrict or monitor the connection of unauthorized USB hubs or devices, especially in sensitive or critical environments. 3. Employ USB port lockdown mechanisms or hardware-based USB firewalls that can filter or block malformed USB descriptors. 4. Conduct regular firmware and software inventory audits to identify embedded devices running vulnerable USBX versions. 5. For devices that cannot be immediately updated, consider network segmentation and isolation to limit the impact of potential exploitation. 6. Monitor device logs and network traffic for anomalous USB activity indicative of attempts to exploit this vulnerability. 7. Collaborate with device vendors to ensure timely patching and to understand the deployment footprint of affected products. 8. Educate operational technology (OT) and embedded system administrators about the risks of connecting untrusted USB devices and enforce physical security controls to prevent unauthorized access.
Affected Countries
Germany, France, United Kingdom, Italy, Spain, Netherlands, Belgium, Poland, Sweden, Finland
CVE-2022-29223: CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') in azure-rtos usbx
Description
Azure RTOS USBX is a USB host, device, and on-the-go (OTG) embedded stack. In versions prior to 6.1.10, an attacker can cause a buffer overflow by providing the Azure RTOS USBX host stack a HUB descriptor with `bNbPorts` set to a value greater than `UX_MAX_TT` which defaults to 8. For a `bNbPorts` value of 255, the implementation of `ux_host_class_hub_descriptor_get` function will modify the contents of `hub` -> `ux_host_class_hub_device` -> `ux_device_hub_tt` array violating the end boundary by 255 - `UX_MAX_TT` items. The USB host stack needs to validate the number of ports reported by the hub, and if the value is larger than UX_MAX_TT, USB stack needs to reject the request. This fix has been included in USBX release 6.1.10.
AI-Powered Analysis
Technical Analysis
CVE-2022-29223 is a classic buffer overflow vulnerability identified in the Azure RTOS USBX stack, specifically affecting versions prior to 6.1.10. Azure RTOS USBX is an embedded USB host, device, and OTG stack widely used in real-time operating systems for embedded devices. The vulnerability arises in the function ux_host_class_hub_descriptor_get, which processes the HUB descriptor provided by a USB hub device. The descriptor field bNbPorts indicates the number of ports on the hub. The USBX stack defines a maximum number of transaction translators (UX_MAX_TT), defaulting to 8. However, the vulnerable code does not validate if bNbPorts exceeds UX_MAX_TT. An attacker can supply a malicious HUB descriptor with bNbPorts set to a value significantly larger than UX_MAX_TT, for example 255, causing the function to write beyond the bounds of the ux_device_hub_tt array. This buffer overflow can corrupt adjacent memory, potentially leading to arbitrary code execution, denial of service, or system instability. The vulnerability is rooted in CWE-120, which is a failure to check input size before copying data into a buffer. The issue was addressed in USBX version 6.1.10 by adding proper validation to reject HUB descriptors with bNbPorts values exceeding UX_MAX_TT. No known exploits have been reported in the wild to date. The vulnerability affects embedded systems using the vulnerable USBX versions, which are often found in IoT devices, industrial control systems, and other embedded applications relying on USB connectivity. Exploitation requires an attacker to connect a malicious USB hub or device that can send crafted descriptors to the host stack. No authentication or user interaction beyond physical connection is required, making the attack vector plausible in environments where physical access is possible or where untrusted USB devices can be connected.
Potential Impact
For European organizations, the impact of this vulnerability depends on the deployment of embedded devices running vulnerable versions of Azure RTOS USBX. Critical infrastructure sectors such as manufacturing, energy, transportation, and healthcare often use embedded systems with USB connectivity. Exploitation could allow attackers to execute arbitrary code or cause denial of service on these devices, potentially disrupting operations or compromising safety systems. Given the physical nature of the attack vector, environments with less controlled physical access or supply chain exposure are at higher risk. The vulnerability could also be leveraged as a foothold for lateral movement within networks if compromised devices are connected to enterprise systems. Additionally, embedded devices in smart city infrastructure or industrial IoT deployments in Europe could be targeted, leading to broader operational disruptions. Although no exploits are currently known, the medium severity rating and the ease of triggering the overflow via USB descriptors warrant proactive mitigation to prevent future attacks. The confidentiality, integrity, and availability of affected embedded systems could be compromised, impacting organizational resilience and potentially causing regulatory compliance issues under European cybersecurity laws such as NIS2.
Mitigation Recommendations
1. Upgrade all Azure RTOS USBX stacks to version 6.1.10 or later, where the vulnerability is patched with proper input validation. 2. Implement strict USB device control policies to restrict or monitor the connection of unauthorized USB hubs or devices, especially in sensitive or critical environments. 3. Employ USB port lockdown mechanisms or hardware-based USB firewalls that can filter or block malformed USB descriptors. 4. Conduct regular firmware and software inventory audits to identify embedded devices running vulnerable USBX versions. 5. For devices that cannot be immediately updated, consider network segmentation and isolation to limit the impact of potential exploitation. 6. Monitor device logs and network traffic for anomalous USB activity indicative of attempts to exploit this vulnerability. 7. Collaborate with device vendors to ensure timely patching and to understand the deployment footprint of affected products. 8. Educate operational technology (OT) and embedded system administrators about the risks of connecting untrusted USB devices and enforce physical security controls to prevent unauthorized access.
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-04-13T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d9843c4522896dcbf2ff5
Added to database: 5/21/2025, 9:09:23 AM
Last enriched: 6/23/2025, 8:06:40 AM
Last updated: 7/28/2025, 9:41:34 PM
Views: 13
Related Threats
CVE-2025-55716: CWE-862 Missing Authorization in VeronaLabs WP Statistics
MediumCVE-2025-55714: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Crocoblock JetElements For Elementor
MediumCVE-2025-55713: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in CreativeThemes Blocksy
MediumCVE-2025-55712: CWE-862 Missing Authorization in POSIMYTH The Plus Addons for Elementor Page Builder Lite
MediumCVE-2025-55710: CWE-201 Insertion of Sensitive Information Into Sent Data in Steve Burge TaxoPress
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.