{"schemaVersion":3,"id":"CVE-2022-39293","aliases":[],"status":"published","duplicateOf":null,"title":null,"description":"Azure RTOS USBX is a high-performance USB host, device, and on-the-go (OTG) embedded stack, that is fully integrated with Azure RTOS ThreadX. The case is, in [_ux_host_class_pima_read](https://github.com/azure-rtos/usbx/blob/master/common/usbx_host_classes/src/ux_host_class_pima_read.c), there is data length from device response, returned in the very first packet, and read by [L165 code](https://github.com/azure-rtos/usbx/blob/082fd9db09a3669eca3358f10b8837a5c1635c0b/common/usbx_host_classes/src/ux_host_class_pima_read.c#L165), as header_length. Then in [L178 code](https://github.com/azure-rtos/usbx/blob/082fd9db09a3669eca3358f10b8837a5c1635c0b/common/usbx_host_classes/src/ux_host_class_pima_read.c#L178), there is a “if” branch, which check the expression of “(header_length - UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE) > data_length” where if header_length is smaller than UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE, calculation could overflow and then [L182 code](https://github.com/azure-rtos/usbx/blob/082fd9db09a3669eca3358f10b8837a5c1635c0b/common/usbx_host_classes/src/ux_host_class_pima_read.c#L182) the calculation of data_length is also overflow, this way the later [while loop start from L192](https://github.com/azure-rtos/usbx/blob/082fd9db09a3669eca3358f10b8837a5c1635c0b/common/usbx_host_classes/src/ux_host_class_pima_read.c#L192) can move data_pointer to unexpected address and cause write buffer overflow. The fix has been included in USBX release [6.1.12](https://github.com/azure-rtos/usbx/releases/tag/v6.1.12_rel). The following can be used as a workaround: Add check of `header_length`: 1. It must be greater than `UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE`. 1. It should be greater or equal to the current returned data length (`transfer_request -> ux_transfer_request_actual_length`).","dates":{"published":"2022-10-13T00:00:00.000Z","modified":"2025-04-23T16:50:26.653Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":8.6,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00827,"percentile":0.56736,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.10999999999999995,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00717},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00703,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00827,"percentile":0.56736}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00717,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00827,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00827,"percentile":0.56736}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-191","name":"Integer Underflow (Wrap or Wraparound)","description":"The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/191.html"}],"affected":[{"vendor":"azure-rtos","product":"usbx","name":"usbx","label":"usbx","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 6.1.12","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 6.1.12","eol":null,"hubHref":"/vendor/azure-rtos/usbx"},{"vendor":"eclipse","product":"threadx_usbx","name":"threadx usbx","label":"threadx_usbx","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 6.1.12","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 6.1.12","eol":null,"hubHref":"/vendor/eclipse/threadx_usbx"}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/azure-rtos/usbx/releases/tag/v6.1.12_rel","label":"github.com/azure-rtos/usbx/releases/tag/v6.1.12_rel","hostname":"github.com","tags":["Release Notes","Third Party Advisory"]},{"url":"https://github.com/azure-rtos/usbx/security/advisories/GHSA-gg76-h537-xq48","label":"github.com/azure-rtos/usbx/security/advisories/GHSA-gg76-h537-xq48","hostname":"github.com","tags":["Patch","Third Party Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-10-13T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-23T16:50:26.653Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T05:31:27.782Z","stale":false,"partial":false}}