Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Apr 2026 12:03:14 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 607f6be6ec19 - main - rtadvd: Fix validation of the MTU parameter when parsing config
Message-ID:  <ac1BwqysKLKBEAKq@framework>
In-Reply-To: <8npqp22o-247n-ps59-65qr-n7n79n935s0@mnoonqbm.arg>
References:  <69cd0d71.1a157.2cbcbd77@gitrepo.freebsd.org> <8npqp22o-247n-ps59-65qr-n7n79n935s0@mnoonqbm.arg>

index | next in thread | previous in thread | raw e-mail

On Wed, Apr 01, 2026 at 03:25:44PM +0000, Bjoern A. Zeeb wrote:
> On Wed, 1 Apr 2026, Mark Johnston wrote:
> 
> > The branch main has been updated by markj:
> > 
> > URL: https://cgit.FreeBSD.org/src/commit/?id=607f6be6ec19f49ff595226afe1c8aa6515c59a0
> > 
> > commit 607f6be6ec19f49ff595226afe1c8aa6515c59a0
> > Author:     Mark Johnston <markj@FreeBSD.org>
> > AuthorDate: 2026-04-01 12:14:24 +0000
> > Commit:     Mark Johnston <markj@FreeBSD.org>
> > CommitDate: 2026-04-01 12:19:35 +0000
> > 
> >    rtadvd: Fix validation of the MTU parameter when parsing config
> > 
> >    MFC after:      1 week
> > ---
> > usr.sbin/rtadvd/config.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
> > index 83b2efb68303..c0af8f76ca49 100644
> > --- a/usr.sbin/rtadvd/config.c
> > +++ b/usr.sbin/rtadvd/config.c
> > @@ -619,7 +619,7 @@ getconfig_free_pfx:
> > 		get_prefix(rai);
> > 
> > 	MAYHAVE(val64, "mtu", 0);
> > -	if (val < 0 || val64 > 0xffffffff) {
> > +	if (val64 < 0 || val64 > 0xffffffff) {
> 
> Forgive me for asking, but would a reasonable check possibly cap this
> right away at 0xffff as I cannot see us having interfaces with an
> MTU larger than that.
> We just removed IPv6 Jumbograms (or still in review?) for similar reasons?

The code does this several lines later, after truncating the value to a
32-bit integer.

> > 		syslog(LOG_ERR,
> > 		    "<%s> mtu (%" PRIu64 ") on %s out of range",
> > 		    __func__, val64, ifi->ifi_ifname);
> > 
> > 
> 
> -- 
> Bjoern A. Zeeb                                                     r15:7


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ac1BwqysKLKBEAKq>