U.S. flag   An official website of the United States government
Dot gov

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Https

Secure .gov websites use HTTPS
A lock (Dot gov) or https:// means you've safely connected to the .gov website. Share sensitive information only on official, secure websites.

CVE-2020-12887 Detail

Description

Memory leaks were discovered in the CoAP library in Arm Mbed OS 5.15.3 when using the Arm mbed-coap library 5.1.5. The CoAP parser is responsible for parsing received CoAP packets. The function sn_coap_parser_options_parse() parses the CoAP option number field of all options present in the input packet. Each option number is calculated as a sum of the previous option number and a delta of the current option. The delta and the previous option number are expressed as unsigned 16-bit integers. Due to lack of overflow detection, it is possible to craft a packet that wraps the option number around and results in the same option number being processed again in a single packet. Certain options allocate memory by calling a memory allocation function. In the cases of COAP_OPTION_URI_QUERY, COAP_OPTION_URI_PATH, COAP_OPTION_LOCATION_QUERY, and COAP_OPTION_ETAG, there is no check on whether memory has already been allocated, which in conjunction with the option number integer overflow may lead to multiple assignments of allocated memory to a single pointer. This has been demonstrated to lead to memory leak by buffer orphaning. As a result, the memory is never freed.


Metrics

NVD enrichment efforts reference publicly available information to associate vector strings. CVSS information contributed by other sources is also displayed.
CVSS 4.0 Severity and Vector Strings:

NIST CVSS score
NIST: NVD
N/A
NVD assessment not yet provided.

References to Advisories, Solutions, and Tools

By selecting these links, you will be leaving NIST webspace. We have provided these links to other web sites because they may have information that would be of interest to you. No inferences should be drawn on account of other sites being referenced, or not, from this page. There may be other web sites that are more appropriate for your purpose. NIST does not necessarily endorse the views expressed, or concur with the facts presented on these sites. Further, NIST does not endorse any commercial products that may be mentioned on these sites. Please address comments about this page to nvd@nist.gov.

Hyperlink Resource
https://github.com/ARMmbed/mbed-coap/pull/116 Third Party Advisory 
https://github.com/ARMmbed/mbed-coap/pull/116 Third Party Advisory 
https://github.com/ARMmbed/mbed-os/issues/12930 Third Party Advisory 
https://github.com/ARMmbed/mbed-os/issues/12930 Third Party Advisory 
https://github.com/ARMmbed/mbed-os/issues/12957 Third Party Advisory 
https://github.com/ARMmbed/mbed-os/issues/12957 Third Party Advisory 
https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93 Patch  Third Party Advisory 
https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93 Patch  Third Party Advisory 

Weakness Enumeration

CWE-ID CWE Name Source
CWE-190 Integer Overflow or Wraparound cwe source acceptance level NIST  
CWE-401 Missing Release of Memory after Effective Lifetime cwe source acceptance level NIST  

Known Affected Software Configurations Switch to CPE 2.2

CPEs loading, please wait.

Denotes Vulnerable Software
Are we missing a CPE here? Please let us know.

Change History

4 change records found show changes

Quick Info

CVE Dictionary Entry:
CVE-2020-12887
NVD Published Date:
06/18/2020
NVD Last Modified:
11/21/2024
Source:
MITRE