LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-11-2002, 05:27 AM   #1
l_9_l
Member
 
Registered: Dec 2001
Location: New Zealand,Auckland
Distribution: debian
Posts: 86

Rep: Reputation: 15
Question Inquiry about "suid"


Hi everyone..

I read that "Setting the suid for a program could possibly become a security hole in your system."

Q:Why may become a security hole?

When we suid a program, anyuser can run it as affective as root could run it, or will have root access privileges?
Please enlighten me!!

Thanks in advance..
 
Old 01-11-2002, 05:43 AM   #2
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
well, it's dangerous as a user is able to run a program as root.

i'm not sure what the difference in your two situations is really... setting suid will run the program as the OWNER of the file, so not always root, but that's typically when it is used. the program is just passed the UID of the file owner rather than the person who exeecutes it. And it's pretty clear that this can be extremely dangerous, such as just being able to turn a box off as non-root. it is possible for programs to ignore suid, but that's done very verbosely, and only gerneally done on security related progs, which will not run on suid at all.
 
Old 01-11-2002, 01:32 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594
well, it's dangerous as a user is able to run a program as root.

Well... can't put it that black 'n white...
(some) apps that use setuid usually do this for a (somewhat) valid reason, and in some cases drop privileges when done doing stuff that needs the other uid. take for instance sendmail.
sendmail has to bind to port TCP/25 on startup. but only root can bind to ports < 1024. the config's "RunAsUser" function takes care of sendmail's privileges after binding to TCP/25 itll drop root uid and take on the uid of the "RunAsUser" var. *ok, ok there are other reasons to reconsider using sendmail instead of qmail etc etc.

Now take kermit (C-kermit version 7). kermit doesn't need setuid, but unfortunately is installed setuid root. several flaws in the kermit code exists where you could use extra supplied code, beyond the point of what the app checks, to execute *unchecked* code as the setuid user. this is an example of the kind of possible setuid abuse security texts would talk about.

*run a "find / -f type -perm +2000" and
"find / -f type -perm +4000" to review your s(gid,uid) installed apps.

Last edited by unSpawn; 01-11-2002 at 01:33 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 02:03 AM
what is "sticky bit mode" , "SUID" , "SGID" augustus123 Linux - General 10 08-03-2012 05:40 AM
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 12:26 PM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 04:07 PM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration