CVE-2026-10657: Zephyr mDNS Buffer Over-Read Denial of Service
Zephyr's mDNS query handling contains a buffer over-read flaw in its DNS resolver. When checking whether a hostname ends with '.local', the code reads a fixed 7 bytes from the suffix position without verifying the string is long enough. Hostnames ending in shorter suffixes like .org, .com, .io, or a trailing dot cause the comparison to read past the string's null terminator into adjacent memory. On systems with strict memory boundaries (guard pages, memory-domain protections, or address sanitizers), this over-read triggers a crash, resulting in denial of service. The vulnerability only affects devices with mDNS resolver enabled and requires the ability to influence hostname input through configuration, parsed URLs, or application interfaces.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 3.7 LOW · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
- Weaknesses (CWE)
- CWE-125
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-05 / 2026-07-14
NVD description (verbatim)
Zephyr's DNS resolver detects mDNS (.local) queries in dns_resolve_name_internal() (subsys/net/lib/dns/resolve.c) with memcmp(strrchr(query, '.'), ".local", 7), which always reads a fixed 7 bytes from the suffix pointer. When the resolved hostname's final label is shorter than 7 bytes (e.g. names ending in .org, .com, .net, .io, or a trailing dot), the comparison reads 1-2 bytes past the string's NUL terminator. The hostname (query) is the caller-supplied name passed through the standard getaddrinfo()/dns_get_addr_info()/dns_resolve_name() path and is influenceable by operators or remote inputs (server names from configuration, parsed URLs, or app-facing interfaces). On a tightly-sized buffer with no slack (for example a userspace getaddrinfo call where the hostname is copied with k_usermode_string_alloc_copy to exactly strlen+1 bytes), the over-read crosses the allocation boundary; if that boundary is unmapped (guard page, memory-domain boundary under MPU, or an address sanitizer) the over-read faults, causing a denial of service. The over-read bytes are never returned, so there is no information disclosure. The flaw is compiled only when CONFIG_MDNS_RESOLVER is enabled, exists since v1.10.0, and is fixed by replacing the fixed-length memcmp with a NUL-safe strcmp(ptr, ".local").
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-10657 is a classic out-of-bounds read in Zephyr's mDNS detection logic (subsys/net/lib/dns/resolve.c, dns_resolve_name_internal function). The vulnerability stems from memcmp(strrchr(query, '.'), ".local", 7), which unconditionally compares 7 bytes from the final dot's position, ignoring the actual remaining string length. When the hostname's final label is less than 7 characters—typical for .org, .com, .net, .io, and single-character TLDs—the read extends 1–2 bytes beyond the NUL terminator. The hostname originates from caller-supplied input via getaddrinfo()/dns_get_addr_info()/dns_resolve_name(), making it reachable from configuration sources or remote inputs. On memory-constrained allocations (e.g., exact strlen+1 byte buffers in userspace with k_usermode_string_alloc_copy), the over-read crosses allocation boundaries. If the boundary is unmapped—typical under MPU/memory-domain isolation or address sanitizers—a fault occurs. The over-read bytes are never dereferenced for use, so no information disclosure occurs. Presence requires CONFIG_MDNS_RESOLVER enabled. The fix replaces memcmp with strcmp to ensure NUL-safe comparison.
Business impact
This vulnerability poses a moderate operational risk to Zephyr-based IoT and embedded systems relying on mDNS. An operator or attacker capable of injecting hostnames—via configuration files, DNS server redirects, or application-level input—can trigger a denial of service. The impact is magnified in headless IoT deployments where crash recovery is manual or time-consuming. Organizations running Zephyr with mDNS enabled should assess whether hostname inputs are accessible to untrusted sources (e.g., downloaded configs, API responses, or network-supplied parameters). For edge systems with redundancy, impact is contained; for single-point-of-failure devices (sensors, gateways, firmware update servers), unexpected crashes disrupt operations. The low CVSS score reflects the limited attack surface and lack of confidentiality or integrity compromise, but operational availability is the primary concern.
Affected systems
Zephyr versions v1.10.0 and later with CONFIG_MDNS_RESOLVER enabled are affected. The vulnerability manifests only when mDNS resolution is compiled in. Affected systems include: embedded IoT devices (sensors, gateways, edge controllers), network-attached appliances, industrial IoT systems, and any Zephyr-based application that resolves .local or other short-suffix hostnames. Systems running Zephyr without mDNS resolver enabled, or versions prior to v1.10.0, are not affected. Devices with strict memory isolation (ARMv7-M with MPU, ARMv8-M, or systems running address sanitizers) are more likely to exhibit the crash; devices with permissive memory layouts may experience silent over-reads with no immediate symptom.
Exploitability
Exploitation requires the ability to inject or influence hostname input through configuration, command-line arguments, parsed URLs, or application-facing APIs. Direct network exploitation is indirect—an attacker must control a hostname that reaches the resolver (e.g., via malicious config file, compromised configuration server, or application-level input validation bypass). The attack is reliable on memory-protected systems (faults are deterministic), but less reliable on systems with flat memory or no guard pages (the over-read may not trigger a visible crash). No authentication is required, and user interaction is not needed if hostname input is automated (e.g., periodic config sync, DNS rebinding, or embedded configuration parsing). Complexity is low once input control is achieved. Overall exploitability is moderate: low complexity, high barrier to input control, but reliable impact once achieved.
Remediation
The vendor (Zephyr Project) has released a fix by replacing the fixed-length memcmp with a NUL-safe strcmp. Operators should update to a patched Zephyr version as provided in the vendor advisory. If immediate patching is not feasible, mitigate by: (1) disabling CONFIG_MDNS_RESOLVER at compile time if mDNS is not required, (2) restricting sources of hostname input (e.g., signed configuration files, allowlists), or (3) deploying memory-protection mechanisms (MPU, guard pages) if not already enabled. For systems already using memory protection or address sanitizers, crashes will alert operators to attempted exploitation; configure monitoring to detect and respond to these faults.
Patch guidance
Apply the vendor's patch or upgrade to a fixed Zephyr release version. Verify against the Zephyr Project advisory for the specific patched version number. The fix involves replacing memcmp(strrchr(query, '.'), ".local", 7) with strcmp(ptr, ".local") or equivalent NUL-safe string comparison. Patch testing should confirm that mDNS resolution continues to function correctly for .local hostnames and that no regression occurs in DNS resolution for standard TLDs (.com, .org, .net, .io, etc.). On systems with memory constraints, re-validate memory allocation sizes and guard-page configurations after patching.
Detection guidance
Monitor for repeated crashes or watchdog resets in Zephyr applications with mDNS enabled, especially if they correlate with hostname resolution attempts. Enable address sanitizer (if feasible in test/staging) to detect and log out-of-bounds reads. In production, log all hostname resolution requests (especially those with short suffixes like .com, .org, .io) and correlate with system faults. Audit configuration sources for unexpected or suspicious hostnames injected via config files, environment variables, or remote APIs. Systems with MPU/memory-domain isolation will naturally generate fault logs (e.g., ARM M-class HardFault) when the over-read crosses a protected boundary; correlate these with mDNS resolver activity. No in-memory signatures of exploitation are left; detection relies on behavioral anomalies (crashes) or logging input sources.
Why prioritize this
Prioritize patching based on exposure and operational criticality. HIGH priority if: (1) Zephyr devices are exposed to untrusted hostname input (config downloads, API-driven setup, public DNS rebinding), (2) the device is single-point-of-failure, or (3) mDNS is actively used in your deployment. MEDIUM priority if: (1) Zephyr devices are in closed networks with limited input sources, or (2) redundancy masks crashes. LOW priority if: (1) CONFIG_MDNS_RESOLVER is disabled, or (2) Zephyr is not deployed in critical paths. Given the low CVSS (3.7) and lack of KEV status, this is not a zero-day or immediate emergency, but should still be addressed in the next planned patch cycle for affected systems.
Risk score, explained
CVSS 3.7 (LOW) reflects: Attack Vector = Network (input can come from remote config sources, but requires intermediate compromise of configuration channels), Attack Complexity = High (memory protection or specific buffer layout required to trigger crash), Privileges Required = None, User Interaction = None, Scope = Unchanged, Confidentiality = None (no data exposure), Integrity = None (no data corruption), Availability = Low (denial of service via crash, but not widespread—only affects mDNS-enabled instances and specific input patterns). The score does not account for operational context; in a critical embedded system with no redundancy, risk is higher. Organizations should supplement CVSS with operational criticality assessment.
Frequently asked questions
Does this vulnerability leak sensitive data?
No. The over-read bytes are never dereferenced or returned to the caller. The flaw causes only a denial of service via crash on memory-protected systems; there is no information disclosure.
Do I need to disable mDNS entirely to be safe?
Not necessarily. Patching is the recommended path. However, if mDNS is not actively used in your Zephyr deployment, disabling CONFIG_MDNS_RESOLVER at compile time eliminates the vulnerability entirely. Verify your build configuration to confirm mDNS is required for your use case.
What versions of Zephyr are affected?
Versions v1.10.0 and later with CONFIG_MDNS_RESOLVER enabled are affected. Earlier versions and builds without mDNS resolver are unaffected. Check your Zephyr version and configuration to determine exposure.
Can an attacker exploit this remotely without compromising the configuration?
Indirect remote exploitation is possible if the attacker controls a hostname that reaches the resolver, but this typically requires either compromising a configuration source (e.g., downloading a malicious config file), DNS rebinding, or application-level input bypass. Direct network access alone is not sufficient; the hostname must be injected into the resolution path by the application.
This analysis is provided for informational purposes. The vulnerability details, CVSS score, and affected versions are based on the published CVE record and vendor advisory. Organizations should verify patch availability and applicability to their specific Zephyr build configuration and deployment. No guarantee is made regarding completeness or real-time accuracy; consult official vendor advisories and security bulletins for authoritative guidance. Exploit development, distribution, or use of weaponized code is prohibited by applicable laws and SEC.co policies. Source: NVD (public-domain), retrieved 2026-08-14. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10645MEDIUMZephyr ext2 Directory Entry Out-of-Bounds Memory Read & Denial of Service
- CVE-2026-10652MEDIUMZephyr DNS Resolver Out-of-Bounds Read (MEDIUM)
- CVE-2026-10658HIGHZephyr Bluetooth ISO Buffer Underflow Memory Corruption
- CVE-2026-9263MEDIUMZephyr Bluetooth ISO Adaptation Layer Memory Disclosure
- CVE-2026-0130LOWAndroid RTCP Buffer Overflow Information Disclosure Vulnerability
- CVE-2026-0142LOWAndroid AVB RSA Key Parsing Out-of-Bounds Read Information Disclosure
- CVE-2026-10233LOWOut-of-Bounds Read in Assimp Half-Life MDL Loader
- CVE-2026-10267LOWOut-of-Bounds Read in Janet Language Debug Frame Handling