GHSA-mpgh-v658-jqv5 / CVE-2026-30872: mdnsd: Stack buffer overflow in IPv6 reverse DNS lookup
- Published:
- Fetched:
- Updated:
- Affects:
- openwrt OpenWrt
https://github.com/openwrt/openwrt/security/advisories/GHSA-mpgh-v658-jqv5 ↗
mdnsd: Stack buffer overflow in IPv6 reverse DNS lookup The mdns daemon contains a stack buffer overflow vulnerability in the match_ipv6_addresses function when processing PTR queries for IPv6 reverse DNS domains (.ip6.arpa). The vulnerability is reachable through normal DNS packet processing when the daemon receives multicast DNS queries on UDP port 5353. The global buffer name_buffer, which holds the expanded domain after the call to dns_consume_name, is processed in the parse_question function, where different DNS query types are handled. For TYPE_PTR queries, dns_consume_name checks if name_buffer ends with a reverse DNS suffix. If a match is found, the strcpy operation is performed from name_buffer into a fixed 256-byte stack buffer with the IPv6 reverse DNS suffix being excluded. The resultant buffer is then processed by dns_reply_reverse_ip6_mapping, which calls match_ipv6_addresses. In the match_ipv6_addresses function, the reverse IPv6 request is extracted into a buffer of length INET6_ADDRSTRLEN (46). Since the length of the data in the 256-byte buffer is not checked before extracting the IPv6 address, it is possible for the data to be larger than 46 bytes, leading to an out-of-bounds (OOB) write Affected packages: :OpenWrt Patched: OpenWrt 24.10.6, OpenWrt 25.12.1