Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Apr 1996 13:10:04 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        franky@pinewood.nl (Frank ten Wolde)
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: 2.2-960323 Panic in mount_msdos
Message-ID:  <199604042010.NAA22425@phaeton.artisoft.com>
In-Reply-To: <9604041520.ZM3696@pwood1.pinewood.nl> from "Frank ten Wolde" at Apr 4, 96 03:20:03 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> I just tried to mount a Windows NT file system (NTFS) using:
> 
> 	mount -t msdos /dev/sd0s2 /dos
> 
> (I thought it was an MSDOS-FAT file system :-).  The 2.2-960223-SNAPSHOT
> of FreeBSD immediately paniced:

[ ... ]

> I know you cannot mount an NTFS under FreeBSD, but at least the system
> should not crash.
> 
> I just report this problem as I have too little knowledge of the internals
> of the kernel to fix the problem myself :-)

A file system operates by copying on disk strucutures into memory
and then using the offsets in the coppy to access additional memory.

It does not bounds-check these accesses.

If there is a problem with this, it's that the DOSFS did not validate
that the device was in fact a DOS partition before going gung-ho into
dereferencing.

Not bounds-checking dereferences isn't an error; it an optimization,
and it's allowable because mount is not a user accessable command
(you have to be root).

The fix for inconsistent media is to run fsck (or equivalent) on it
before attempting a mount; the fix is procedural, in other words,
and doesn't require a change to the mount code.

The DOSFS code is, unfortunately, well known to be unstable.  It
does not do the type validation it should, ad there is not a fsck
equivalent program as part of the package.

The DOSFS is being rewritten (not by me).

For now, make sure that you have chkdsk'ed the DOS disk prior to
booting FreeBSD.  If it fails chkdsk, do not attempt to mount it.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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