Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: drew@ladymacb.cs.colorado.edu (Drew Eckhardt)
Subject: Re: Floppy Disk Security? (Re: Help: how to set the ownership ...)
Date: Fri, 1 May 1992 14:02:41 GMT	[thread overview]
Message-ID: <1992May1.140241.4112@colorado.edu> (raw)
In-Reply-To: 1992Apr28.121914.10226@sci34hub.sci.com

In article <1992Apr28.121914.10226@sci34hub.sci.com> gary@sci34hub.sci.com (Gary Heston) writes:
>In article <1992Apr23.123258.21085@ircam.fr> francis@ircam.fr (Joseph Francis) writes:
>  [ ... ]
>=Yes, I'm utterly curious about suid programs, and "root" ownership.
>=What is to prevent someone with an appropriate disk drive to twiddle a
>=few bits on a floppy and create suid root shells and such, mount and
>=execute them?

The nosuid flag for mount.

>At the moment, there doesn't seem to be anything preventing them, 
>other than physical security of the systems' floppy drive. I wonder 
>if a tape could be similarly rigged--dump a script to it with tar
>or cpio, dd the image in, twiddle a few bits, dd it back out, and
>tar/cpio it back in. I don't believe either of them clears suid
>bits, or doing a system restore after a crash would be miserable.
>

You are correct in stating thattar does not clear ownership / permissions, or 
suid bits, when saving files.  

However :   

Chown(2) is only executable by root, so  a normal user cannot extract a 
file from a tar, suid or not, and have it owned by some one else. 

Chmod(2) is only executable by the owner of a file, or root, 
so no normal user can make someone else's file suid either.

So, a normal user can extract suid programs from tape owned by
him, or owned by others and have them become owned by him,
but cannot create files owned by anyone else, let alone
suid files.

>Ack. Nothing is safe; there's no security--better get a few bags of
>concrete and encase my systems.... :-)

Of course there is some security.  You just have to know about
it by reading TFM and when that doesn't work because of the shoddy
man pages included with todays systems, RTFS, which because of 
brain damaged source licenses doesn't always work 8^) 

PEEVE : shoddy man pages.  I got BSD 4.3 Reno up on my VAX 11/785, and
	went off to a Sun to read /usr/src off of the tape.  I don't normally
	deal with 9 tracks kept around for reading
	distributions like this, and found out that getting this single
	tar file off tape made installing sendmail seem trivial
	in comparison.

	(I'm serious here.  If you don't use IDA sendmail and 
	m4 config source, do it, and you'll see what I mean)

	Now, many tar, and dump man pages I've seen
	have had device names WITH DENSITY under the FILES 
	subhead.  Of course, SUN doesn't do that anymore.

	All in the name of progress, I guess.

	SEE ALSO mtio(4) didn't have it, SEE ALSO tm(4) didn't
	have it, it took until I got down to SEE ALSO xt(4) which
	superceeded tm(4).    

	That didn't work.  Of course, tar automatically determines block size
	when doing an x or t (as stated in the Sun man page).  
	What it didn't say is 

	"Some hardware devices such as the 9 track tape drives 
	 return hard error codes when you read at a blocking
	 factor other than what was specified when the tape 
	 was written"

	After a few hard errors, time to go home, and a day off, we suspected 
	something this sinister, eventually had to go from the sub basement,  
	up to the first floor in another wing of the building where the tape 
	drive was, read the label, use that block size, and it worked.  

	I shouldn't have had to do that. With gigabytes of disk online,
	I can spare room in my /usr/man or /usr/share/man directory 
	for a few extra lines per file saying 

	"/dev/rmt0 is the low density device.  /dev/rmt8 is 
	 the high density, typically 6250 bpi device.  /dev/nrmt*
	 are the nonrewinding devices."

	under subhead FILES

	and  

	"When reading from a pipe or regular file, the x and t 
	 options automatically determine block size.  However, when 
	 reading from certain devices, notably /dev/{n,}rmt*, 
	 block size must be explicitly specified with the b 
 	 flag or a hard error may result"
		
	under both subhead DESCRIPTION, and DIAGNOSTICS in case I 
	though I knew more than I did, and merely skimmed the man
	page.




  reply	other threads:[~1992-05-01 14:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-04-16  1:26 Help: how to set the ownership of a mounted floppy disk back to general user Alan S H Lam
1992-04-17 10:29 ` Chuck Qun Zheng
1992-04-17 15:30   ` John F Haugh II
1992-04-20 16:48 ` Gary Heston
     [not found]   ` <keithl.703861421@mukluk.cc.monash.edu.au>
1992-04-23  5:11     ` dosread and doswrite for 3.5" floppies wanted Richard Mackerras,Lamble 140,73-3464,71-1133
1992-04-23 12:32     ` Floppy Disk Security? (Re: Help: how to set the ownership ...) Joseph Francis
1992-04-27 16:41       ` Steve McKinty - Sun ICNC
1992-04-29 12:33         ` Nik Simpson
1992-05-01 18:03           ` Peter da Silva
1992-04-27 19:09       ` Michael Thomas
     [not found]         ` <1992Apr27.210248.11691@sura.net>
1992-04-27 21:27           ` Michael Thomas
1992-04-28 17:06             ` Martyn Johnson
1992-04-27 19:14       ` Floppy Disk Security? John F. Haugh II
1992-04-28  8:43         ` Ian G Batten
1992-04-28 12:19       ` Floppy Disk Security? (Re: Help: how to set the ownership ...) Gary Heston
1992-05-01 14:02         ` Drew Eckhardt [this message]
1992-05-04 15:47           ` Gary Heston
1992-05-04 23:29           ` Peter da Silva
1992-05-01 13:02       ` Drew Eckhardt
1992-04-23 16:04     ` Help: how to set the ownership of a mounted floppy disk back to general user Peter da Silva
1992-04-26 20:07       ` Jonathan I. Kamens
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox