GHSA-f366-4rvv-95x2

Suggest an improvement
Source
https://github.com/advisories/GHSA-f366-4rvv-95x2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/10/GHSA-f366-4rvv-95x2/GHSA-f366-4rvv-95x2.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-f366-4rvv-95x2
Published
2020-10-02T16:33:19Z
Modified
2024-12-02T05:37:42.138474Z
Summary
Buffer overflow in deprecated USB HALs and stack overflow in USB enumeration
Details

Impact

1) If an application is making use of the deprecated kit protocol HALs as the communication channel to the target device an attacker can masquerade as a device and return malformed packets of arbitrary length which the protocol stack will write to the stack. HALs intended for production use are unaffected (I2C, SWI, & SPI) as well as the hidapi HAL (halallplatformskithidapi.c).

2) The hidapi HAL can be made to overrun the application stack by attaching more than 10 (real or virtual) devices likely resulting in an application crash as this does not allow arbitrary data to be written to the stack.

Patches

USB kit enumeration has been patched in v3.2.3 for the hidapi HAL (halallplatformskithidapi.c).

Removal of deprecated HALs

Deprecated usb kit HALs have been removed in v3.2.3.

Workarounds

This vulnerability is limited to users of the kit protocol which is used with Microchip kits and kit firmware to bridge communication from USB-HID to I2C or SWI. It is not expected that kits would be used in an production environment. This is an optional component for users as well so they can always compile the library without the usb support option.

Special python packaging notes

The python package for cryptoauthlib uses date codes for identifying versions. The patched version for python packages is 20200912

References

Please see Microchip PSIRT for Microchip's security policy and reporting procedures

Credits

Special thanks to Ruben Santamarta of IOActive for reporting

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-120"
    ],
    "severity": "LOW",
    "github_reviewed": true,
    "github_reviewed_at": "2020-10-02T16:27:28Z"
}
References

Affected packages

PyPI / cryptoauthlib

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
20200912

Affected versions

Other

20180718
20180728
20180817
20181025
20181026
20181027
20190104
20190105
20190125
20190304
20190517
20190830
20190831
20190903
20191122
20200205
20200208