VulnWatch by ve1ve2
critical 9.5 EPSS 1.36%

GHSA-7c3j-f7w2-p8f6 / CVE-2026-30871: mdnsd: Stack buffer overflow in DNS PTR query

Source:
OpenWrt releases + advisories (GitHub openwrt/openwrt tags)
Published:
Fetched:
Updated:
Affects:
openwrt OpenWrt

https://github.com/openwrt/openwrt/security/advisories/GHSA-7c3j-f7w2-p8f6 ↗

repo-advisorysecurityrepo:openwrt/openwrt

mdnsd: Stack buffer overflow in DNS PTR query The mdns daemon contains a stack buffer overflow vulnerability in the parse_question function when processing PTR queries for reverse DNS domains (.in-addr.arpa and .ip6.arpa). The vulnerability is reachable through normal DNS packet processing when the daemon receives multicast DNS queries on UDP port 5353. DNS packets are first processed by dns_handle_packet, which validates and processes the packets in dns_consume_name. This function calls dn_expand to expand the queried domain into the fixed-sized global buffer, name_buffer, which holds 8096 bytes (MAX_NAME_LEN). The same global buffer is then processed in the parse_question function, where different types of DNS queries are handled. For TYPE_PTR queries, the function checks if name_buffer ends with a reverse DNS suffix. When a match is found, it performs an unbounded strcpy from the potentially large expanded name in name_buffer into fixed 256-byte stack buffers. The issue is that when dn_expand encounters non-printable ASCII bytes (0x01, 0x02, …), it will convert the bytes to their octal representations. For example, the byte 0x01 would be converted to its octal counterpart, \001, which is 0x5C 0x30 0x30 0x31. As such, it is possible to forge a maliciously crafted DNS packet such that when it is expanded, it is much greater than the intended 256-byte stack buffer. Affected packages: :OpenWrt Patched: OpenWrt 24.10.6, OpenWrt 25.12.1

Linked vulnerabilities (2)

CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

mdnsd: Stack buffer overflow in DNS PTR query

Aliases: CVE-2026-30871
CVE-2026-30871 critical 9.5 EPSS 1.36% (p72) NVDCVE.orgGHSA
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

mdnsd: Stack buffer overflow in DNS PTR query

Aliases: GHSA-7c3j-f7w2-p8f6