From nobody@FreeBSD.org  Wed Oct 16 13:11:17 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DB17637B401
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Oct 2002 13:11:17 -0700 (PDT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7A0C443E6E
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Oct 2002 13:11:17 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9GKBH7R053810
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 16 Oct 2002 13:11:17 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.6/8.12.6/Submit) id g9GKBHRO053809;
	Wed, 16 Oct 2002 13:11:17 -0700 (PDT)
Message-Id: <200210162011.g9GKBHRO053809@www.freebsd.org>
Date: Wed, 16 Oct 2002 13:11:17 -0700 (PDT)
From: Phungte Ha <phungte@decru.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Diskless kernel may crash, depends on the root fs name
X-Send-Pr-Version: www-1.0

>Number:         44150
>Category:       kern
>Synopsis:       Diskless kernel may crash, depends on the root fs name
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 16 13:20:00 PDT 2002
>Closed-Date:    Wed May 07 21:53:35 UTC 2008
>Last-Modified:  Wed May 07 21:53:35 UTC 2008
>Originator:     Phungte Ha
>Release:        4.4.
>Organization:
Decru, Inc.
>Environment:
FreeBSD walnut 4.4-RELEASE FreeBSD 4.4-RELEASE #2: Wed Oct 16 12:45:39 PDT 2002 root@hw50.decru.com:/usr/src/sys/compile/DISKLESS  i386
>Description:
    depends on the name of the root device, for instance:
"nfs:phungte2:/local/diskless_root" the kernel can returns 1 from setrootbyname() in vfs_conf.c or can crash.  
>How-To-Repeat:
      
>Fix:
      in setrootbyname(), the line parsing the name is currently like this:
      while (cp != '\0' && (*cp < '0' || *cp > '9'))
              cp++;

      it should rather be:

      while (cp != NULL && *cp != 0 || (*cp < '0' || *cp > '9'))
              cp++;

The problem seems to be there still in 4.6.2 in getdiskbyname().

PS: Sorry for mistakenly submitting this report several times 
by typing TAB and CR while coping the source in...




>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: kmacy 
State-Changed-When: Fri Nov 16 04:37:11 UTC 2007 
State-Changed-Why:  

Need to confirm that this is still an issue. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44150 

From: Kris Kennaway <kris@FreeBSD.org>
To: bug-followup@FreeBSD.org, phungte@decru.com
Cc:  
Subject: Re: kern/44150: Diskless kernel may crash, depends on the root fs
 name
Date: Sun, 20 Jan 2008 15:15:15 +0100

 I don't understand the claim, if you use "nfs:phungte2" as your root 
 device then how is the kernel supposed to resolve phungte2 into an IP 
 address?
 
 Kris
State-Changed-From-To: feedback->closed 
State-Changed-By: vwe 
State-Changed-When: Wed May 7 21:53:14 UTC 2008 
State-Changed-Why:  

We're sorry to not see any feedback received for quite some time. 
If you think this is still an issue that should be worked on, 
please provide the requested information and we'll be happy to 
re-open this ticket. 
Thank you for bringing this problem to attention! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44150 
>Unformatted:
