CVE-2026-30871: OpenWrt Project has Stack-based Buffer Overflow in DNS PTR Query
OpenWrt Project is a Linux operating system targeting embedded devices. In versions prior to 24.10.6 and 25.12.1, the mdns daemon has a Stack-based Buffer Overflow vulnerability in the parsequestion function. The issue is triggered by PTR queries for reverse DNS domains (.in-addr.arpa and .ip6.arpa). DNS packets received on UDP port 5353 are expanded by dnexpand into an 8096-byte global buffer (namebuffer), which is then copied via an unbounded strcpy into a fixed 256-byte stack buffer when handling TYPEPTR queries. The overflow is possible because dnexpand converts non-printable ASCII bytes (e.g., 0x01) into multi-character octal representations (e.g., \001), significantly inflating the expanded name beyond the stack buffer's capacity. A crafted DNS packet can exploit this expansion behavior to overflow the stack buffer, making the vulnerability reachable through normal multicast DNS packet processing. This issue has been fixed in versions 24.10.6 and 25.12.1.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-30871?
CVE-2026-30871 has a high severity rating due to the potential for remote code execution through a stack-based buffer overflow.
How do I fix CVE-2026-30871?
To fix CVE-2026-30871, upgrade your OpenWrt installation to version 24.10.6 or 25.12.1 or later.
What versions of OpenWrt are affected by CVE-2026-30871?
CVE-2026-30871 affects OpenWrt versions prior to 24.10.6 and 25.12.1.
What component of OpenWrt is vulnerable in CVE-2026-30871?
The mdns daemon is the vulnerable component in OpenWrt affected by CVE-2026-30871.
What trigger causes CVE-2026-30871 to occur?
CVE-2026-30871 is triggered by a malformed DNS PTR query leading to stack-based buffer overflow.