CVE-2026-5856: Contiki-NG DNS/mDNS Resolver Out-of-Bounds Read via Unchecked skip_name Traversal Before Transaction-ID Validation
Contiki-NG's DNS/mDNS resolver skipname() 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 skipname() to walk past the UDP packet buffer, and the returned pointer is cast to struct dnsanswer for further memory reads. On builds with RESOLVCONFSUPPORTSMDNS 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 uipbuf and adjacent memory, disclosing memory contents or crashing the resolver.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-5856?
The severity of CVE-2026-5856 is rated high with a score of 7.1.
What vulnerability does CVE-2026-5856 describe?
CVE-2026-5856 describes an out-of-bounds read vulnerability in Contiki-NG's DNS/mDNS resolver due to unchecked traversal in the skip_name function.
How do I fix CVE-2026-5856?
To fix CVE-2026-5856, update to the latest version of Contiki-NG that addresses the unchecked skip_name traversal issue.
What is affected by CVE-2026-5856?
CVE-2026-5856 affects the DNS/mDNS resolver component within Contiki-NG software.
Can CVE-2026-5856 be exploited remotely?
Yes, CVE-2026-5856 can be exploited remotely due to its reliance on attacker-controlled DNS headers.