Out-of-bounds Read 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
0.24% (63rd 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-2368798
  • published26 Jan 2022
  • disclosed18 Jun 2020
  • creditUnknown

Introduced: 18 Jun 2020

CVE-2020-12884  (opens in a new tab)
CWE-125  (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 Read. A buffer over-read was discovered in the CoAP library in Arm Mbed OS 5.15.3. The CoAP parser is responsible for parsing received CoAP packets. The function sn_coap_parser_options_parse_multiple_options() parses CoAP options that may occur multiple consecutive times in a single packet. While processing the options, packet_data_pptr is accessed after being incremented by option_len without a prior out-of-bounds memory check. The temp_parsed_uri_query_ptr is validated for a correct range, but the range valid for temp_parsed_uri_query_ptr is derived from the amount of allocated heap memory, not the actual input size. Therefore the check of temp_parsed_uri_query_ptr may be insufficient for safe access to the area pointed to by packet_data_pptr. As a result, access to a memory area outside of the intended boundary of the packet buffer is made.

CVSS Base Scores

version 3.1