CVE-2022-29246 Potential buffer overflow in function DFU upload in Azure RTOS USBX

Critical 9.8 Published Updated

A buffer overflow in Azure RTOS USBX DFU upload allows attackers to execute arbitrary code or bypass security features via crafted control requests.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2022-29246?

CVE-2022-29246 is a critical memory corruption vulnerability in azure-rtos usbx, published on 24 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-120

Which versions are affected by CVE-2022-29246?

It affects 1 product.

Products include Eclipse Threadx Usbx.

How do I fix CVE-2022-29246?

No fix has been published for CVE-2022-29246 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2022-29246 being exploited?

There is no known exploitation of CVE-2022-29246 in the wild and no public exploit code.

Sources

Also known as GHSA-hh5p-x584-j8hv.

Is CVE-2022-29246 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free