Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 1996 23:28:31 +1030
From:      miff@spam.frisbee.net.au
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/946: divide-by-zero in kernel on bad disk info
Message-ID:  <199601151258.XAA20113@lovely.spam.frisbee.net.au>
Resent-Message-ID: <199601151250.EAA11465@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         946
>Category:       kern
>Synopsis:       divide-by-zero in kernel on bad disk info
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 15 04:50:01 PST 1996
>Last-Modified:
>Originator:     michael smith
>Organization:
Just me.
>Release:        FreeBSD 2.1-STABLE i386
>Environment:

	A disk controller that reports zero for sectors-per-track
	(only observed with the 'wd' driver)

>Description:

	correct_readdisklabel() (ufs/ufs_disksubr.c) doesn't check 
	lp->d_secpercyl before dividing by it, and the error isn't 
	picked up in the wd driver before this point.
	(The same problem is present in -current)

>How-To-Repeat:

	Find a controller combination (in this case, an Adaptec 2320D)
	that results in s/t being zero.
	Power the controller up without having any disks enabled in the
	BIOS.  The controller appears not to check the geometry of its
	disks on reset. (boot probe shows 306/4/0)
	Say 'disklabel <disk>'.

>Fix:
	
	Check d_secpercyl at some point prior to dividing, or perhaps
	reject bogus disks out of hand.



>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601151258.XAA20113>