Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jun 1999 20:23:48 -0400 (EDT)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        Archie Cobbs <archie@whistle.com>
Cc:        freebsd-current@FreeBSD.ORG, freebsd-net@FreeBSD.ORG
Subject:   subtle SIOCGIFCONF bug
Message-ID:  <199906050023.UAA12466@khavrinen.lcs.mit.edu>
In-Reply-To: <199906050018.RAA85167@bubba.whistle.com>
References:  <199906050018.RAA85167@bubba.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Fri, 4 Jun 1999 17:18:57 -0700 (PDT), Archie Cobbs <archie@whistle.com> said:

>   Should the kernel insure that ifr->ifr_addr.sa_len is always at
>   least sizeof(ifr->ifr_addr), or should the user programs adjust
>   their pointer increment algorithm? At first I assumed the latter
>   answer (patches below) but now am not so sure.

The user programs should not use SIOCGIFCONF.

>   It doesn't appear the net/if.c:ifioctl() function is protected
>   at all by splnet(), even though it is accessing all kinds of
>   networking information. Is this a race condition?

No.  ifioctl() should only be called from the ioctl syscall or other
contexts where preemption is not an issue.

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
wollman@lcs.mit.edu  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA|                     - Susan Aglukark and Chad Irschick


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?199906050023.UAA12466>