NetBSD Problem Report #10351

Received: (qmail 17044 invoked from network); 13 Jun 2000 08:04:35 -0000
Message-Id: <200006130804.KAA29277@horn.ics.muni.cz>
Date: Tue, 13 Jun 2000 10:04:31 +0200 (MEST)
From: salvet@ics.muni.cz
Reply-To: salvet@ics.muni.cz
To: gnats-bugs@gnats.netbsd.org
Subject: arplookup reentrancy problem (+fix)
X-Send-Pr-Version: 3.95

>Number:         10351
>Category:       kern
>Synopsis:       arplookup reentrancy problem (+fix)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 13 08:05:00 +0000 2000
>Closed-Date:    Sun Jul 02 21:53:38 +0000 2000
>Last-Modified:  Sun Jul 02 21:53:38 +0000 2000
>Originator:     Zdenek Salvet
>Release:        1.4.2
>Organization:
Institute of Computer Science of Masaryk University, Brno, Czech Republic
>Environment:

>Description:
  arplookup() can be interrupted by NIC interrupt and reentered via
  ipflow fast forwarding. Unresolved arptab entry manipulation
  is not properly protected.
>How-To-Repeat:
  simulate IP traffic such that multiple flows use the same next hop,
  some of them hit in the flow cache, some of them not,
  then let the arptab entry expire 
>Fix:
--- ../../../netinet/if_arp.c.orig      Tue Jun 13 09:35:41 2000
+++ ../../../netinet/if_arp.c   Tue Jun 13 09:45:43 2000
@@ -403,6 +403,7 @@
 {
        register struct llinfo_arp *la;
        struct sockaddr_dl *sdl;
+       int s;

        if (rt)
                la = (struct llinfo_arp *)rt->rt_llinfo;
@@ -431,9 +432,11 @@
         * response yet.  Replace the held mbuf with this
         * latest one.
         */
+       s = splnet();
        if (la->la_hold)
                m_freem(la->la_hold);
        la->la_hold = m;
+
        /*
         * Re-send the ARP request when appropriate.
         */
@@ -461,6 +464,7 @@
                        }
                }
        }
+       splx(s);
        return (0);
 }


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: sommerfeld 
State-Changed-When: Sun Jul 2 14:52:59 PDT 2000 
State-Changed-Why:  
was fixed in -current before PR was opened; fix was just  
pulled up to the 1.4 branch. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.