🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.security.misc
Article #59

Re: Setuid file

#59
From: John F. Haugh II
Date: Wed, 04 Nov 1992 14:07
24 lines
1824 bytes
In article <1992Nov3.211052.11569@ulysses.att.com> smb@ulysses.att.com (Steven Bellovin) writes:
>I've never heard of shells themselves running setuid, and I hope I never
>do...  Ksh uses a setuid root intermediate program to implement setuid
>shell scripts on systems where the kernel doesn't do it.  It uses
>open file descriptors, rather than names, and so should be immune
>to the usual hack.

No, I was referring to if the system starts the shell with an effective
UID of the script file owner - NOT that the shell itself was set-UID.

I also doubt that the zero length script would pose a problem since the
kernel looks for "#!" as a magic number before deciding it is a shell
script.  That's why the comment about being implemented in a "warped"
manner was put in there.

>So -- I don't know of any problems with that file.  But I confess that
>it makes me extremely nervous -- I just have a very bad feeling about it...

I don't either, but the way to find out is to see if the exec() of the
file returns an ENOEXEC error, or if the system runs off and executes
it anyway.  My bet is that the system returns ENOEXEC ...
-- 
John F. Haugh II                  [  TSAKC  ] !'s: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 251-2151           [ DoF #17 ]        @'s: jfh@rpp386.cactus.org
Technical Details
Message-ID: <21808@rpp386.lonestar.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!chinacat!rpp386!jfh
References: <8exLmiW00WB6QXP4Yb@andrew.cmu.edu> <21806@rpp386.lonestar.org> <1992Nov3.211052.11569@ulysses.att.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!chinacat!rpp386!jfh
From: jfh@rpp386.lonestar.org (John F. Haugh II)
Newsgroups: comp.security.misc
Subject: Re: Setuid file
Message-ID: <21808@rpp386.lonestar.org>
Date: 4 Nov 92 14:07:39 GMT
References: <8exLmiW00WB6QXP4Yb@andrew.cmu.edu> <21806@rpp386.lonestar.org> <1992Nov3.211052.11569@ulysses.att.com>
Reply-To: jfh@rpp386.cactus.org (John F. Haugh II)
Organization: Los Tejanos SCUBA Club and Beer Joint, Austin, Tejas
Lines: 24