NetBSD Problem Report #474
From gnats Tue Sep 13 10:03:34 1994
Received: from wipux2.wifo.uni-mannheim.de (wipux2.wifo.uni-mannheim.de [134.155.59.2]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id KAA03066 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Tue, 13 Sep 1994 10:03:27 -0700
Message-Id: <199409131705.TAA00683@wipux2.wifo.uni-mannheim.de>
Date: Tue, 13 Sep 1994 19:05:25 +0200
From: andrew@wipux2.wifo.uni-mannheim.de (Andrew Wheadon)
Reply-To: andrew@wipux2.wifo.uni-mannheim.de
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: Kernel crashing on wrong access to mfs mounted /tmp
X-Send-Pr-Version: 3.2
>Number: 474
>Category: port-i386
>Synopsis: panic when userland executable messes with /tmp
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 13 10:05:04 +0000 1994
>Closed-Date: Wed Mar 22 17:41:02 +0000 1995
>Last-Modified:
>Originator: Andrew Wheadon
>Release:
>Organization:
>Environment:
System: NetBSD wipux2.wifo.uni-mannheim.de 1.0_BETA NetBSD 1.0_BETA (TEST) #0: Sun Sep 11 15:32:13 MET DST 1994 toor@wipux2.wifo.uni-mannheim.de:/src/src/sys/arch/i386/compile/TEST i386
>Description:
There seems to be a problem in the mfs-layer which causes
a panic when for example pine messes with an mfs-mounted /tmp
and one then tries to create a file in /tmp.
>How-To-Repeat:
mount /tmp as an mfs: (/etc/fstab)
/dev/sd0b /tmp mfs rw,-s=48000 0 0
Compile pine (./build bsi) (probs: sys_errlist and prototype
sstrcasecmp is wrong)
install with no special perms. Run as a normal user on a
mail folder with a few mails in. (I did it with 2,3 and 6)
read the mail with pine.
While running pine will create a file on /tmp of about
4 GB in size (according to ls -l /tmp) this takes less
than a second and nothing seems to really be written.
quit pine.
Do an ls -l /tmp and the file is gone.
Create a file on /tmp with 'cat >/tmp/t' and the kernel
panics on panic-ffs_vfree-ffs_blkpref-ffs_blkpref-ffs_alloc-
ffs_balloc-ffs_write-vn_write-write-syscall(number 4)
This bug is at least 2 months old but at the time I thought
it was just me. I've meanwhile tried it on a normal /tmp and
there it doesn't fail.--- So it seems to be a bug in the mfs-code
and since I'm a normal user and the binary has no special
permissions it seems that anybody who wishes to can crash the
machine. Just copy over a pine-binary and run it...
>Fix:
Don't use pine. || Don't use mount_mfs. ;-)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: mycroft
State-Changed-When: Wed Mar 22 09:41:02 PST 1995
State-Changed-Why:
This was caused by a bug in pine and a failure to check for certain boundary
conditions in the FFS/MFS code. It has been fixed for several months.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.