From owner-freebsd-bugs Wed Oct 16 13:20: 5 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08B1137B401 for ; Wed, 16 Oct 2002 13:20:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C9E443EAC for ; Wed, 16 Oct 2002 13:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9GKK1x3046513 for ; Wed, 16 Oct 2002 13:20:01 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9GKK1Rj046512; Wed, 16 Oct 2002 13:20:01 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB17637B401 for ; 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 ; 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 ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/44150: Diskless kernel may crash, depends on the root fs name Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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