Date: Wed, 16 Oct 2002 13:11:17 -0700 (PDT) From: Phungte Ha <phungte@decru.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/44150: Diskless kernel may crash, depends on the root fs name Message-ID: <200210162011.g9GKBHRO053809@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 44150
>Category: misc
>Synopsis: Diskless kernel may crash, depends on the root fs name
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 16 13:20:00 PDT 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210162011.g9GKBHRO053809>
