diff --git a/CHANGELOG b/CHANGELOG index f160ca4..485d4a3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,7 +13,10 @@ version 2.94 for spotting and reporting this. A crafted reply can crash dnsmasq. CNVD-C-2026-590208 applies. - + Fix heap OOB write in relay_upstream6() Thanks to + Akin Yilma (DecompilerAI) and Georgi Steffenhagen for spotting this. + CVE-2026-133730 appiles. + version 2.93 Fix a corner-case in DNSSEC validation with wildcards. If we have a wildcard record *.example.com and receive a query for diff --git a/src/rfc3315.c b/src/rfc3315.c index 79d420f..690e2f6 100644 --- a/src/rfc3315.c +++ b/src/rfc3315.c @@ -2218,6 +2218,10 @@ int relay_upstream6(int iface_index, ssize_t sz, put_opt6(inbuff, sz); end_opt6(o); + /* Adding the options above may have moved the packet buffer, + so find the header again before writing to it below. */ + header = daemon->outpacket.iov_base; + for (; relay; relay = relay->next) if (relay->iface_index != 0 && relay->iface_index == iface_index) {