Skip to main content

Contiki-NG CVE-2026-5856

| EUVDEUVD-2026-54225 HIGH
Out-of-bounds Read (CWE-125)
2026-08-06 disclosure@vulncheck.com GHSA-8m55-g479-xj8c
7.1
CVSS 4.0 · Vendor: vulncheck
Share

Severity by source

Vendor (vulncheck) PRIMARY
7.1 HIGH
CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
7.1 HIGH

AV:A because exploitation is bounded to local-segment peers; PR:N since mDNS path is unauthenticated; C:H for arbitrary memory disclosure; A:L for resolver crash only; no integrity impact.

3.1 AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L
4.0 AV:A/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (vulncheck).

CVSS VectorVendor: vulncheck

Attack Vector
Adjacent
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

4
Patch available
Aug 06, 2026 - 23:03 EUVD
Source Code Evidence Fetched
Aug 06, 2026 - 22:53 vuln.today
Analysis Generated
Aug 06, 2026 - 22:53 vuln.today
CVE Published
Aug 06, 2026 - 22:18 cve.org
HIGH 7.1

DescriptionCVE.org

Contiki-NG's DNS/mDNS resolver skip_name() in os/services/resolv/resolv.c walks DNS wire-format name labels with no packet-boundary check, and the caller in newdata() invokes it in a loop iterating nquestions times from the attacker-controlled DNS header before validating the transaction ID. An attacker who sets nquestions higher than the number of complete questions present causes skip_name() to walk past the UDP packet buffer, and the returned pointer is cast to struct dns_answer * for further memory reads. On builds with RESOLV_CONF_SUPPORTS_MDNS enabled, any peer on the local segment can trigger the read unauthenticated via a multicast UDP 5353 packet with no outstanding query required; on standard DNS builds an attacker who can inject a UDP response from port 53 during an outstanding query can trigger the same read. Impact is out-of-bounds read of uip_buf and adjacent memory, disclosing memory contents or crashing the resolver.

AnalysisAI

Out-of-bounds memory read in Contiki-NG's DNS/mDNS resolver exposes adjacent device memory and can crash the resolver on constrained IoT hardware. The root defect is in skip_name() within os/services/resolv/resolv.c, which traverses DNS wire-format name labels with no packet-boundary guard; the caller newdata() drives iteration using an attacker-controlled nquestions field from the DNS header before the transaction ID is validated, enabling an attacker to force the function past the end of uip_buf. On mDNS-enabled builds, any local-segment peer can trigger this unauthenticated with a single multicast UDP packet to port 5353 and no outstanding query required; on standard DNS builds, an attacker able to inject a spoofed DNS response during an active query achieves the same effect. No public exploit has been identified at time of analysis.

Technical ContextAI

Contiki-NG is an open-source RTOS for constrained IoT devices that includes a lightweight DNS/mDNS resolver in os/services/resolv/resolv.c. DNS wire-format names consist of length-prefixed label sequences optionally terminated by compression pointers - two-byte references into the packet body. The vulnerable skip_name() function traversed these labels using only a raw pointer increment with no awareness of the enclosing packet boundary, meaning it could walk arbitrarily far into memory adjacent to the UDP receive buffer uip_buf. CWE-125 (Out-of-Bounds Read) describes this root cause precisely. The compounding flaw in newdata() is that the nquestions loop counter was cast from the DNS header's 16-bit field to a uint8_t without any validation and consumed before the transaction ID check, handing the attacker direct control over loop iteration count. The commit diff confirms that the fix adds packet and packet_len parameters to skip_name(), decode_name(), and dns_name_isequal(), introduces explicit query >= end boundary guards at every pointer advance, validates the DNS header minimum length before reading any fields, and changes callers to treat a NULL return from skip_name() as a fatal parse error.

RemediationAI

Apply the upstream fix from commit 04a3f0a0067d2ee87d1f297b6d0f4392d8c98ffe available at https://github.com/contiki-ng/contiki-ng/commit/04a3f0a0067d2ee87d1f297b6d0f4392d8c98ffe, or track PR #3169 at https://github.com/contiki-ng/contiki-ng/pull/3169 for merge status. A specific tagged release version incorporating this fix has not been independently confirmed - verify with Contiki-NG maintainers before assuming a release contains the patch. As the highest-value compensating control, disable mDNS at compile time by setting RESOLV_CONF_SUPPORTS_MDNS=0, which eliminates the unauthenticated unsolicited-packet attack path and reduces exposure to the harder DNS response injection scenario only; this trade-off is the loss of mDNS-based local service discovery. Where network architecture permits, apply Layer-2 or firewall rules blocking UDP port 5353 multicast traffic from untrusted segment peers and restricting DNS response ingress (UDP port 53) to known resolver addresses to reduce the injection window. On devices where the resolver is non-essential, disabling the resolver entirely removes all exposure.

Share

CVE-2026-5856 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy