Integer Underflow (Wrap or Wraparound) Affecting azure-rtos/usbx package, versions [,6.1.12)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.55% (67th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-AZURERTOSUSBX-3043380
  • published14 Oct 2022
  • disclosed14 Oct 2022
  • creditUnknown

Introduced: 14 Oct 2022

CVE-2022-39293  (opens in a new tab)
CWE-191  (opens in a new tab)

How to fix?

Upgrade azure-rtos/usbx to version 6.1.12 or higher.

Overview

Affected versions of this package are vulnerable to Integer Underflow (Wrap or Wraparound) by allowing an attacker to move data_pointer to unexpected address and cause write buffer overflow.

Workaround

Users who are unable to upgrade to the fixed version can add check of header_length:

  1. It must be greater than UX_HOST_CLASS_PIMA_DATA_HEADER_SIZE

  2. It should be greater or equal to the current returned data length (transfer_request -> ux_transfer_request_actual_length)

CVSS Base Scores

version 3.1