CVE-2026-10672: Unterminated URI buffer causes out-of-bounds read in LwM2M firmware pull (Package URI)
subsys/net/lib/lwm2m/lwm2mpullcontext.c copied the firmware-update Package URI into a fixed static buffer (context.uri, size CONFIGLWM2MSWMGMTPACKAGEURILEN, default 128) with memcpy(context.uri, uri, LWM2MPACKAGEURILEN), copying exactly the destination size with no length validation. The Firmware-Update object stores the server-supplied Package URI (/5/0/1) in a 255-byte buffer, so a LwM2M management server (or an on-path attacker on a session lacking strong DTLS) can WRITE a URI of 128-254 characters; only the first 128 bytes are then copied into context.uri with no NUL terminator. That buffer is subsequently consumed as a C string by httpparserparseurl(context.uri, strlen(context.uri), ...), strlen-based CoAP URI-path/PROXY-URI option appends, and lwm2mparsepeerinfo(), causing an out-of-bounds read of adjacent static memory. The over-read bytes are appended to outbound CoAP requests (information disclosure of adjacent device memory to the server/proxy) and can crash the device (denial of service). The vulnerable copy was introduced by the pull-context refactor (first released in v3.0.0) and is present through v4.4.0; the default-on CONFIGLWM2MFIRMWAREUPDATEPULLSUPPORT path is affected. The fix adds a strlen(uri) >= sizeof(context.uri) check returning -ENOMEM and switches to strcpy(), guaranteeing a bounded, NUL-terminated buffer.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
lwm2m firmware pull (subsys/net/lib/lwm2m/lwm2m_pull_context.c)to a version that resolves this vulnerability.Fixed in v4.4.0 - Configuration
Disable the default-on CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT path to avoid the vulnerable firmware-update Package URI handling.
CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT = disable - Configuration
Apply the fix in subsys/net/lib/lwm2m/lwm2m_pull_context.c: add a check that strlen(uri) >= sizeof(context.uri) returns -ENOMEM, and switch from the unterminated memcpy(context.uri, uri, LWM2M_PACKAGE_URI_LEN) behavior to a bounded, NUL-terminated copy (the fix specifies switching to strcpy()).
lwm2m_pull_context.c URI copy/handling (size validation + copy routine) = Add strlen(uri) >= sizeof(context.uri) check; use strcpy() with NUL-termination
Event History
Frequently Asked Questions
What is the severity of CVE-2026-10672?
CVE-2026-10672 has a high severity rating of 8.2.
How do I fix CVE-2026-10672?
To fix CVE-2026-10672, ensure proper length validation is implemented before copying the firmware-update Package URI into the static buffer.
What type of vulnerability is CVE-2026-10672?
CVE-2026-10672 is an out-of-bounds read vulnerability caused by unterminated URI buffer handling.
What systems are affected by CVE-2026-10672?
CVE-2026-10672 affects systems using the LwM2M firmware pull functionality that relies on the vulnerable URI handling.
What are the implications of CVE-2026-10672?
The implications of CVE-2026-10672 include potential information disclosure due to out-of-bounds read access.