kern/28417: arplookup uses potentially unprotected static variable ...

[ Available lists | Index of freebsd-bugs | Month of Jun 2001 | Week of 25 Jun 2001 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Ernest Hua <ernest@luminous.com>
Date
25 Jun 2001 20:50:08
Subject
kern/28417: arplookup uses potentially unprotected static variable ...
Message-ID
200106260342.f5Q3guO01335@freefall.freebsd.org


[ Hide this part ]
 
>Number: 28417
>Category: kern
>Synopsis: arplookup uses potentially unprotected static variable ...
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 25 20:50:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Ernest Hua
>Release: 4.2-RELEASE
>Organization:
Luminous Networks
>Environment:
FreeBSD ernestbsd.luminousnetworks.com 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:55 GMT 2000 jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC i386

>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:

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



Elapsed time: 0.113 seconds