Buffer overflows were discovered in the CoAP library in Arm Mbed OS 5.14.0.
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
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.
Timeline
- CVE published
- Record last updated
Affected versions
- n/a n/a
Version range not reported
References 7
GitHub · ARMmbed/mbed-os
- features/frameworks/mbed-coap/source/sn_coap_parser.c · L301
- features/frameworks/mbed-coap/source/sn_coap_parser.c · L660
- features/frameworks/mbed-coap/source/sn_coap_parser.c · L331
- features/frameworks/mbed-coap/source/sn_coap_parser.c · L257
- features/frameworks/mbed-coap/source/sn_coap_parser.c · L310
- features/frameworks/mbed-coap/source/sn_coap_parser.c · L313
- Issue #11803