GHSA-v97j-w9m6-c4h3: Buffer overflows in RIOT

Published May 1, 2024
·
Updated

RIOT is a real-time multi-threading operating system that supports a range of devices that are typically 8-bit, 16-bit and 32-bit microcontrollers. The size check in the gcoapdnsserverproxyget() function contains a small typo that may lead to a buffer overflow in the subsequent strcpy(). In detail, the length of the uri string is checked instead of the length of the proxy string. The gcoapforwardproxycopyoptions() function does not implement an explicit size check before copying data to the cep->reqetag buffer that is COAPETAGLENGTHMAX bytes long. If an attacker can craft input so that optlen becomes larger than COAPETAGLENGTHMAX, they can cause a buffer overflow. If the input above is attacker-controlled and crosses a security boundary, the impact of the buffer overflow vulnerabilities could range from denial of service to arbitrary code execution. This issue has yet to be patched. Users are advised to add manual bounds checking.

Affected Software

1 affected component
RIOT RIOT

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Add manual bounds checking in `_gcoap_forward_proxy_copy_options()` before copying data to the `cep->req_etag` buffer, ensuring the input length does not exceed `COAP_ETAG_LENGTH_MAX`; also correct the length check in `gcoap_dns_server_proxy_get()` to validate the `_proxy` string before the subsequent `strcpy()`.

Event History

May 1, 2024
CVE Published
via OSV·06:14 AM
Data Sourced
via OSV·06:14 AM
DescriptionSeverityWeakness

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203