diff --git a/CHANGELOG b/CHANGELOG index 485d4a3..b34d4ea 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,7 +15,9 @@ version 2.94 Fix heap OOB write in relay_upstream6() Thanks to Akin Yilma (DecompilerAI) and Georgi Steffenhagen for spotting this. - CVE-2026-133730 appiles. + CVE-2026-133730 applies. Also fix heap OOB write in send_ra_alias() + which arrises from the same mistake, Credit to + Georgi Steffenhagen (ServerTec IT Engineering) for this one. version 2.93 Fix a corner-case in DNSSEC validation with wildcards. If we have diff --git a/src/radv.c b/src/radv.c index e31bc25..3e8e7fc 100644 --- a/src/radv.c +++ b/src/radv.c @@ -400,6 +400,10 @@ static void send_ra_alias(time_t now, int iface, char *iface_name, struct in6_ad up = &context->next; } + /* Adding the prefixes above may have moved the packet buffer, + so find the header again before writing to it. */ + ra = daemon->outpacket.iov_base; + /* If we're advertising only old prefixes, set router lifetime to zero. */ if (old_prefix && !parm.found_context) ra->lifetime = htons(0); @@ -531,6 +535,9 @@ static void send_ra_alias(time_t now, int iface, char *iface_name, struct in6_ad put_opt6(&parm.link_local, IN6ADDRSZ); } + /* The options added since then may have moved the buffer again. */ + ra = daemon->outpacket.iov_base; + /* set managed bits unless we're providing only RA on this link */ if (parm.managed) ra->flags |= 0x80; /* M flag, managed, */