NetBSD Problem Report #39305

From dyoung@cuw.ojctech.com  Wed Aug  6 19:29:08 2008
Return-Path: <dyoung@cuw.ojctech.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id B70AC63B853
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  6 Aug 2008 19:29:08 +0000 (UTC)
Message-Id: <20080806182631.599602802B@cuw.ojctech.com>
Date: Wed,  6 Aug 2008 13:26:31 -0500 (CDT)
From: dyoung@cuw.ojctech.com
Reply-To: dyoung@cuw.ojctech.com
To: gnats-bugs@gnats.NetBSD.org
Subject: loops through gre(4) cause a hang or crash
X-Send-Pr-Version: 3.95

>Number:         39305
>Category:       kern
>Synopsis:       loops through gre(4) cause a hang or crash
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    dyoung
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 06 19:30:00 +0000 2008
>Last-Modified:  Wed Aug 06 21:09:47 +0000 2008
>Originator:     David Young
>Release:        NetBSD 4.99.70
>Organization:
OJC Technologies * Urbana, Illinois
>Environment:
System: NetBSD cuw 4.99.70 NetBSD 4.99.70 (elan) #0: Fri Jul 18 17:21:29 CDT 2008  dyoung@cuw.ojctech.com:/u5/dyoung-scratch/scratch-pm/i386/O/sys/arch/i386/compile/elan i386
Architecture: i386
Machine: i386
>Description:
If a gre(4) is configured with inner destination address equal to
outer destination address, the kernel will loop forever trying
to deliver packets that pass through that gre(4) instance.
>How-To-Repeat:
ifconfig gre0 create inet$SIX $SRC0 $DST tunnel inet$SIX $SRC1 $DST
ifconfig gre0 up
ping$SIX $DST
>Fix:
Short-term: as packets traverse a gre(4), tag them in gre_output()
        with an identifier for that gre instance.  But first check
        packets in gre_output() for that instance's tag.  If the
        instance tag is already present, send an ICMP/ICMPv6 error
        response to the sender to indicate the loop.

Long-term: in addition to the above, let us configure two routes
	to any destination---i.e., multipath routing.  Qualify a
	gre(4)'s outer destination address so that it resolves to
	a different route than the route to itself.  Use route
	metrics (say) to make the system prefer the route through
	gre(4).

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->dyoung
Responsible-Changed-By: dyoung@NetBSD.org
Responsible-Changed-When: Wed, 06 Aug 2008 21:09:47 +0000
Responsible-Changed-Why:
I'll fix it in time for 5.0.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.