Subject: admin/13313: usr/src/sys/netinet/in_arp.c:arplookup() uses potentially unprotected static variable ...
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ernest@luminous.com>
List: netbsd-bugs
Date: 06/25/2001 21:25:03
>Number:         13313
>Category:       admin
>Synopsis:       usr/src/sys/netinet/in_arp.c:arplookup() uses potentially unprotected static variable ...
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    netbsd-admin
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 25 21:23:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Ernest Hua
>Release:        1.5
>Organization:
Luminous Networks
>Environment:
N/A (Not using NetBSD at this moment)
>Description:
I suspect that there is a hidden problem in using this static variable
in arplookup.  We actually found this while working in VxWorks 5.4, but
it appears to be in FreeBSD and NetBSD as well.  I'll check a few other
OS's later.  The problem is the static variable "sin" in arplookup(),
which is used to hold the IP address to look up.  I am not a network
stack expert, but I suspect this path is not multi-thread friendly, and
will have potentially corrupted results for simultaneous callers.

>How-To-Repeat:

>Fix:
Remove the "static" keyword.

>Release-Note:
>Audit-Trail:
>Unformatted: