From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1020c6,8c9469280c4ae1c2 X-Google-Attributes: gid1020c6,public X-Google-Thread: 1164f8,8c9469280c4ae1c2 X-Google-Attributes: gid1164f8,public X-Google-Thread: 10b612,8c9469280c4ae1c2 X-Google-Attributes: gid10b612,public X-Google-ArrivalTime: 1992-05-01 07:02:41 PST Xref: sparky comp.sys.dec:2763 comp.unix.ultrix:4142 comp.unix.admin:3054 Newsgroups: comp.sys.dec,comp.unix.ultrix,comp.unix.admin Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!boulder!ladymacb.cs.colorado.edu!drew From: drew@ladymacb.cs.colorado.edu (Drew Eckhardt) Subject: Re: Floppy Disk Security? (Re: Help: how to set the ownership ...) Message-ID: <1992May1.140241.4112@colorado.edu> Sender: news@colorado.edu (The Daily Planet) Nntp-Posting-Host: ladymacb.cs.colorado.edu Organization: University of Colorado at Boulder References: <1992Apr23.123258.21085@ircam.fr> <1992Apr28.121914.10226@sci34hub.sci.com> Date: Fri, 1 May 1992 14:02:41 GMT 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.