PT-2020-13319 · Arm · Arm Mbed-Coap Library+1
Mjurczak
·
Published
2020-06-18
·
Updated
2021-07-21
·
CVE-2020-12887
CVSS v3.1
7.5
High
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Name of the Vulnerable Software and Affected Versions
Arm Mbed OS version 5.15.3
Arm mbed-coap library version 5.1.5
Description
A memory leak issue was discovered in the CoAP library of Arm Mbed OS when using the Arm mbed-coap library. The CoAP parser, specifically the function
sn coap parser options parse(), is responsible for parsing received CoAP packets. Due to a lack of overflow detection, it is possible to craft a packet that wraps the option number around, resulting in the same option number being processed again in a single packet. Certain options, such as COAP OPTION URI QUERY, COAP OPTION URI PATH, COAP OPTION LOCATION QUERY, and COAP OPTION ETAG, allocate memory without checking if it has already been allocated, leading to multiple assignments of allocated memory to a single pointer and resulting in a memory leak by buffer orphaning.Recommendations
For Arm Mbed OS version 5.15.3, consider disabling the
sn coap parser options parse() function until a patch is available.
For Arm mbed-coap library version 5.1.5, restrict access to the CoAP parser to minimize the risk of exploitation.
Avoid using the affected options, such as COAP OPTION URI QUERY, COAP OPTION URI PATH, COAP OPTION LOCATION QUERY, and COAP OPTION ETAG, in the CoAP packets until the issue is resolved.
At the moment, there is no information about a newer version that contains a fix for this vulnerability.Integer Overflow
Memory Leak
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Arm Mbed Os
Arm Mbed-Coap Library