Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2002 09:31:26 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Vincent Jardin <vjardin@wanadoo.fr>
Cc:        freebsd-net@FreeBSD.ORG, Lars Eggert <larse@ISI.EDU>
Subject:   Re: Recursive encapsulation could panic the Kernel
Message-ID:  <20021219093126.B30203@Odin.AC.HMC.Edu>
In-Reply-To: <3E018315.5070602@isi.edu>; from larse@ISI.EDU on Thu, Dec 19, 2002 at 09:28:05AM %2B0100
References:  <3DF62DBD0032C2ED@mel-rta6.wanadoo.fr> <3E018315.5070602@isi.edu>

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

--EuxKj2iCbKjpUGkD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

> On 12/16/2002 9:45 PM, Vincent Jardin wrote:
> >=20
> > With FreeBSD, there are many ways to create a recursive local encapsula=
tion=20
> > loop within the IPv4 and IPv6 stack.
> ...
> > There is a simple local solution that is used by gif_output() that is n=
ot=20
> > protected by any mutex:
> ..
> > 	if (++called > max_gif_nesting) {
> > 		log(LOG_NOTICE,
> > 		    "gif_output: recursively called too many times(%d)\n",
> > 		    called);
> > 		m_freem(m);
> > 		error =3D EIO;	/* is there better errno? */
> > 		goto end;
> > 	}
> >=20
> > I am wondering if a more generic solution could be found, however I do =
not=20
> > have any idea yet ;-(

Since we now have m_tag support, we could implement the solution OpenBSD
uses which catches actual loops instead of just refusing to nest more then
a certain amount.  See sys/net/if_gif.c rev 1.19.

-- Brooks

--=20
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

--EuxKj2iCbKjpUGkD
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+AgJsXY6L6fI4GtQRAml/AJ0Y44wjRBlocuGuH5FSkCvsiydFBACfWGmn
HolDmI5PBToLu2hKEJdd+ns=
=HixY
-----END PGP SIGNATURE-----

--EuxKj2iCbKjpUGkD--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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