Out-of-bounds Write Affecting armmbed/mbed-os package, versions [0,]


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
2.07% (90th 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-ARMMBEDMBEDOS-2366247
  • published26 Jan 2022
  • disclosed5 Nov 2019
  • creditUnknown

Introduced: 5 Nov 2019

CVE-2019-17212  (opens in a new tab)
CWE-129  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

There is no fixed version for armmbed/mbed-os.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Write. Buffer overflows were discovered in the CoAP library in Arm Mbed OS 5.14.0. The CoAP parser is responsible for parsing received CoAP packets. The function sn_coap_parser_options_parse() parses CoAP input linearly using a while loop. Once an option is parsed in a loop, the current point (packet_data_pptr) is increased correspondingly. The pointer is restricted by the size of the received buffer, as well as by the 0xFF delimiter byte. Inside each while loop, the check of the value of packet_data_pptr is not strictly enforced. More specifically, inside a loop, packet_data_pptr could be increased and then dereferenced without checking. Moreover, there are many other functions in the format of sn_coap_parser_*() that do not check whether the pointer is within the bounds of the allocated buffer. All of these lead to heap-based or stack-based buffer overflows, depending on how the CoAP packet buffer is allocated.

CVSS Base Scores

version 3.1