NetBSD Problem Report #606

From gnats  Sat Dec  3 15:38:32 1994
Received: (from cgd@localhost) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) id PAA01317; Sat, 3 Dec 1994 15:38:32 -0800
Message-Id: <199412032338.PAA01317@sun-lamp.cs.berkeley.edu>
Date: Sat, 3 Dec 1994 15:38:32 -0800
From: "Chris G. Demetriou" <cgd>
Reply-To: cgd
To: gnats-bugs@NetBSD.ORG
Subject: mount_ados/adosfs insecure
X-Send-Pr-Version: 3.2

>Number:         606
>Category:       kern
>Synopsis:       mount_ados allows anybody to mount an ados fs anywhere.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 03 15:50:04 +0000 1994
>Closed-Date:    Wed Mar 22 17:45:56 +0000 1995
>Last-Modified:  
>Originator:     Chris G. Demetriou
>Release:        1.0A
>Organization:
Kernel Hackers 'r' Us
>Environment:

System: NetBSD sun-lamp.cs.berkeley.edu 1.0 NetBSD 1.0 (SUN_LAMP) #9: Sun Nov 20 22:47:57 PST 1994 mycroft@sun-lamp.cs.berkeley.edu:/e/mycroft/sys/arch/i386/compile/SUN_LAMP i386


>Description:
	(reported by Matthias Scheler <tron@lyssa.owl.de>.)

	mount_ados allows any user to mount any block device as an ados
	file system, on any directory, because it's set-uid and a
	set of important checks is ommitted from the adosfs mount code.

	also, adosfs code doesn't set user-mount flag, so user can unmount
	the file system.

>How-To-Repeat:
	as a random user:

	mount_ados <block device> <dir>
	where you don't necessarily have appropriate permissions on the
	block device or the directory.  (note that it works.)

	umount <dir>
	(note that it fails)

>Fix:
	"quick fix": chmod 555 /sbin/mount_ados
	correct fix: clone the permissions checking code out of msdosfs,
		so that permissions are correctly checked for ados filee
		systems.  also, properly set the user-mount flag, and
		make sure the adosfs unmount code does the right thing.

	I would do it myself, but i have absolutely no hope of testing it.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Wed Mar 22 09:45:56 PST 1995 
State-Changed-Why:  
Fixed a few moons ago. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.