Out-of-bounds Write Affecting contiki-ng/contiki-ng package, versions [4.0,4.6)


Severity

Recommended
0.0
critical
0
10

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

Threat Intelligence

Exploit Maturity
Not Defined
EPSS
0.65% (80th 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-CONTIKINGCONTIKING-6137936
  • published22 Dec 2023
  • disclosed18 Aug 2020
  • creditUnknown

Introduced: 18 Aug 2020

CVE-2020-14935  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

Upgrade contiki-ng/contiki-ng to version 4.6 or higher.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Write. Buffer overflows were discovered in Contiki-NG 4.4 through 4.5, in the SNMP bulk get request response encoding function. The function parsing the received SNMP request does not verify the input message's requested variables against the capacity of the internal SNMP engine buffer. When a bulk get request response is assembled, a stack buffer dedicated for OIDs (with a limited capacity) is allocated in snmp_engine_get_bulk(). When snmp_engine_get_bulk() is populating the stack buffer, an overflow condition may occur due to lack of input length validation. This makes it possible to overwrite stack regions beyond the allocated buffer, including the return address from the function. As a result, the code execution path may be redirected to an address provided in the SNMP bulk get payload. If the target architecture uses common addressing space for program and data memory, it may also be possible to supply code in the SNMP request payload, and redirect the execution path to the remotely injected code, by modifying the function's return address.

CVSS Scores

version 3.1