CVE-2022-29246
Potential buffer overflow in function DFU upload in Azure RTOS USBX
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
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
CVSS Scores
SSVC
- Decision:-
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
References (3)
URL | Tag | Source |
---|---|---|
https://github.com/azure-rtos/usbx/blob/master/common/usbx_device_classes/src/ux_device_class_dfu_control_request.c | Third Party Advisory | |
https://github.com/azure-rtos/usbx/releases/tag/v6.1.11_rel | Release Notes | |
https://github.com/azure-rtos/usbx/security/advisories/GHSA-hh5p-x584-j8hv | Third Party Advisory |
URL | Date | SRC |
---|
URL | Date | SRC |
---|
URL | Date | SRC |
---|
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
|