From owner-freebsd-current Fri Jun 4 17:23:58 1999 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 35CA115300; Fri, 4 Jun 1999 17:23:53 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.1/8.9.1) id UAA12466; Fri, 4 Jun 1999 20:23:48 -0400 (EDT) (envelope-from wollman) Date: Fri, 4 Jun 1999 20:23:48 -0400 (EDT) From: Garrett Wollman Message-Id: <199906050023.UAA12466@khavrinen.lcs.mit.edu> To: Archie Cobbs Cc: freebsd-current@FreeBSD.ORG, freebsd-net@FreeBSD.ORG Subject: subtle SIOCGIFCONF bug In-Reply-To: <199906050018.RAA85167@bubba.whistle.com> References: <199906050018.RAA85167@bubba.whistle.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG < 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-current" in the body of the message