{"vuln_id":"CVE-2026-30871","aliases":["GHSA-7c3j-f7w2-p8f6"],"description":"mdnsd: Stack buffer overflow in DNS PTR query","published_at":"2026-03-19T16:29:33Z","modified_at":"2026-03-19T17:30:08Z","first_seen_at":"2026-11-22T13:40:33.560613Z","severity":"critical","severity_source":"ghsa","cvss_score":9.5,"cvss_vector":"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","cwe":[],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.01363,"epss_percentile":0.72476,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-30871"},"matched_alias":null,"items":[{"id":12268,"source":{"id":"gh-openwrt","name":"OpenWrt releases + advisories (GitHub openwrt/openwrt tags)"},"title":"GHSA-7c3j-f7w2-p8f6 / CVE-2026-30871: mdnsd: Stack buffer overflow in DNS PTR query","summary":"mdnsd: Stack buffer overflow in DNS PTR query\n\nThe mdns daemon contains a stack buffer overflow vulnerability in the parse_question\r\nfunction when processing PTR queries for reverse DNS domains (.in-addr.arpa and\r\n.ip6.arpa). The vulnerability is reachable through normal DNS packet processing when\r\nthe daemon receives multicast DNS queries on UDP port 5353.\r\nDNS packets are first processed by dns_handle_packet, which validates and processes\r\nthe packets in dns_consume_name. This function calls dn_expand to expand the queried\r\ndomain into the fixed-sized global buffer, name_buffer, which holds 8096 bytes\r\n(MAX_NAME_LEN).\r\nThe same global buffer is then processed in the parse_question function, where\r\ndifferent types of DNS queries are handled. For TYPE_PTR queries, the function checks if\r\nname_buffer ends with a reverse DNS suffix. When a match is found, it performs an\r\nunbounded strcpy from the potentially large expanded name in name_buffer into fixed\r\n256-byte stack buffers.\r\nThe issue is that when dn_expand encounters non-printable ASCII bytes (0x01, 0x02, …), it\r\nwill convert the bytes to their octal representations. For example, the byte 0x01 would be\r\nconverted to its octal counterpart, \\001, which is 0x5C 0x30 0x30 0x31.\r\nAs such, it is possible to forge a maliciously crafted DNS packet such that when it is\r\nexpanded, it is much greater than the intended 256-byte stack buffer.\n\nAffected packages: :OpenWrt\nPatched: OpenWrt 24.10.6, OpenWrt 25.12.1","url":"https://github.com/openwrt/openwrt/security/advisories/GHSA-7c3j-f7w2-p8f6","published_at":"2026-03-19T16:29:33Z","updated_at":"2026-03-19T17:30:08Z","fetched_at":"2026-11-22T13:40:33.544623Z","severity":"critical","cvss_score":9.5,"epss":0.01363,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"openwrt","product":"OpenWrt","vuln_id":"CVE-2026-30871","vuln_ids":["CVE-2026-30871","GHSA-7C3J-F7W2-P8F6"],"tags":["repo-advisory","","security","repo:openwrt/openwrt"],"cluster_id":11488,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12268","html":"https://vulnwatch.ve1ve2.com/item/12268"}}]}