// For flags

CVE-2020-12887

 

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Se detectaron pérdidas de la memoria en la biblioteca CoAP en Arm Mbed OS versión 5.15.3 cuando se usa la biblioteca Arm mbed-coap versión 5.1.5. El analizador CoAP es responsable de analizar los paquetes CoAP recibidos. La función sn_coap_parser_options_parse() analiza el campo CoAP option number de todas las opciones presentes en el paquete de entrada. Cada número de opción es calculado como una suma del número de opción previo y un delta de la opción actual. El delta y el número de opción anterior son expresados como enteros de 16 bits sin signo. Debido a la falta de detección de desbordamiento, es posible crear un paquete que contenga el número de opción y resulte en que el mismo número de opción sea procesado nuevamente en un solo paquete. Determinadas opciones asignan memoria llamando a una función de asignación de memoria. En los casos de COAP_OPTION_URI_QUERY, COAP_OPTION_URI_PATH, COAP_OPTION_LOCATION_QUERY y COAP_OPTION_ETAG, no se comprueba si ya se ha asignado memoria, lo que en conjunto con el desbordamiento de enteros del número de opción puede conllevar a múltiples asignaciones de memoria asignada a un único puntero. Se ha demostrado que esto conlleva a una pérdida de memoria mediante un huérfano de búfer. Como resultado, la memoria nunca es liberada

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
None
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2020-05-15 CVE Reserved
  • 2020-06-18 CVE Published
  • 2024-04-22 EPSS Updated
  • 2024-08-04 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-190: Integer Overflow or Wraparound
  • CWE-401: Missing Release of Memory after Effective Lifetime
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Arm
Search vendor "Arm"
Mbed-coap
Search vendor "Arm" for product "Mbed-coap"
5.1.5
Search vendor "Arm" for product "Mbed-coap" and version "5.1.5"
-
Affected
in Arm
Search vendor "Arm"
Mbed Os
Search vendor "Arm" for product "Mbed Os"
5.15.3
Search vendor "Arm" for product "Mbed Os" and version "5.15.3"
-
Safe