// For flags

CVE-2022-29246

Potential buffer overflow in function DFU upload in Azure RTOS USBX

Severity Score

9.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

Azure RTOS USBX is a USB host, device, and on-the-go (OTG) embedded stack. Prior to version 6.1.11, he USBX DFU UPLOAD functionality may be utilized to introduce a buffer overflow resulting in overwrite of memory contents. In particular cases this may allow an attacker to bypass security features or execute arbitrary code. The implementation of `ux_device_class_dfu_control_request` function does not assure that a buffer overflow will not occur during handling of the DFU UPLOAD command. When an attacker issues the `UX_SLAVE_CLASS_DFU_COMMAND_UPLOAD` control transfer request with `wLenght` larger than the buffer size (`UX_SLAVE_REQUEST_CONTROL_MAX_LENGTH`, 256 bytes), depending on the actual implementation of `dfu -> ux_slave_class_dfu_read`, a buffer overflow may occur. In example `ux_slave_class_dfu_read` may read 4096 bytes (or more up to 65k) to a 256 byte buffer ultimately resulting in an overflow. Furthermore in case an attacker has some control over the read flash memory, this may result in execution of arbitrary code and platform compromise. A fix for this issue has been included in USBX release 6.1.11. As a workaround, align request and buffer size to assure that buffer boundaries are respected.

Azure RTOS USBX es una pila embebida de host USB, dispositivo y on-the-go (OTG). En versiones anteriores a 6.1.11, la funcionalidad USBX DFU UPLOAD puede ser usada para introducir un desbordamiento de búfer que resulta en la sobreescritura del contenido de la memoria. En determinados casos, esto puede permitir a un atacante omitir las funciones de seguridad o ejecutar código arbitrario. La implementación de la función "ux_device_class_dfu_control_request" no asegura que no sea producida un desbordamiento del búfer durante el manejo del comando DFU UPLOAD. Cuando un atacante emite la petición de transferencia de control "UX_SLAVE_CLASS_DFU_COMMAND_UPLOAD" con "wLenght" mayor que el tamaño del buffer ("UX_SLAVE_REQUEST_CONTROL_MAX_LENGTH", 256 bytes), dependiendo de la implementación real de "dfu -) ux_slave_class_dfu_read", puede producirse un desbordamiento del buffer. Por ejemplo, "ux_slave_class_dfu_read" puede leer 4096 bytes (o más hasta 65k) en un buffer de 256 bytes, resultando en un desbordamiento. Además, en caso de que un atacante tenga algún control sobre la memoria flash leída, esto puede resultar en una ejecución de código arbitrario y el compromiso de la plataforma. Ha sido incluida una corrección para este problema en versión 6.1.11 de USBX. Como mitigación, alinee la petición y el tamaño del búfer para asegurarse de que sean respetados los límites del búfer

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-04-13 CVE Reserved
  • 2022-05-24 CVE Published
  • 2024-08-03 CVE Updated
  • 2024-11-19 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Microsoft
Search vendor "Microsoft"
Azure Rtos Usbx
Search vendor "Microsoft" for product "Azure Rtos Usbx"
< 6.1.11
Search vendor "Microsoft" for product "Azure Rtos Usbx" and version " < 6.1.11"
-
Affected