Fred K Ollinger on Sat, 15 Jun 2002 20:10:14 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] unix cp function call (thanks)


> On Fri, Jun 14, 2002 at 04:59:46PM -0500, Sean Finney wrote:
> > someone correct me if I'm wrong, but I think there might be some security
> > implications of using system(3).
>
> Well, provided that the string you pass to system(3) isn't
> user-supplied, the only real problem is that you're presuming that the
> binary you call is the right thing. You can give system(3) a full
> path, but I can just chroot(8) before calling your binary, so that
> saves you from broken PATHs but not from real exploits. (Ah. Yes,
> you say all that below. Whoops.)

The user does supply one of the strings, but I'm not going to do a system
b/c I don't know how to get that to work easily w/ a pointer to a char
array.

> Writing safe suid/sgid binaries is EXTREMELY difficult, and
> something noone without a really good understanding of how the Unix
> permissions structure works should consider attempting. (That is, I

This is an installer that has to run as root. It's so alpha, someone would
have to be a real masocist to try it out, but it does warn the user of
such. :)

I all ready screwed lots of things up on my computer testing it out.

Thanks for all the help on this.

Fred


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug